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.

39 line
845B

  1. from abp import GraphState, clifford
  2. from anders_briegel import graphsim
  3. import numpy as np
  4. from tqdm import tqdm
  5. import dummy
  6. import itertools as it
  7. import networkx as nx
  8. #def all_simple_graphs(filename="tests/graph5.g6"):
  9. #""" Generate all possible simple graphs """
  10. #with open(filename) as f:
  11. #for line in tqdm(f):
  12. #yield nx.parse_graph6(line.strip())
  13. #def rotated(simple_graphs):
  14. #for g in simple_graphs:
  15. #for r in it.product(*[range(24)]*2):
  16. #yield g, r
  17. #print len(list(rotated(all_simple_graphs())))
  18. #N = 3
  19. #m = {1: graphsim.lco_X, 2: graphsim.lco_Y, 3: graphsim.lco_Z}
  20. #measurements = (3, 2, 1)
  21. #outcomes = (0, 1)
  22. #local_ops = it.combinations_with_replacement(range(24), N)
  23. #edge_patterns =
  24. #print list(local_ops)
  25. #print len(list(local_ops))
  26. #print list(edge_patterns)