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.

26 lines
493B

  1. from abp import clifford, qi, GraphState
  2. from anders_briegel import graphsim
  3. import numpy as np
  4. import itertools as it
  5. a = GraphState()
  6. a.node = {0: {'vop': 1}, 1: {'vop': 0}, 2: {'vop': 3}}
  7. a.adj = {0: {1: {}, 2: {}}, 1: {0: {}}, 2: {0: {}}}
  8. a.act_cz(1,2)
  9. print a.adj_list()
  10. b = graphsim.GraphRegister(3)
  11. b.hadamard(0)
  12. b.hadamard(1)
  13. b.hadamard(2)
  14. b.cphase(0, 1)
  15. b.cphase(0, 2)
  16. b.local_op(0, graphsim.LocCliffOp(1))
  17. b.local_op(2, graphsim.LocCliffOp(3))
  18. b.cphase(1,2)
  19. b.print_adj_list()