qrunch.quantum.samplers.sampler_creator
Main builder for all available samplers.
Functions
Start creating a sampler. |
Classes
Builder for all types of samplers available. |
- class SamplerCreator
Bases:
objectBuilder for all types of samplers available. Default is the ExcitationGateSampler.
- static backend() BackendSamplerCreator
Narrow the sampler type to a backend sampler.
A backend sampler uses one of the available quantum or simulation backends to run and sample from the quantum circuit.
- Return type:
- static create() ExcitationGateSampler
Create an instance of
ExcitationGateSampler.- Return type:
- static excitation_gate() ExcitationGateSamplerCreator
Narrow the sampler type to an excitation gate sampler.
This sampler uses Kvantify’s proprietary simulator optimized for circuits built from excitation gates, and thus tailored specifically for quantum chemistry applications. It is thus the recommended sampler for simulating quantum algorithms for quantum chemistry.
- Return type:
- static memory_restricted() MemoryRestrictedSamplerCreator
Narrow the sampler type to a memory restricted sampler.
This sampler is a memory-efficient version that uses Kvantify’s of proprietary simulator optimized for circuits built from excitation gates, and thus tailored specifically for quantum chemistry applications. It uses a configurable maximum amount of memory to enable simulation of larger systems than the excitation gate sampler, switching to a more memory-efficient mode when the limit is reached.
For small systems where the full state vector can be stored in memory, the excitation gate sampler will typically be faster, but for larger systems where the full state vector cannot be stored in memory, or is too slow, this simulator will enable simulation of larger systems at the cost of some precision.
- Return type:
- static tensor_network() TensorNetworkSamplerCreator
Narrow the sampler type to a tensor-network sampler.
This sampler uses tensor-network contraction together with scalable exact sampling strategies rather than forming the full state vector directly.
- Return type:
- sampler_creator() SamplerCreator
Start creating a sampler.
- Return type: