Anders and Briegel in Python
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

test_clifford.py 332B

8 jaren geleden
8 jaren geleden
8 jaren geleden
8 jaren geleden
8 jaren geleden
8 jaren geleden
8 jaren geleden
123456789101112
  1. import clifford as lc
  2. from numpy import *
  3. def test_identify_pauli():
  4. assert lc.identify_pauli(lc.px) == (1, "x")
  5. assert lc.identify_pauli(-lc.px) == (-1, "x")
  6. assert lc.identify_pauli(-lc.pz) == (-1, "z")
  7. def test_crap():
  8. assert allclose(lc.vop_unitaries[0], lc.i)
  9. assert allclose(lc.vop_unitaries[10], lc.h)