mqt.core.plugins.qiskit.provider¶
QDMI Provider for Qiskit integration.
This module provides a provider interface for discovering and accessing QDMI devices through Qiskit’s BackendV2 interface.
Module Contents¶
- class QDMIProvider(*, token: str | None = None, auth_file: str | None = None, auth_url: str | None = None, username: str | None = None, password: str | None = None, project_id: str | None = None, **session_kwargs: str)[source]¶
Provider for QDMI devices accessed via FoMaC.
This provider discovers and manages QDMI devices that are available through the FoMaC layer. It provides a Qiskit-idiomatic interface for device discovery and backend instantiation.
Examples
List all available backends:
>>> from mqt.core.plugins.qiskit import QDMIProvider >>> provider = QDMIProvider() >>> for backend in provider.backends(): ... print(f"{backend.name}: {backend.target.num_qubits} qubits")
Get a specific backend by name:
>>> backend = provider.get_backend("MQT Core DDSIM QDMI Device")
Create a provider with authentication:
>>> provider = QDMIProvider(token="my_token") >>> # or with username and password >>> provider = QDMIProvider(username="user", password="pass")
- backends(name: str | None = None) list[QDMIBackend][source]¶
Return all available backends, optionally filtered by name substring.
- Parameters:
name – If provided, return only backends whose name contains this substring.
- Returns:
List of QiskitBackend instances. Empty list if name specified but not found.
Examples
Get all backends:
>>> provider = QDMIProvider() >>> all_backends = provider.backends()
Filter backends by name substring:
>>> na_backends = provider.backends(name="NA") # matches "MQT NA Default QDMI Device" >>> qdmi_backends = provider.backends(name="QDMI") # matches all devices with "QDMI" in name
- get_backend(name: str) QDMIBackend[source]¶
Get a single backend by name.
- Parameters:
name – Name of the backend to retrieve.
- Returns:
QiskitBackend instance.
- Raises:
ValueError – If no matching backend found.
Examples
Get a specific backend:
>>> provider = QDMIProvider() >>> backend = provider.get_backend("MQT Core DDSIM QDMI Device")