Beispiel #1
0
 def test_yplus(self):
     p = yplus(qtype='dop')
     assert_allclose(tr(p @ pauli('y')), 1.0)
Beispiel #2
0
 def test_permute_ket(self):
     a = qu.up() & qu.plus() & qu.yplus()
     b = qu.permute(a, [2, 2, 2], [2, 0, 1])
     assert_allclose(b, qu.yplus() & qu.up() & qu.plus())
Beispiel #3
0
 def test_permute_ket(self):
     a = up() & plus() & yplus()
     b = permute(a, [2, 2, 2], [2, 0, 1])
     assert_allclose(b, yplus() & up() & plus())