Anders and Briegel in Python
25개 이상의 토픽을 선택하실 수 없습니다. Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

16 lines
532B

  1. from anders_briegel import graphsim
  2. import itertools
  3. #//! replaces op by trans * op * trans^dagger and returns a phase,
  4. #/*! either +1 or -1 (as RightPhase(0) or RightPhase(2)) */
  5. #RightPhase conjugate (const LocCliffOp trans);
  6. def test_conjugation():
  7. """ Test that clifford.conugate() agrees with graphsim.LocCliffOp.conjugate """
  8. for i, j in it.product(range(4), range(24)):
  9. a = graphsim.LocCliffOp(i)
  10. b = graphsim.LocCliffOp(j)
  11. output = a.conjugate(b)
  12. print i, j, a.op, b.op, output.ph