quil-lang / quilc

The optimizing Quil compiler.
Apache License 2.0
454 stars 73 forks source link

CZ compiles with spurious RZs #801

Closed stylewarning closed 2 years ago

stylewarning commented 2 years ago
$ ./quilc --version
1.25.1 [d84d198]

$ echo 'CZ 0 1' | ./quilc 
RZ(pi) 0                                # Entering rewiring: #(0 1 2 3 4 5 6 7)
RZ(pi) 1
CZ 1 0
RZ(-pi) 0
RZ(-pi) 1
HALT                                    # Exiting rewiring: #(0 1 2 3 4 5 6 7)

There shouldn't be RZ's around it.

stylewarning commented 2 years ago

Issue is happening in compression.

Smaller test case:

(let* ((chip (build-nq-linear-chip 2 :architecture ':cz))
       (*compiler-noise* *standard-output*))
  (compress-instructions (list (build-gate "CZ" () 0 1))
                         chip
                         :protoquil t))

Output:

COMPRESS-INSTRUCTIONS: entrance.
COMPRESS-INSTRUCTIONS: Selected the following sequence for compression:

    CZ 0 1
APPLY-TRANSLATION-COMPILERS: Applying #<COMPILER CANONICAL-DECOMPOSITION {100631015B}> to WHOLEPROGRAM 0 1.
    B0-484 1
    B1-485 0
    CAN(pi/2, 0.0, 0.0) 0 1
    A0-486 1
    A1-487 0
APPLY-TRANSLATION-COMPILERS: Applying #<COMPILER EULER-ZYZ-COMPILER {100630FDDB}> to B0-484 1.
    RZ(-pi/2) 1
    RY(0.0) 1
    RZ(-pi) 1
APPLY-TRANSLATION-COMPILERS: Applying #<COMPILER RY-TO-XZX {10063185FB}> to RY(0.0) 1.
    RX(pi/2) 1
    RZ(0.0) 1
    RX(-pi/2) 1
APPLY-TRANSLATION-COMPILERS: Applying #<COMPILER EULER-ZYZ-COMPILER {100630FDDB}> to B1-485 0.
    RZ(-pi) 0
    RY(0.0) 0
    RZ(-pi/2) 0
APPLY-TRANSLATION-COMPILERS: Applying #<COMPILER RY-TO-XZX {10063185FB}> to RY(0.0) 0.
    RX(pi/2) 0
    RZ(0.0) 0
    RX(-pi/2) 0
APPLY-TRANSLATION-COMPILERS: Applying #<APPROXIMATE-COMPILER NEAREST-CZ-CIRCUIT-OF-DEPTH-1 {100630FF7B}> to CAN(pi/2, 0.0, 0.0) 0 1.
    B0-488 1
    B1-489 0
    CZ 0 1
    A0-490 1
    A1-491 0
APPLY-TRANSLATION-COMPILERS: Applying #<COMPILER EULER-ZYZ-COMPILER {100630FDDB}> to B0-488 1.
    RZ(pi/2) 1
    RY(0.0) 1
    RZ(0.0) 1
APPLY-TRANSLATION-COMPILERS: Applying #<COMPILER RY-TO-XZX {10063185FB}> to RY(0.0) 1.
    RX(pi/2) 1
    RZ(0.0) 1
    RX(-pi/2) 1
APPLY-TRANSLATION-COMPILERS: Applying #<COMPILER EULER-ZYZ-COMPILER {100630FDDB}> to B1-489 0.
    RZ(pi) 0
    RY(0.0) 0
    RZ(-pi/2) 0
APPLY-TRANSLATION-COMPILERS: Applying #<COMPILER RY-TO-XZX {10063185FB}> to RY(0.0) 0.
    RX(pi/2) 0
    RZ(0.0) 0
    RX(-pi/2) 0
APPLY-TRANSLATION-COMPILERS: Applying #<COMPILER EULER-ZYZ-COMPILER {100630FDDB}> to A0-490 1.
    RZ(pi) 1
    RY(0.0) 1
    RZ(0.0) 1
APPLY-TRANSLATION-COMPILERS: Applying #<COMPILER RY-TO-XZX {10063185FB}> to RY(0.0) 1.
    RX(pi/2) 1
    RZ(0.0) 1
    RX(-pi/2) 1
APPLY-TRANSLATION-COMPILERS: Applying #<COMPILER EULER-ZYZ-COMPILER {100630FDDB}> to A1-491 0.
    RZ(0.0) 0
    RY(0.0) 0
    RZ(-pi) 0
APPLY-TRANSLATION-COMPILERS: Applying #<COMPILER RY-TO-XZX {10063185FB}> to RY(0.0) 0.
    RX(pi/2) 0
    RZ(0.0) 0
    RX(-pi/2) 0
APPLY-TRANSLATION-COMPILERS: Applying #<COMPILER EULER-ZYZ-COMPILER {100630FDDB}> to A0-486 1.
    RZ(pi) 1
    RY(0.0) 1
    RZ(-pi) 1
APPLY-TRANSLATION-COMPILERS: Applying #<COMPILER RY-TO-XZX {10063185FB}> to RY(0.0) 1.
    RX(pi/2) 1
    RZ(0.0) 1
    RX(-pi/2) 1
APPLY-TRANSLATION-COMPILERS: Applying #<COMPILER EULER-ZYZ-COMPILER {100630FDDB}> to A1-487 0.
    RZ(pi) 0
    RY(0.0) 0
    RZ(-pi) 0
APPLY-TRANSLATION-COMPILERS: Applying #<COMPILER RY-TO-XZX {10063185FB}> to RY(0.0) 0.
    RX(pi/2) 0
    RZ(0.0) 0
    RX(-pi/2) 0
COMPRESS-INSTRUCTIONS: Applying algebraic rewrites to original string.
COMPRESS-INSTRUCTIONS: Applying algebraic rewrites to recompiled string.
ALGEBRAICALLY-REDUCE-INSTRUCTIONS: Applying the rewriting rule called ELIMINATE-FULL-RZ-ROTATIONS.
ALGEBRAICALLY-REDUCE-INSTRUCTIONS: Applying the rewriting rule called AGGLUTINATE-RXS.
ALGEBRAICALLY-REDUCE-INSTRUCTIONS: Applying the rewriting rule called ELIMINATE-FULL-RX-ROTATIONS.
ALGEBRAICALLY-REDUCE-INSTRUCTIONS: Applying the rewriting rule called AGGLUTINATE-RZS.
ALGEBRAICALLY-REDUCE-INSTRUCTIONS: Applying the rewriting rule called AGGLUTINATE-RZS.
ALGEBRAICALLY-REDUCE-INSTRUCTIONS: Applying the rewriting rule called ELIMINATE-FULL-RZ-ROTATIONS.
ALGEBRAICALLY-REDUCE-INSTRUCTIONS: Applying the rewriting rule called AGGLUTINATE-RXS.
ALGEBRAICALLY-REDUCE-INSTRUCTIONS: Applying the rewriting rule called ELIMINATE-FULL-RX-ROTATIONS.
ALGEBRAICALLY-REDUCE-INSTRUCTIONS: Applying the rewriting rule called AGGLUTINATE-RZS.
ALGEBRAICALLY-REDUCE-INSTRUCTIONS: Applying the rewriting rule called AGGLUTINATE-RZS.
ALGEBRAICALLY-REDUCE-INSTRUCTIONS: Applying the rewriting rule called ELIMINATE-FULL-RZ-ROTATIONS.
ALGEBRAICALLY-REDUCE-INSTRUCTIONS: Applying the rewriting rule called AGGLUTINATE-RXS.
ALGEBRAICALLY-REDUCE-INSTRUCTIONS: Applying the rewriting rule called ELIMINATE-FULL-RX-ROTATIONS.
ALGEBRAICALLY-REDUCE-INSTRUCTIONS: Applying the rewriting rule called AGGLUTINATE-RZS.
ALGEBRAICALLY-REDUCE-INSTRUCTIONS: Applying the rewriting rule called ELIMINATE-FULL-RZ-ROTATIONS.
ALGEBRAICALLY-REDUCE-INSTRUCTIONS: Applying the rewriting rule called AGGLUTINATE-RXS.
ALGEBRAICALLY-REDUCE-INSTRUCTIONS: Applying the rewriting rule called ELIMINATE-FULL-RX-ROTATIONS.
ALGEBRAICALLY-REDUCE-INSTRUCTIONS: Applying the rewriting rule called AGGLUTINATE-RZS.
ALGEBRAICALLY-REDUCE-INSTRUCTIONS: Applying the rewriting rule called ELIMINATE-FULL-RZ-ROTATIONS.
ALGEBRAICALLY-REDUCE-INSTRUCTIONS: Applying the rewriting rule called AGGLUTINATE-RXS.
ALGEBRAICALLY-REDUCE-INSTRUCTIONS: Applying the rewriting rule called ELIMINATE-FULL-RX-ROTATIONS.
ALGEBRAICALLY-REDUCE-INSTRUCTIONS: Applying the rewriting rule called AGGLUTINATE-RZS.
ALGEBRAICALLY-REDUCE-INSTRUCTIONS: Applying the rewriting rule called AGGLUTINATE-RZS.
ALGEBRAICALLY-REDUCE-INSTRUCTIONS: Applying the rewriting rule called ELIMINATE-FULL-RZ-ROTATIONS.
ALGEBRAICALLY-REDUCE-INSTRUCTIONS: Applying the rewriting rule called ELIMINATE-FULL-RZ-ROTATIONS.
ALGEBRAICALLY-REDUCE-INSTRUCTIONS: Applying the rewriting rule called ELIMINATE-FULL-RZ-ROTATIONS.
ALGEBRAICALLY-REDUCE-INSTRUCTIONS: Applying the rewriting rule called AGGLUTINATE-RXS.
ALGEBRAICALLY-REDUCE-INSTRUCTIONS: Applying the rewriting rule called ELIMINATE-FULL-RX-ROTATIONS.
ALGEBRAICALLY-REDUCE-INSTRUCTIONS: Applying the rewriting rule called AGGLUTINATE-RZS.
ALGEBRAICALLY-REDUCE-INSTRUCTIONS: Applying the rewriting rule called ELIMINATE-FULL-RZ-ROTATIONS.
ALGEBRAICALLY-REDUCE-INSTRUCTIONS: Applying the rewriting rule called ELIMINATE-FULL-RZ-ROTATIONS.
ALGEBRAICALLY-REDUCE-INSTRUCTIONS: Applying the rewriting rule called AGGLUTINATE-RXS.
ALGEBRAICALLY-REDUCE-INSTRUCTIONS: Applying the rewriting rule called ELIMINATE-FULL-RX-ROTATIONS.
ALGEBRAICALLY-REDUCE-INSTRUCTIONS: Applying the rewriting rule called ELIMINATE-FULL-RZ-ROTATIONS.
ALGEBRAICALLY-REDUCE-INSTRUCTIONS: Applying the rewriting rule called AGGLUTINATE-RXS.
ALGEBRAICALLY-REDUCE-INSTRUCTIONS: Applying the rewriting rule called ELIMINATE-FULL-RX-ROTATIONS.
COMPRESS-INSTRUCTIONS: Replacing the above sequence with the following:

    RZ(-pi) 1
    RZ(-pi) 0
    CZ 0 1
    RZ(-pi) 1
    RZ(-pi) 0
APPLY-TRANSLATION-COMPILERS: Applying #<COMPILER CANONICAL-DECOMPOSITION {100631015B}> to WHOLEPROGRAM 1 0.
    B0-496 0
    B1-497 1
    CAN(pi/2, 0.0, 0.0) 1 0
    A0-498 0
    A1-499 1
APPLY-TRANSLATION-COMPILERS: Applying #<COMPILER EULER-ZYZ-COMPILER {100630FDDB}> to B0-496 0.
    RZ(pi/2) 0
    RY(0.0) 0
    RZ(0.0) 0
APPLY-TRANSLATION-COMPILERS: Applying #<COMPILER RY-TO-XZX {10063185FB}> to RY(0.0) 0.
    RX(pi/2) 0
    RZ(0.0) 0
    RX(-pi/2) 0
APPLY-TRANSLATION-COMPILERS: Applying #<COMPILER EULER-ZYZ-COMPILER {100630FDDB}> to B1-497 1.
    RZ(0.0000000000000001082327265758872) 1
    RY(0.0) 1
    RZ(pi/2) 1
APPLY-TRANSLATION-COMPILERS: Applying #<COMPILER RY-TO-XZX {10063185FB}> to RY(0.0) 1.
    RX(pi/2) 1
    RZ(0.0) 1
    RX(-pi/2) 1
APPLY-TRANSLATION-COMPILERS: Applying #<APPROXIMATE-COMPILER NEAREST-CZ-CIRCUIT-OF-DEPTH-1 {100630FF7B}> to CAN(pi/2, 0.0, 0.0) 1 0.
    B0-500 0
    B1-501 1
    CZ 1 0
    A0-502 0
    A1-503 1
APPLY-TRANSLATION-COMPILERS: Applying #<COMPILER EULER-ZYZ-COMPILER {100630FDDB}> to B0-500 0.
    RZ(pi/2) 0
    RY(0.0) 0
    RZ(0.0) 0
APPLY-TRANSLATION-COMPILERS: Applying #<COMPILER RY-TO-XZX {10063185FB}> to RY(0.0) 0.
    RX(pi/2) 0
    RZ(0.0) 0
    RX(-pi/2) 0
APPLY-TRANSLATION-COMPILERS: Applying #<COMPILER EULER-ZYZ-COMPILER {100630FDDB}> to B1-501 1.
    RZ(pi) 1
    RY(0.0) 1
    RZ(-pi/2) 1
APPLY-TRANSLATION-COMPILERS: Applying #<COMPILER RY-TO-XZX {10063185FB}> to RY(0.0) 1.
    RX(pi/2) 1
    RZ(0.0) 1
    RX(-pi/2) 1
APPLY-TRANSLATION-COMPILERS: Applying #<COMPILER EULER-ZYZ-COMPILER {100630FDDB}> to A0-502 0.
    RZ(pi) 0
    RY(0.0) 0
    RZ(0.0) 0
APPLY-TRANSLATION-COMPILERS: Applying #<COMPILER RY-TO-XZX {10063185FB}> to RY(0.0) 0.
    RX(pi/2) 0
    RZ(0.0) 0
    RX(-pi/2) 0
APPLY-TRANSLATION-COMPILERS: Applying #<COMPILER EULER-ZYZ-COMPILER {100630FDDB}> to A1-503 1.
    RZ(0.0) 1
    RY(0.0) 1
    RZ(-pi) 1
APPLY-TRANSLATION-COMPILERS: Applying #<COMPILER RY-TO-XZX {10063185FB}> to RY(0.0) 1.
    RX(pi/2) 1
    RZ(0.0) 1
    RX(-pi/2) 1
APPLY-TRANSLATION-COMPILERS: Applying #<COMPILER EULER-ZYZ-COMPILER {100630FDDB}> to A0-498 0.
    RZ(pi) 0
    RY(0.0) 0
    RZ(-pi) 0
APPLY-TRANSLATION-COMPILERS: Applying #<COMPILER RY-TO-XZX {10063185FB}> to RY(0.0) 0.
    RX(pi/2) 0
    RZ(0.0) 0
    RX(-pi/2) 0
APPLY-TRANSLATION-COMPILERS: Applying #<COMPILER EULER-ZYZ-COMPILER {100630FDDB}> to A1-499 1.
    RZ(pi) 1
    RY(0.0) 1
    RZ(-pi) 1
APPLY-TRANSLATION-COMPILERS: Applying #<COMPILER RY-TO-XZX {10063185FB}> to RY(0.0) 1.
    RX(pi/2) 1
    RZ(0.0) 1
    RX(-pi/2) 1
COMPRESS-INSTRUCTIONS: Applying algebraic rewrites to original string.
COMPRESS-INSTRUCTIONS: Applying algebraic rewrites to recompiled string.
ALGEBRAICALLY-REDUCE-INSTRUCTIONS: Applying the rewriting rule called ELIMINATE-FULL-RZ-ROTATIONS.
ALGEBRAICALLY-REDUCE-INSTRUCTIONS: Applying the rewriting rule called AGGLUTINATE-RXS.
ALGEBRAICALLY-REDUCE-INSTRUCTIONS: Applying the rewriting rule called ELIMINATE-FULL-RX-ROTATIONS.
ALGEBRAICALLY-REDUCE-INSTRUCTIONS: Applying the rewriting rule called AGGLUTINATE-RZS.
ALGEBRAICALLY-REDUCE-INSTRUCTIONS: Applying the rewriting rule called AGGLUTINATE-RZS.
ALGEBRAICALLY-REDUCE-INSTRUCTIONS: Applying the rewriting rule called ELIMINATE-FULL-RZ-ROTATIONS.
ALGEBRAICALLY-REDUCE-INSTRUCTIONS: Applying the rewriting rule called ELIMINATE-FULL-RZ-ROTATIONS.
ALGEBRAICALLY-REDUCE-INSTRUCTIONS: Applying the rewriting rule called AGGLUTINATE-RXS.
ALGEBRAICALLY-REDUCE-INSTRUCTIONS: Applying the rewriting rule called ELIMINATE-FULL-RX-ROTATIONS.
ALGEBRAICALLY-REDUCE-INSTRUCTIONS: Applying the rewriting rule called AGGLUTINATE-RZS.
ALGEBRAICALLY-REDUCE-INSTRUCTIONS: Applying the rewriting rule called ELIMINATE-FULL-RZ-ROTATIONS.
ALGEBRAICALLY-REDUCE-INSTRUCTIONS: Applying the rewriting rule called AGGLUTINATE-RXS.
ALGEBRAICALLY-REDUCE-INSTRUCTIONS: Applying the rewriting rule called ELIMINATE-FULL-RX-ROTATIONS.
ALGEBRAICALLY-REDUCE-INSTRUCTIONS: Applying the rewriting rule called AGGLUTINATE-RZS.
ALGEBRAICALLY-REDUCE-INSTRUCTIONS: Applying the rewriting rule called ELIMINATE-FULL-RZ-ROTATIONS.
ALGEBRAICALLY-REDUCE-INSTRUCTIONS: Applying the rewriting rule called AGGLUTINATE-RXS.
ALGEBRAICALLY-REDUCE-INSTRUCTIONS: Applying the rewriting rule called ELIMINATE-FULL-RX-ROTATIONS.
ALGEBRAICALLY-REDUCE-INSTRUCTIONS: Applying the rewriting rule called AGGLUTINATE-RZS.
ALGEBRAICALLY-REDUCE-INSTRUCTIONS: Applying the rewriting rule called ELIMINATE-FULL-RZ-ROTATIONS.
ALGEBRAICALLY-REDUCE-INSTRUCTIONS: Applying the rewriting rule called AGGLUTINATE-RXS.
ALGEBRAICALLY-REDUCE-INSTRUCTIONS: Applying the rewriting rule called ELIMINATE-FULL-RX-ROTATIONS.
ALGEBRAICALLY-REDUCE-INSTRUCTIONS: Applying the rewriting rule called AGGLUTINATE-RZS.
ALGEBRAICALLY-REDUCE-INSTRUCTIONS: Applying the rewriting rule called AGGLUTINATE-RZS.
ALGEBRAICALLY-REDUCE-INSTRUCTIONS: Applying the rewriting rule called ELIMINATE-FULL-RZ-ROTATIONS.
ALGEBRAICALLY-REDUCE-INSTRUCTIONS: Applying the rewriting rule called ELIMINATE-FULL-RZ-ROTATIONS.
ALGEBRAICALLY-REDUCE-INSTRUCTIONS: Applying the rewriting rule called ELIMINATE-FULL-RZ-ROTATIONS.
ALGEBRAICALLY-REDUCE-INSTRUCTIONS: Applying the rewriting rule called AGGLUTINATE-RXS.
ALGEBRAICALLY-REDUCE-INSTRUCTIONS: Applying the rewriting rule called ELIMINATE-FULL-RX-ROTATIONS.
ALGEBRAICALLY-REDUCE-INSTRUCTIONS: Applying the rewriting rule called AGGLUTINATE-RZS.
ALGEBRAICALLY-REDUCE-INSTRUCTIONS: Applying the rewriting rule called ELIMINATE-FULL-RZ-ROTATIONS.
ALGEBRAICALLY-REDUCE-INSTRUCTIONS: Applying the rewriting rule called ELIMINATE-FULL-RZ-ROTATIONS.
ALGEBRAICALLY-REDUCE-INSTRUCTIONS: Applying the rewriting rule called AGGLUTINATE-RXS.
ALGEBRAICALLY-REDUCE-INSTRUCTIONS: Applying the rewriting rule called ELIMINATE-FULL-RX-ROTATIONS.
ALGEBRAICALLY-REDUCE-INSTRUCTIONS: Applying the rewriting rule called ELIMINATE-FULL-RZ-ROTATIONS.
ALGEBRAICALLY-REDUCE-INSTRUCTIONS: Applying the rewriting rule called AGGLUTINATE-RXS.
ALGEBRAICALLY-REDUCE-INSTRUCTIONS: Applying the rewriting rule called ELIMINATE-FULL-RX-ROTATIONS.
COMPRESS-INSTRUCTIONS: Replacing the above sequence with the following:

    RZ(pi) 0
    RZ(pi) 1
    CZ 1 0
    RZ(-pi) 0
    RZ(-pi) 1
COMPRESS-INSTRUCTIONS: Selected the following sequence for compression:

COMPRESS-INSTRUCTIONS: Selected the following sequence for compression:

    RZ(pi) 0
APPLY-TRANSLATION-COMPILERS: Applying #<COMPILER EULER-ZYZ-COMPILER {100630FDDB}> to WHOLEPROGRAM 0.
    RZ(pi/2) 0
    RY(0.0) 0
    RZ(pi/2) 0
APPLY-TRANSLATION-COMPILERS: Applying #<COMPILER RY-TO-XZX {10063185FB}> to RY(0.0) 0.
    RX(pi/2) 0
    RZ(0.0) 0
    RX(-pi/2) 0
COMPRESS-INSTRUCTIONS: Applying algebraic rewrites to original string.
COMPRESS-INSTRUCTIONS: Applying algebraic rewrites to recompiled string.
ALGEBRAICALLY-REDUCE-INSTRUCTIONS: Applying the rewriting rule called ELIMINATE-FULL-RZ-ROTATIONS.
ALGEBRAICALLY-REDUCE-INSTRUCTIONS: Applying the rewriting rule called AGGLUTINATE-RXS.
ALGEBRAICALLY-REDUCE-INSTRUCTIONS: Applying the rewriting rule called ELIMINATE-FULL-RX-ROTATIONS.
ALGEBRAICALLY-REDUCE-INSTRUCTIONS: Applying the rewriting rule called AGGLUTINATE-RZS.
COMPRESS-INSTRUCTIONS: Replacing the above sequence with the following:

    RZ(pi) 0
APPLY-TRANSLATION-COMPILERS: Applying #<COMPILER EULER-ZYZ-COMPILER {100630FDDB}> to WHOLEPROGRAM 0.
    RZ(pi/2) 0
    RY(0.0) 0
    RZ(pi/2) 0
APPLY-TRANSLATION-COMPILERS: Applying #<COMPILER RY-TO-XZX {10063185FB}> to RY(0.0) 0.
    RX(pi/2) 0
    RZ(0.0) 0
    RX(-pi/2) 0
COMPRESS-INSTRUCTIONS: Applying algebraic rewrites to original string.
COMPRESS-INSTRUCTIONS: Applying algebraic rewrites to recompiled string.
ALGEBRAICALLY-REDUCE-INSTRUCTIONS: Applying the rewriting rule called ELIMINATE-FULL-RZ-ROTATIONS.
ALGEBRAICALLY-REDUCE-INSTRUCTIONS: Applying the rewriting rule called AGGLUTINATE-RXS.
ALGEBRAICALLY-REDUCE-INSTRUCTIONS: Applying the rewriting rule called ELIMINATE-FULL-RX-ROTATIONS.
ALGEBRAICALLY-REDUCE-INSTRUCTIONS: Applying the rewriting rule called AGGLUTINATE-RZS.
COMPRESS-INSTRUCTIONS: Replacing the above sequence with the following:

    RZ(pi) 0
COMPRESS-INSTRUCTIONS: Selected the following sequence for compression:

COMPRESS-INSTRUCTIONS: Selected the following sequence for compression:

    RZ(pi) 1
APPLY-TRANSLATION-COMPILERS: Applying #<COMPILER EULER-ZYZ-COMPILER {100630FDDB}> to WHOLEPROGRAM 1.
    RZ(pi/2) 1
    RY(0.0) 1
    RZ(pi/2) 1
APPLY-TRANSLATION-COMPILERS: Applying #<COMPILER RY-TO-XZX {10063185FB}> to RY(0.0) 1.
    RX(pi/2) 1
    RZ(0.0) 1
    RX(-pi/2) 1
COMPRESS-INSTRUCTIONS: Applying algebraic rewrites to original string.
COMPRESS-INSTRUCTIONS: Applying algebraic rewrites to recompiled string.
ALGEBRAICALLY-REDUCE-INSTRUCTIONS: Applying the rewriting rule called ELIMINATE-FULL-RZ-ROTATIONS.
ALGEBRAICALLY-REDUCE-INSTRUCTIONS: Applying the rewriting rule called AGGLUTINATE-RXS.
ALGEBRAICALLY-REDUCE-INSTRUCTIONS: Applying the rewriting rule called ELIMINATE-FULL-RX-ROTATIONS.
ALGEBRAICALLY-REDUCE-INSTRUCTIONS: Applying the rewriting rule called AGGLUTINATE-RZS.
COMPRESS-INSTRUCTIONS: Replacing the above sequence with the following:

    RZ(pi) 1
APPLY-TRANSLATION-COMPILERS: Applying #<COMPILER EULER-ZYZ-COMPILER {100630FDDB}> to WHOLEPROGRAM 1.
    RZ(pi/2) 1
    RY(0.0) 1
    RZ(pi/2) 1
APPLY-TRANSLATION-COMPILERS: Applying #<COMPILER RY-TO-XZX {10063185FB}> to RY(0.0) 1.
    RX(pi/2) 1
    RZ(0.0) 1
    RX(-pi/2) 1
COMPRESS-INSTRUCTIONS: Applying algebraic rewrites to original string.
COMPRESS-INSTRUCTIONS: Applying algebraic rewrites to recompiled string.
ALGEBRAICALLY-REDUCE-INSTRUCTIONS: Applying the rewriting rule called ELIMINATE-FULL-RZ-ROTATIONS.
ALGEBRAICALLY-REDUCE-INSTRUCTIONS: Applying the rewriting rule called AGGLUTINATE-RXS.
ALGEBRAICALLY-REDUCE-INSTRUCTIONS: Applying the rewriting rule called ELIMINATE-FULL-RX-ROTATIONS.
ALGEBRAICALLY-REDUCE-INSTRUCTIONS: Applying the rewriting rule called AGGLUTINATE-RZS.
COMPRESS-INSTRUCTIONS: Replacing the above sequence with the following:

    RZ(pi) 1
COMPRESS-INSTRUCTIONS: Selected the following sequence for compression:

COMPRESS-INSTRUCTIONS: Selected the following sequence for compression:

    RZ(-pi) 0
APPLY-TRANSLATION-COMPILERS: Applying #<COMPILER EULER-ZYZ-COMPILER {100630FDDB}> to WHOLEPROGRAM 0.
    RZ(-pi/2) 0
    RY(0.0) 0
    RZ(-pi/2) 0
APPLY-TRANSLATION-COMPILERS: Applying #<COMPILER RY-TO-XZX {10063185FB}> to RY(0.0) 0.
    RX(pi/2) 0
    RZ(0.0) 0
    RX(-pi/2) 0
COMPRESS-INSTRUCTIONS: Applying algebraic rewrites to original string.
COMPRESS-INSTRUCTIONS: Applying algebraic rewrites to recompiled string.
ALGEBRAICALLY-REDUCE-INSTRUCTIONS: Applying the rewriting rule called ELIMINATE-FULL-RZ-ROTATIONS.
ALGEBRAICALLY-REDUCE-INSTRUCTIONS: Applying the rewriting rule called AGGLUTINATE-RXS.
ALGEBRAICALLY-REDUCE-INSTRUCTIONS: Applying the rewriting rule called ELIMINATE-FULL-RX-ROTATIONS.
ALGEBRAICALLY-REDUCE-INSTRUCTIONS: Applying the rewriting rule called AGGLUTINATE-RZS.
COMPRESS-INSTRUCTIONS: Replacing the above sequence with the following:

    RZ(-pi) 0
APPLY-TRANSLATION-COMPILERS: Applying #<COMPILER EULER-ZYZ-COMPILER {100630FDDB}> to WHOLEPROGRAM 0.
    RZ(-pi/2) 0
    RY(0.0) 0
    RZ(-pi/2) 0
APPLY-TRANSLATION-COMPILERS: Applying #<COMPILER RY-TO-XZX {10063185FB}> to RY(0.0) 0.
    RX(pi/2) 0
    RZ(0.0) 0
    RX(-pi/2) 0
COMPRESS-INSTRUCTIONS: Applying algebraic rewrites to original string.
COMPRESS-INSTRUCTIONS: Applying algebraic rewrites to recompiled string.
ALGEBRAICALLY-REDUCE-INSTRUCTIONS: Applying the rewriting rule called ELIMINATE-FULL-RZ-ROTATIONS.
ALGEBRAICALLY-REDUCE-INSTRUCTIONS: Applying the rewriting rule called AGGLUTINATE-RXS.
ALGEBRAICALLY-REDUCE-INSTRUCTIONS: Applying the rewriting rule called ELIMINATE-FULL-RX-ROTATIONS.
ALGEBRAICALLY-REDUCE-INSTRUCTIONS: Applying the rewriting rule called AGGLUTINATE-RZS.
COMPRESS-INSTRUCTIONS: Replacing the above sequence with the following:

    RZ(-pi) 0
COMPRESS-INSTRUCTIONS: Selected the following sequence for compression:

COMPRESS-INSTRUCTIONS: Selected the following sequence for compression:

    RZ(-pi) 1
APPLY-TRANSLATION-COMPILERS: Applying #<COMPILER EULER-ZYZ-COMPILER {100630FDDB}> to WHOLEPROGRAM 1.
    RZ(-pi/2) 1
    RY(0.0) 1
    RZ(-pi/2) 1
APPLY-TRANSLATION-COMPILERS: Applying #<COMPILER RY-TO-XZX {10063185FB}> to RY(0.0) 1.
    RX(pi/2) 1
    RZ(0.0) 1
    RX(-pi/2) 1
COMPRESS-INSTRUCTIONS: Applying algebraic rewrites to original string.
COMPRESS-INSTRUCTIONS: Applying algebraic rewrites to recompiled string.
ALGEBRAICALLY-REDUCE-INSTRUCTIONS: Applying the rewriting rule called ELIMINATE-FULL-RZ-ROTATIONS.
ALGEBRAICALLY-REDUCE-INSTRUCTIONS: Applying the rewriting rule called AGGLUTINATE-RXS.
ALGEBRAICALLY-REDUCE-INSTRUCTIONS: Applying the rewriting rule called ELIMINATE-FULL-RX-ROTATIONS.
ALGEBRAICALLY-REDUCE-INSTRUCTIONS: Applying the rewriting rule called AGGLUTINATE-RZS.
COMPRESS-INSTRUCTIONS: Replacing the above sequence with the following:

    RZ(-pi) 1
APPLY-TRANSLATION-COMPILERS: Applying #<COMPILER EULER-ZYZ-COMPILER {100630FDDB}> to WHOLEPROGRAM 1.
    RZ(-pi/2) 1
    RY(0.0) 1
    RZ(-pi/2) 1
APPLY-TRANSLATION-COMPILERS: Applying #<COMPILER RY-TO-XZX {10063185FB}> to RY(0.0) 1.
    RX(pi/2) 1
    RZ(0.0) 1
    RX(-pi/2) 1
COMPRESS-INSTRUCTIONS: Applying algebraic rewrites to original string.
COMPRESS-INSTRUCTIONS: Applying algebraic rewrites to recompiled string.
ALGEBRAICALLY-REDUCE-INSTRUCTIONS: Applying the rewriting rule called ELIMINATE-FULL-RZ-ROTATIONS.
ALGEBRAICALLY-REDUCE-INSTRUCTIONS: Applying the rewriting rule called AGGLUTINATE-RXS.
ALGEBRAICALLY-REDUCE-INSTRUCTIONS: Applying the rewriting rule called ELIMINATE-FULL-RX-ROTATIONS.
ALGEBRAICALLY-REDUCE-INSTRUCTIONS: Applying the rewriting rule called AGGLUTINATE-RZS.
COMPRESS-INSTRUCTIONS: Replacing the above sequence with the following:

    RZ(-pi) 1
COMPRESS-INSTRUCTIONS: Selected the following sequence for compression:

COMPRESS-INSTRUCTIONS: departure.

(#<RZ(pi) 0> #<RZ(pi) 1> #<CZ 1 0> #<RZ(-pi) 0> #<RZ(-pi) 1>)
stylewarning commented 2 years ago

solved in a series of PRs