Providers¶
A Provider is discovery-only: a named owner of a
backend family, never an executor.
LocalProviderexposes the built-in local simulators (local_simulator,statevector,density_matrix, plus the deterministicmockstub).HardwareProviderdiscovers and owns a vendor integration (credentials, REST API). ItsHardwareBackendpresents the vendor job through theBackendcontract, so hardware jobs look identical to local ones. Vendor-specific concepts live in provider-specific classes (e.g.IBMQuantumCredentials,IonQCredentials) — never in the generic contracts.
from microquantum import LocalProvider, available_backends
provider = LocalProvider()
backends = provider.backends() # local simulator names
print(backends)
print(available_backends())
Backend registry¶
BackendRegistry is the discovery point:
register / get / has / names, a settable default, and
JSON serialization. Plans may name a backend by string; the runtime
resolves names through its attached registry (falling back to the module-level
default_registry).
from microquantum import BackendRegistry, MockBackend
registry = BackendRegistry()
registry.register(MockBackend(name="mock"))
print(registry.has("mock")) # True
print(registry.names()) # ['local_simulator', 'mock']
Hardware (optional boundary)¶
The microquantum.providers hardware layer is the optional
vendor-facing side of the BackendAdapter boundary
(Custom Backends); the SDK never imports vendor SDKs.