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.

20 lignes
371B

  1. from abp.graphstate import GraphState
  2. from anders_briegel import graphsim
  3. def test_1():
  4. N=10
  5. a = graphsim.GraphRegister(N)
  6. b = GraphState()
  7. for i in range(N):
  8. a.hadamard(i)
  9. b.add_vertex(i)
  10. b.act_hadamard(i)
  11. for i in range(N-1):
  12. a.cphase(i, i+1)
  13. b.act_cz(i, i+1)
  14. assert a.get_adj_list() == b.adj_list()