I am interested in using the QASM2Cirq methods to make this gate: u2(0, np.pi, q).
How can I build that object using Cirq rather than QASM string value passed onto cirq.
Quantum Computing Stack Exchange is a question and answer site for engineers, scientists, programmers, and computing professionals interested in quantum computing. It only takes a minute to sign up.Sign up to join this community
import cirq from cirq.circuits.qasm_output import QasmUGate q0 = cirq.NamedQubit('q') u2_gate = QasmUGate(0.5, 0, 1) # The angles are normalized to the range [0, 2) half_turns circuit = cirq.Circuit(u2_gate(q0))