Exemplo n.º 1
0
    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)
Exemplo n.º 2
0
    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)
Exemplo n.º 3
0
    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)