Skip to content

[FEATURE] Add option to qasm3_to_qir to omit barriers in conversion #194

@ryanhill1

Description

@ryanhill1

Feature Description

The qBraid QIR simulator does not currently support barriers, and qiskit.QuantumCircuit.measure_all() implicitly adds barriers. This means that in the qBraid-SDK, the following code currently fails:

from qbraid import QbraidProvider
from qiskit import QuantumCircuit

circuit = QuantumCircuit(2)

circuit.h(0)
circuit.cx(0, 1)
circuit.measure_all()

provider = QbraidProvider()
device = provider.get_device("qbraid_qir_simulator")
job = device.run(circuit, shots=100)

It would be nice if we could somehow remove barriers from the pyqir.Module after conversion, or add an optional argument to qasm3_to_qir that allows one to exclude barriers from the output of the conversion.

Implementation (Optional)

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions