Simulate graph states in the browser

test.py 302B

12345678910111213
  1. import requests, json, abp
  2. # Make a new graph and position the nodes
  3. g = abp.NXGraphState(range(N))
  4. g.layout()
  5. # Serialize
  6. data = json.dumps(test_graph().to_json())
  7. # Post to the server
  8. URL = "https://abv.peteshadbolt.co.uk/grey-johnny-lima-saturn"
  9. requests.post("{}/graph".format(URL), data=data)