Bläddra i källkod

Multiple clients viewing / editing same state.

master
Pete Shadbolt 7 år sedan
förälder
incheckning
f94d3eabd3
2 ändrade filer med 3 tillägg och 2 borttagningar
  1. +2
    -1
      bin/abpserver
  2. +1
    -1
      examples/visualization/lattice_2d.py

+ 2
- 1
bin/abpserver Visa fil

@@ -42,7 +42,8 @@ def process_edit(edit, client, server):
else:
pass

server.send_message(client, json.dumps(local_state.to_json()))
#server.send_message(client, json.dumps(local_state.to_json()))
server.send_message_to_all(json.dumps(local_state.to_json()))

def new_message(client, server, message):
if message.startswith("edit:"):


+ 1
- 1
examples/visualization/lattice_2d.py Visa fil

@@ -34,7 +34,7 @@ nodes, edges = lattice(square_unit_cell, (10, 10))

psi = GraphState()
for node in nodes:
psi.add_node(str(node), position=xyz(node[0], node[1]))
psi.add_qubit(str(node), position=xyz(node[0], node[1]))
psi.act_hadamard(str(node))
psi.update(0.1)



Laddar…
Avbryt
Spara