qrunch.quantum.backends.random_backend
Module with implementation of a random backend for benchmarking purposes.
Classes
A backend that generates random measurement results for benchmarking purposes. |
|
Options for the random backend. |
- class RandomBackend
Bases:
BackendA backend that generates random measurement results for benchmarking purposes.
- __init__(options: RandomBackendOptions = RandomBackendOptions(seed=None)) None
Initialize the random backend.
- Parameters:
options (RandomBackendOptions)
- Return type:
None
- property name: str
Name of the backend.
- run(circuits: Circuit | Sequence[Circuit], shots: int | None) SimulatedJob
Run circuit on the backend.
- Parameters:
- Return type:
- supports_shots_equals_none() bool
Return whether the backend supports shots = None.
- Return type:
bool
- class RandomBackendOptions
Bases:
objectOptions for the random backend.
All fields are immutable (
frozen=True) so an instance can be safely reused.- Parameters:
seed – Seed for the random number generator. If None, a random seed will be used. (default=None)
- __init__(seed: int | None = None) None
- Parameters:
seed (int | None)
- Return type:
None
- seed: int | None = None