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.

22 lines
503B

  1. import qi
  2. import numpy as np
  3. import tables
  4. import tqdm
  5. # TODO: ensure that Constraint 1 is met. i.e.
  6. # if C1 is in Z, choose C1' such that it is in Z
  7. bond = qi.cz * np.kron(qi.plus, qi.plus)
  8. no_bond = np.kron(qi.plus, qi.plus)
  9. for u in tables.unitaries:
  10. psi = qi.cz*np.kron(u, qi.ha)*bond
  11. print u
  12. for bb in bond, no_bond:
  13. for a in tables.unitaries:
  14. for b in tables.unitaries:
  15. if np.allclose(np.kron(a, b)*bb, psi):
  16. print "match"