quantum_circuit::cu()← Back to Class quantum_circuit
Apply \(CU\) gate to the circuit
quantum_circuit::cu(theta, phi, lambda, gamma, qubit_control, qubit_target)
theta (number) — The rotation angle \(\theta\)phi (number) — The rotation angle \(\phi\)lambda (number) — The rotation angle \(\lambda\)gamma (number) — The rotation angle \(\gamma\)qubit_control (number) — The qubit control to apply the gate toqubit_target (number) — The qubit target to apply the gate to
quantum_circuit — Returns the instance of class quantum_circuit
import quantum
qc = quantum_circuit(2)
qc.h(0)
qc.cu(pi / 2, pi, pi / 2, pi / 3, 0, 1)