[Bug] Reusing a parameter name on two gates fails on Qiskit only (name conflict adding parameter)
Maintainers usually reply within 2 days
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 75/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- python
- Domain
- quantum-computing
Research direction
Start in qumat/qiskit_backend.py around lines 201 to 219, where the rotation-gate methods create a new qiskit.circuit.Parameter on every call, and compare it with how the Cirq and Braket backends handle the same parameter name. Reproduce with two apply_rx_gate calls using the same name and the Qiskit backend. Done when that sequence runs on all three backends and a cross-backend test binds one value and checks the counts or state vector.
Written by the indexing model from the issue text.
Description
What
Using the same parameter name on two gates works on Cirq and Braket but fails on Qiskit:
from qumat import QuMat
qc = QuMat({"backend_name": "qiskit", "backend_options": {"simulator_type": "aer_simulator", "shots": 100}})
qc.create_empty_circuit(2)
qc.apply_rx_gate(0, "t")
qc.apply_rx_gate(1, "t")
# qiskit: CircuitError: "name conflict adding parameter 't'"
# cirq: ok [Counter({3: 100})]
# amazon_braket: ok Counter({'11': 100})
Actual result: qiskit.circuit.exceptions.CircuitError: name conflict adding parameter 't'. The Qiskit backend creates a new qiskit.circuit.Parameter(name) on every gate call (qumat/qiskit_backend.py, around lines 201 to 219), and Qiskit treats two Parameter objects with the same name as a conflict.
Expected result: a parameter name refers to one symbolic parameter wherever it is used, on all three backends. Sharing an angle across gates is the normal case in variational circuits (for example a layer of Rx(theta) on every qubit).
How: cache one Parameter per name in the Qiskit backend (for example a dict on the backend state) and reuse it. Add a cross-backend test that applies the same parameter name to two gates, binds a value, and checks the counts or state vector on all three backends.
Environment
- OS: macOS 14 / Linux
- Python version: 3.12
- Qumat version: 0.6.0 (PyPI) and
mainat 2d94f8fbd
Part of the Apache Mahout hackathon at Community over Code Glasgow 2026 (Track A, Qumat). Comment here to claim it.
- Dominant language
- Rust
- Stars
- 2.3k
- Forks
- 1k
- Avg merge
- 2d 20h
- Merged PRs (30d)
- 7
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 apache/mahout
-
[Bug] Amazon Braket get_final_state_vector() changes the circuit, so execute_circuit() fails afterwardsPossibly taken @Howardisme claimed this 48 days ago. Openbug enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 80/100
apache/mahout#1538 · 1 comment ·
Maintainers usually reply within 2 days
-
[Bug] Cirq backend ignores the initialized simulator and creates its own cirq.Simulator()Possibly taken @Howardisme claimed this 49 days ago. Openbug enhancement good-first-issue qumat
Difficulty 2/5 1-3 hours Newbie friendliness 66/100
apache/mahout#1508 · 1 comment · 1 assignee ·
Maintainers usually reply within 2 days
-
[Bug] Unknown backend_name leaks ModuleNotFoundError instead of a clear ValueErrorPossibly taken @Asterisk-Hunter claimed this 37 days ago. Openbug enhancement good-first-issue qumat
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
apache/mahout#1506 · 5 comments ·
Maintainers usually reply within 2 days
-
bug docs enhancement question
Difficulty 5/5 Over a week Newbie friendliness 35/100
Maintainers usually reply within 2 days
-
Braket backend: circuit mutation and NumPy scalar parity bugsPossibly taken @andrewmusselman claimed this 45 days ago. Openbug enhancement
Difficulty 1/5 1-3 hours Newbie friendliness 1/100
Maintainers usually reply within 2 days
Similar issues
-
chat compiler P1
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
HerringtonDarkholme/hd-lang#2793 ·
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day
-
security-advisory
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
MinBZK/regelrecht#2173 ·
-
ci
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
jonathanong/no-mistakes#5804 ·
-
triage: failed
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
oxc-project/tsrs#1277 · 1 comment ·
Maintainers usually reply within 1 day