コード例 #1
0
    def test_apply(self):
        sdm = MagicMock()
        sdm.apply_ptm = MagicMock()

        apd = circuit.AmpPhDamp("A", 0, 1, 10, 5)

        apd.apply_to(sdm)

        sdm.apply_ptm.assert_called_once_with("A", ptm=ANY)
コード例 #2
0
 def test_init(self):
     apd = circuit.AmpPhDamp("A", 0, 1, 10, 10)
     assert apd.time == 0
     assert apd.duration == 1
     assert apd.involves_qubit("A")
     assert not apd.is_measurement