Skip to content

Emitting circuit with multiple call to stdlib.cx errors #506

@david-pl

Description

@david-pl

Courtesy of @jon-wurtz

from bloqade import squin
from bloqade.cirq_utils import emit_circuit

@squin.kernel
def steane_zero_prep():
    qbs = squin.qubit.new(7)
    squin.gate.h(qbs[1])
    squin.gate.h(qbs[2])
    squin.gate.h(qbs[3])
    squin.gate.cx(qbs[1], qbs[0])
    squin.gate.cx(qbs[3], qbs[5])
    squin.gate.cx(qbs[2], qbs[6])
    squin.gate.cx(qbs[1], qbs[4])
    squin.gate.cx(qbs[2], qbs[0])
    squin.gate.cx(qbs[3], qbs[6])
    squin.gate.cx(qbs[1], qbs[5])
    squin.gate.cx(qbs[6], qbs[4])

circuit = emit_circuit(steane_zero_prep)

This errors with InterpreterError: SSAValue <ResultValue[ControlOp[XOp]] op, uses: 1> not found.

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions