quantum_circuit::p()← Back to Class quantum_circuit
Apply \(P\) gate (single-qubit rotation of \(Z\)-axis) to the circuit
quantum_circuit::p(theta, qubit)
theta (number) — The rotation angle \(\theta\)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.p(pi / 2, 0)