qrisp_to_cirq raises on circuits containing a barrier
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 76/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- python
- Domain
- backend, quantum-computing
Research direction
Start by locating the qrisp_to_cirq converter and its tests, then inspect how it passes circuit instructions to qrisp's to_cirq(). Filter out barrier instructions before conversion, as described in the issue. Verify that the supplied two-qubit example converts to Cirq and that the remaining gates are preserved.
Written by the indexing model from the issue text.
Description
Problem
qrisp_to_cirq raises on any qrisp circuit that contains a barrier. qrisp's Cirq converter has no mapping for barrier and can't decompose it. qrisp_to_pytket fails on barriers too, so transpile() has no qrisp → cirq path that works.
import qrisp
import qbraid
qc = qrisp.QuantumCircuit(2)
qc.h(0)
qc.barrier(qc.qubits)
qc.cx(0, 1)
qbraid.transpile(qc, "cirq")
ProgramConversionError: Failed to convert 'qrisp' to 'cirq' due to the following error(s):
Conversion qrisp -> cirq failed due to exception raised while converting from 'qrisp'.
ValueError: The following gates could not be decomposed into elementary instructions: barrier. ...
Conversion qrisp -> pytket -> cirq failed due to exception raised while converting from 'qrisp'.
Exception: Could not convert operation barrier to PyTket
The qasm2 route fails separately, on the openqasm3 1.0.2 breakage (qBraid/pyqasm#472).
qrisp 0.9.10, cirq 1.6.1. Found while reviewing #1536, which fixes cy, u3 and other gates on the same path, but not barriers.
Expected
The barrier is dropped, since Cirq has no barrier, and the rest of the circuit converts. In qrisp_to_cirq that means filtering barrier instructions out before calling to_cirq().
- Dominant language
- Python
- Stars
- 117
- Forks
- 66
- Avg merge
- 1d 10h
- Merged PRs (30d)
- 22
Getting set up
Starts the project's dev container in your browser, under your own GitHub account.
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from qBraid/qBraid
-
Test order: test_run_forbidden_kwarg leaves Mock registered as a program typePossibly taken @VanshajPoonia claimed this 3 days ago. Openbug 🐛 testing 🧪
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
Maintainers usually reply within 1 day
-
bug 🐛
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
Maintainers usually reply within 1 day
-
enhancement ✨ results 📋
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
Maintainers usually reply within 1 day
-
Pasqal: a {"sequence_builder": ...} payload sent as a string reaches Pasqal still wrappedPossibly taken @ryanhill1 claimed this 21 days ago. Openbug 🐛
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
Maintainers usually reply within 1 day
Similar issues
-
auto-reported bug
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
Maintainers usually reply within 1 day
-
stix-atlas.json: the same relationship id is used for several different mitigates relationshipsOpen
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
-
backend bug
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
nolte/kamerplanter#3193 ·
Maintainers usually reply within 1 day
-
soup prune-prompt exits 1 after writing its output on a file over 100,000 rows, and reports a capped row count otherwisePossibly taken @abdulwaarith0 claimed this today. Openneeds-triage
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
MakazhanAlpamys/Soup#3690 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day