Anders and Briegel in Python
25개 이상의 토픽을 선택하실 수 없습니다. Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

15 lines
337B

  1. from abp.graphstate import GraphState
  2. from abp.util import xyz
  3. import networkx as nx
  4. def simple_test():
  5. g = GraphState()
  6. g.add_node(0, position = xyz(10, 0, 0))
  7. g.add_node(1, position = xyz(1, 0, 0))
  8. g.act_hadamard(0)
  9. g.act_hadamard(1)
  10. g.act_cz(0, 1)
  11. print g.node[0]["position"]
  12. print nx.to_edgelist(g)