[Bug] Unknown backend_name leaks ModuleNotFoundError instead of a clear ValueError
Maintainers usually reply within 2 days
@Asterisk-Hunter is already working on this.
Since Oct 28, 2026.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 62/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- python
- Domain
- quantum-computing
Research direction
Start in QuMat.__init__ in qumat/qumat.py, where the backend module path is built from backend_name and passed to importlib.import_module. Reproduce with an unsupported name such as "pennylane" to see the leaked ModuleNotFoundError. Done when an unknown name raises a ValueError naming it and listing qiskit, cirq and amazon_braket, with a new test in testing/qumat/ covering that path. Two earlier linked PRs were closed without merging, so check why before starting.
Written by the indexing model from the issue text.
Description
What
QuMat.__init__ builds the backend module path from backend_name and imports it with importlib.import_module. When the name is not one of the supported backends, the ModuleNotFoundError from the import leaks out instead of a clear error:
from qumat import QuMat
QuMat({"backend_name": "pennylane", "backend_options": {}})
# ModuleNotFoundError: No module named 'qumat.pennylane_backend'
Actual result: ModuleNotFoundError pointing at an internal module name.
Expected result: a ValueError that names the unsupported backend and lists the supported ones (qiskit, cirq, amazon_braket), for example:
ValueError: Unsupported backend_name 'pennylane'. Supported backends: amazon_braket, cirq, qiskit
Where: qumat/qumat.py (QuMat.__init__). Add a test in testing/qumat/ for the error path.
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] Reusing a parameter name on two gates fails on Qiskit only (name conflict adding parameter)Possibly taken @Imad2702 claimed this 50 days ago. Openbug enhancement good-first-issue qumat
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
apache/mahout#1509 · 2 comments ·
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 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