Explorar el Código

Multiple clients viewing / editing same state.

master
Pete Shadbolt hace 7 años
padre
commit
f94d3eabd3
Se han modificado 2 ficheros con 3 adiciones y 2 borrados
  1. +2
    -1
      bin/abpserver
  2. +1
    -1
      examples/visualization/lattice_2d.py

+ 2
- 1
bin/abpserver Ver fichero

@@ -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 Ver fichero

@@ -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)



Cargando…
Cancelar
Guardar