Anders and Briegel in Python
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.

23 lines
378B

  1. import abp
  2. import time
  3. psi = abp.GraphState(use_server = True)
  4. # This all happens instantly
  5. psi.add_qubits(xrange(10))
  6. psi.add_qubit(500)
  7. psi.add_qubit(10) # fails
  8. for i in range(10):
  9. psi.act_hadamard(i)
  10. for i in range(10, 100)
  11. psi.act_local_rotation(i, "hadamard")
  12. time.sleep(10)
  13. # The user does some stuff and edits the state
  14. print psi # We see the new qubits