Skip to content

CNOT primitive gets modified at compiling #165

Description

@dieris

After compiling a sequence using the PulsePrimitive.CNOT, triggers and gate markers added at the compiling step modify the CNOT function on the same qubits permanently

Example, before compiling:
CNOT(q1,q4):

CompoundGate([echoCR_first_half(CR1), X(q1), echoCR_second_half(CR1), X(q1), Z90m(q1, frameChange=1.5707963267948966)+Id(q1, amp=0, phase=0, frameChange=0)*X90m(q4)])

After compiling,
CNOT(q1,q4):

CompoundGate([echoCR_first_half(CR1), X(q1), echoCR_second_half(CR1), X(q1), Z90m(q1, frameChange=1.5707963267948966)+Id(q1, amp=0, phase=0, frameChange=0)*X90m(q4)*BLANK(q4-gate, amp=1, phase=0, frameChange=0, length=1e-07)*Id(CR1, length=1e-07)*Id(slave_trig, length=1e-07)])

This can be prevented by removing the @_memoize decorator from both CNOT and the specific implementation CNOT_CR.

This happens in both master and https://github.com/BBN-Q/QGL/tree/feature/CNOT-imp.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

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