Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Instruction issued to measure in storage qubit for NV platform #69

Open
wkozlowski-tudelft opened this issue Apr 9, 2024 · 0 comments

Comments

@wkozlowski-tudelft
Copy link

wkozlowski-tudelft commented Apr 9, 2024

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

netqasm/netqasm/sdk/builder.py

Lines 1127 to 1128 in c1d57f9

# 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant