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:
- validate_shots_type(shots_type: Type[int | None]) list[str]
Validate that the sampler supports the given shots type. Return a list of error messages if not supported.
- Parameters:
shots_type (Type[int | None])
- Return type:
list[str]
- 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