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
516B

  1. class Stabilizer(object):
  2. def __init__(self, g):
  3. """ Construct a Stabilizer from a Graphstate """
  4. pass
  5. def to_stabilizer(self):
  6. """ Get the stabilizer tableau. Work in progress!
  7. """
  8. for a, b in it.product(self.node, self.node):
  9. output[a]["sign"] = 1
  10. if a == b:
  11. output[a][b] = "X"
  12. elif a in self.adj[b]:
  13. output[a][b] = "Z"
  14. else:
  15. output[a][b] = "I"
  16. return output