Browse Source

Add some more sane tests

master
Pete Shadbolt 8 years ago
parent
commit
27c79d4e20
1 changed files with 3 additions and 0 deletions
  1. +3
    -0
      tests/test_clifford.py

+ 3
- 0
tests/test_clifford.py View File

@@ -75,4 +75,7 @@ def test_cz_table_is_symmetric():

def test_cz_table_makes_sense():
""" Test the CZ table is symmetric """
hadamard = clifford.by_name["hadamard"]
assert all(clifford.cz_table[0, 0, 0] == [1, 0, 0])
assert all(clifford.cz_table[1, 0, 0] == [0, 0, 0])
assert all(clifford.cz_table[0, hadamard, hadamard] == [0, hadamard, hadamard])

Loading…
Cancel
Save