qrunch.quantum.samplers.memory_restricted_sampler

Module containing the a memory restricted estimator.

Classes

MemoryRestrictedSampler

Class for sampling using the memory restricted sampler.

class MemoryRestrictedSampler

Bases: object

Class for sampling using the memory restricted sampler.

__init__(options: MemoryRestrictedSimulatorOptions | None = None) None

Initiate an instance of the MemoryRestrictedEstimator.

Parameters:

options (MemoryRestrictedSimulatorOptions | None) – Options to be used in the MemoryRestrictedSampler.

Return type:

None

run(circuits: MeasurementCircuit, shots: int | None) QuantumMeasurement
run(circuits: Sequence[MeasurementCircuit], shots: int | None) list[QuantumMeasurement]

Start job for sampling on the given circuits a given number of times.

Parameters:
  • circuits – Measurement circuit or sequence of circuits to be sampled.

  • shots – Number of measurements to perform.

supports_shots_equals_none() bool

Return whether the sampler supports shots = None.

Return type:

bool