QMProvider¶
- class QMProvider(state_folder_path: str | None = None, quam_cls: Type[Quam] | None = None)[source][source]¶
Bases:
objectProvider for Quantum Machines hardware using a local QuAM state.
QMProvideris hardware-agnostic: users supply their ownQuamRootsubclass (viaquam_cls) and their ownQMBackendsubclass (viabackend_cls) to match their specific hardware. This avoids a hard dependency on any particular architecture (e.g. flux-tunable transmons) and lets any QuAM-compatible machine be used with the Qiskit stack.If
quam_clsis omitted the provider falls back toFluxTunableQuamfrom quam-builder for backward compatibility, but users are encouraged to provide their own class.Example:
from qiskit_qm_provider import QMProvider from my_lab.quam import MyCustomQuam from my_lab.backend import MyBackend provider = QMProvider( state_folder_path="/path/to/quam/state", quam_cls=MyCustomQuam, ) backend = provider.get_backend(backend_cls=MyBackend)
- get_backend(machine: Quam | None = None, backend_cls: Type[QMBackend] | None = None, **backend_options) QMBackend[source][source]¶
Create a
QMBackend(or subclass) from a QuAM machine.Users should pass
backend_clsto select the backend implementation that matches their hardware. When omitted the baseQMBackendis used, which provides the full circuit-to-QUA pipeline but no hardware-specific channel mapping or initialization macro.- Parameters:
machine – A pre-loaded
QuamRootinstance. IfNone, the provider loads one viaget_machine().backend_cls – The
QMBackendsubclass to instantiate. Common choices includeFluxTunableTransmonBackend(for flux-tunable transmon setups) or a user-defined subclass. Defaults toQMBackend.**backend_options – Forwarded to the backend constructor. Typical keys:
qmm,name,shots,compiler_options,simulate,memory,skip_reset,meas_level,meas_return.
- Returns:
A
QMBackendinstance (or the requested subclass).