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.

19 lines
606B

  1. import numpy as np
  2. import os, json
  3. decompositions = ("xxxx", "xx", "zzxx", "zz", "zxx", "z", "zzz", "xxz",
  4. "xzx", "xzxxx", "xzzzx", "xxxzx", "xzz", "zzx", "xxx", "x",
  5. "zzzx", "xxzx", "zx", "zxxx", "xxxz", "xzzz", "xz", "xzxx")
  6. directory = os.path.dirname(os.path.abspath(__file__))
  7. where = os.path.join(directory, "tables/")
  8. os.chdir(where)
  9. unitaries = np.load("unitaries.npy")
  10. conjugation_table = np.load("conjugation_table.npy")
  11. times_table = np.load("times_table.npy")
  12. cz_table = np.load("cz_table.npy")
  13. with open("by_name.json") as f:
  14. by_name = json.load(f)