Simulate graph states in the browser
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.

21 lines
434B

  1. """
  2. Makes a dummy post to the test server
  3. """
  4. import requests
  5. import json
  6. import abp
  7. def test_graph():
  8. N = 100
  9. g = abp.NXGraphState(range(N), vop="hadamard")
  10. for i in range(N-1):
  11. g.act_cz(i, i+1)
  12. g.layout()
  13. return g
  14. if __name__ == '__main__':
  15. data = json.dumps(test_graph().to_json(stringify=False))
  16. r = requests.post("http://localhost:5000/graph", data=data)
  17. print r.status_code, r.content