ffsim.qiskit.FfsimSampler¶
- class ffsim.qiskit.FfsimSampler(*, default_shots=1024, norb=None, nelec=None, global_depolarizing=0.0, seed=None)[source]¶
Bases:
BaseSamplerV2Implementation of the Qiskit Sampler primitive backed by ffsim.
Methods
run(pubs, *[, shots])Run and collect samples from each pub.
- run(pubs, *, shots=None)[source]¶
Run and collect samples from each pub.
- Parameters:
pubs (
Iterable[SamplerPub|QuantumCircuit|tuple[QuantumCircuit] |tuple[QuantumCircuit,Mapping[Parameter|str|tuple[Parameter|str,...],Buffer|_SupportsArray[dtype[Any]] |_NestedSequence[_SupportsArray[dtype[Any]]] |complex|bytes|str|_NestedSequence[complex|bytes|str]]] |tuple[QuantumCircuit,Mapping[Parameter|str|tuple[Parameter|str,...],Buffer|_SupportsArray[dtype[Any]] |_NestedSequence[_SupportsArray[dtype[Any]]] |complex|bytes|str|_NestedSequence[complex|bytes|str]],Integral|None]]) – An iterable of pub-like objects. For example, a list of circuits or tuples(circuit, parameter_values).shots (
int|None) – The total number of shots to sample for each sampler pub that does not specify its own shots. IfNone, the primitive’s default shots value will be used, which can vary by implementation.
- Return type:
- Returns:
The job object of Sampler’s result.