Skip to content

[Bug] quantum_teleportation.py example uses invalid backend_name "qiskit_simulator" #1317

@ryankert01

Description

@ryankert01

What

examples/qumat/quantum_teleportation.py:22 sets "backend_name": "qiskit_simulator", but Qumat's backend loader (qumat.QuMat.__init__) does import_module(f".{backend_name}_backend", package="qumat") — there is no qumat.qiskit_simulator_backend module. The wheel only registers qiskit_backend, cirq_backend, and amazon_braket_backend, so running the example terminates immediately with ModuleNotFoundError.

Reproduces deterministically on Python 3.10, 3.11, and 3.12 with qumat==0.6.0rc1 installed from PyPI (found while testing #1315).

Reproduction:

pip install --pre "qumat==0.6.0rc1"
python examples/qumat/quantum_teleportation.py

Output:

Traceback (most recent call last):
  File ".../examples/qumat/quantum_teleportation.py", line 29, in <module>
    quantum_computer = QuMat(backend_config)
  File ".../qumat/qumat.py", line 70, in __init__
    self.backend_module: ModuleType = import_module(
        ...
ModuleNotFoundError: No module named 'qumat.qiskit_simulator_backend'

Expected: the example runs and prints the teleportation result, matching the behaviour of the sibling examples/qumat/simple_example.py, which uses "backend_name": "qiskit" and works on all three Python versions.

Suggested fix: change line 22 to "backend_name": "qiskit" (the value documented in the QuMat.__init__ docstring at qumat/qumat.py:44). The file hasn't been touched since #1085 (2026-02-24); the stale name likely predates the backend-module rename.

Environment

  • OS: Linux 5.15 / x86_64 (the error is a pure Python import failure, so any platform is affected)
  • Python version: 3.10.12, 3.11.13, 3.12.11 (reproduced on all three)
  • Qumat version: 0.6.0rc1

Metadata

Metadata

Assignees

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions