qrisp.QuantumCircuit.r#

QuantumCircuit.r(theta: FloatLike, phi: FloatLike, qubits: QubitLike)[source]#

Instruct an R-gate.

The unitary is

\[\begin{split}R(\theta, \phi) = \begin{pmatrix} \cos\!\tfrac{\theta}{2} & e^{-i\phi}\sin\!\tfrac{\theta}{2} \\ -e^{i\phi}\sin\!\tfrac{\theta}{2} & \cos\!\tfrac{\theta}{2} \end{pmatrix}\end{split}\]
Parameters:
thetaFloatLike

Rotation angle in radians. Controls the amount of rotation.

phiFloatLike

Axis angle in radians. Selects the rotation axis in the XY plane.

qubitsQubitLike

The qubit to apply the gate on.