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.

20 lines
403B

  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 = 1000
  9. g = abp.GraphState(range(N), vop="hadamard")
  10. for i in range(N-1):
  11. g.act_cz(i, i+1)
  12. return g
  13. if __name__ == '__main__':
  14. data = json.dumps(test_graph().to_json())
  15. r = requests.post("http://localhost:5000/graph", data=data)
  16. print r.status_code, r.content