This bug was filed against version 0.16
The following SDK code:
q = Qubit(context.connection)
epr = context.epr_sockets[0].create_keep()[0]
q.cnot(epr)
q.H()
m2 = epr.measure()
m1 = q.measure()
context.connection.flush()
Produces roughly the following pseudo-code:
Initialise storage qubit
Entangle
...Transpiled CNOT...
...Transpiled H...
Measure communication qubit
Measure storage qubit
But as per
|
# If compiling for NV, only virtual ID 0 can be used to measure a qubit. |
|
# So, if this qubit is already in use, we need to move it away first. |
, the state in the storage qubit should be first moved to the communication qubit.
Interestingly, swapping the order of measurement between epr and q then produces code that tries to move the epr to a storage qubit.
This bug was filed against version 0.16
The following SDK code:
Produces roughly the following pseudo-code:
But as per
netqasm/netqasm/sdk/builder.py
Lines 1127 to 1128 in c1d57f9
Interestingly, swapping the order of measurement between
eprandqthen produces code that tries to move theeprto a storage qubit.