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 two PRXGate operations.

Global phases introduced by the decompositions are accumulated and emitted as a GPhaseGate on 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.

PRXGate#

class PRXGate(alpha: float, beta: float)[source]#

PRX (Phased-RX) gate.

The PRX gate is a single-qubit gate of the form:

\[\text{PRX}(\alpha, \beta) = R_Z(\beta) \cdot R_X(\alpha) \cdot R_Z(-\beta)\]
Parameters:
alphafloat

The rotation angle.

betafloat

The phase parameter.