Skip to content

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

@wkozlowski-tudelft

Description

@wkozlowski-tudelft

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions