convert_to_prx#
- convert_to_prx(qc: QuantumCircuit) QuantumCircuit[source]#
Convert single-qubit gates to PRX (Phased-RX) gate decomposition.
This pass converts arbitrary single-qubit gates to PRX gates. When a U3 gate is already in PRX form (\(\lambda \approx -\phi\)), it is replaced by a single
PRXGate. Otherwise it is decomposed into a sequence of twoPRXGateoperations.Global phases introduced by the decompositions are accumulated and emitted as a
GPhaseGateon the zeroth qubit of the output circuit at the end of the pass.- Parameters:
- qcQuantumCircuit
The input quantum circuit.
- Returns:
- QuantumCircuit
A new circuit with single-qubit gates decomposed into PRX gates and an optional trailing global-phase gate.