Anders and Briegel in Python
Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.

19 lignes
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