quantum_circuit::u()← Back to Class quantum_circuit
Apply \(U\) gate (generic single-qubit rotation of \(ZYZ\) Euler angles) to the circuit
quantum_circuit::u(theta, phi, lambda, qubit)
theta (number) — The rotation angle \(\theta\)phi (number) — The rotation angle \(\phi\)lambda (number) — The rotation angle \(\lambda\)qubit (number) — The qubit to apply the gate to
quantum_circuit — Returns the instance of class quantum_circuit
import quantum
qc = quantum_circuit(2)
qc.u(pi / 2, pi, pi / 3, 0)