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.

wtf.py 713B

8 vuotta sitten
8 vuotta sitten
8 vuotta sitten
8 vuotta sitten
8 vuotta sitten
1234567891011121314151617181920212223242526272829303132333435
  1. from abp import clifford, qi, GraphState
  2. from anders_briegel import graphsim
  3. import numpy as np
  4. import itertools as it
  5. """ This is an example of where we get a discrepancy """
  6. def pete():
  7. a = GraphState(xrange(3))
  8. a.act_hadamard(0)
  9. a.act_hadamard(1)
  10. a.act_hadamard(2)
  11. a.act_cz(0, 1)
  12. a.act_cz(0, 2)
  13. a.act_local_rotation(0, 1)
  14. a.act_local_rotation(2, 3)
  15. a.act_cz(1,2)
  16. return a.adj_list()
  17. def anders():
  18. b = graphsim.GraphRegister(3)
  19. b.hadamard(0)
  20. b.hadamard(1)
  21. b.hadamard(2)
  22. b.cphase(0, 1)
  23. b.cphase(0, 2)
  24. b.local_op(0, graphsim.LocCliffOp(1))
  25. b.local_op(2, graphsim.LocCliffOp(3))
  26. b.cphase(1,2)
  27. b.print_adj_list()
  28. pete()
  29. anders()