def test_u1(self): """Test u1 gate.""" with pulse.build(self.backend) as schedule: pulse.u1(np.pi, 0) reference_qc = circuit.QuantumCircuit(1) reference_qc.u1(np.pi, 0) reference = compiler.schedule(reference_qc, self.backend) self.assertEqual(schedule, reference)
def test_u1(self): """Test u1 gate.""" with pulse.build(self.backend) as schedule: pulse.u1(np.pi, 0) reference_qc = circuit.QuantumCircuit(1) reference_qc.append(circuit.library.U1Gate(np.pi), [0]) reference = compiler.schedule(reference_qc, self.backend) self.assertScheduleEqual(schedule, reference)
def test_u1(self): """Test u1 gate.""" with pulse.build(self.backend) as schedule: with pulse.transpiler_settings(layout_method="trivial"): pulse.u1(np.pi / 2, 0) reference_qc = circuit.QuantumCircuit(1) reference_qc.append(circuit.library.U1Gate(np.pi / 2), [0]) reference = compiler.schedule(reference_qc, self.backend) self.assertScheduleEqual(schedule, reference)