Skip to content

Unexpected INI instruction issued after reversing creation and receiving in SDK application #43

@qraa

Description

@qraa

I'm trying to run a NetQASM SDK application listed below. However, when executing the application, an unexpected INI instruction is issued on both the client and the server before continuing sending and receiving in inverted fashion, as can be seen in the compiled subroutines attached.

Client application

...
create_1x10_outcomes = connection.new_array(10)
def post_create(_, qubit, pair):
    qubit.measure(create_1x10_outcomes.get_future_index(pair))
epr_socket.create_keep(10, sequential=True, post_routine=post_create)
connection.flush()

# Request size 1, server calls create
epr = epr_socket.recv_keep(1)[0]
create_1x1_outcome_reverse = epr.measure()
connection.flush()
...

Server application

...
create_1x10_outcomes = context.connection.new_array(10)
def post_create(_, qubit, pair):
    qubit.measure(create_1x10_outcomes.get_future_index(pair))
epr_sockets.recv_keep(10, sequential=True, post_routine=post_create)
connection.flush()

# Request size 1, server calls create
epr = epr_socket.create_keep(1)[0]
create_1x1_outcome_reverse = epr.measure()
connection.flush()
...

compiled_subroutines.txt

I am running NetQASM v0.12.1 on python v3.9.2

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