Anders and Briegel in Python
Nelze vybrat více než 25 témat Téma musí začínat písmenem nebo číslem, může obsahovat pomlčky („-“) a může být dlouhé až 35 znaků.

19 řádky
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