Skip to content

simulator_stabilizer rejecting circuits containing cx gates #1475

Open
@cqc-melf

Description

@cqc-melf

Environment

  • Qiskit version: 0.45, 0.46, 1.0.0 and 1.0.1
  • Python version: 3.10 and 3.11
  • Operating system: linux

What is happening?

This error shows up when updating qiskit-ibm-runtime from 0.19 to 0.20 or 0.21
(So the error is only showing up with qiskit-ibm-runtime==0.20 and qiskit-ibm-runtime==0.21

simulator_stabilizer is rejecting circuits containing cx gates, the error messages shown is:
qiskit.transpiler.exceptions.TranspilerError: "The number of qubits for Instruction(name='cx', num_qubits=2, num_clbits=0, params=[]) does not match the number of qubits in the properties dictionary: (0,)"

How can we reproduce the issue?

    num_qubits = 2
    qc = QuantumCircuit(num_qubits)
    qc.h(0)
    qc.sx(1)
    qc.cx(0, 1)
    qc.measure_all()

    _service = QiskitRuntimeService(
        channel="ibm_quantum",
        instance="ibm-q/open/main",
        token="<insert your token>",
    )
    _session = Session(service=_service, backend="simulator_stabilizer")

    sampler = Sampler(session=_session)
    job = sampler.run(circuits=qc)
    job.result()

What should happen?

The circuit should run and no error should be shown

Any suggestions?

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingserver actionNeed actions from the server side

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions