Skip to content

Initialize

__RewriteU3ToInitialize

Bases: RewriteRule


              flowchart TD
              bloqade.gemini.rewrite.initialize.__RewriteU3ToInitialize[__RewriteU3ToInitialize]

              

              click bloqade.gemini.rewrite.initialize.__RewriteU3ToInitialize href "" "bloqade.gemini.rewrite.initialize.__RewriteU3ToInitialize"
            

Rewrite U3 gates to Initialize statements.

Note:

This rewrite is only valid in the context of logical qubits, where the U3 gate can be interpreted as initializing a qubit to an arbitrary state.

The U3 gate with parameters (theta, phi, lam) is equivalent to initializing a qubit to the state defined by those angles.

This rewrite also assumes there are no other U3 gates acting on the same qubits later in the circuit, as that would conflict with the initialization semantics.