quri_parts.core.sampling package#
- MeasurementCounts#
- MeasurementCounts represents count statistics of repeated measurements of a quantum circuit. Keys are observed bit patterns encoded in integers and values are counts of observation of the corresponding bit patterns. - alias of - Mapping[- int,- Union[- int,- float]]
- ConcurrentSampler#
- ConcurrentSampler represents a function that samples specified (non-parametric) circuits concurrently. - alias of - Callable[[- Iterable[- tuple[- NonParametricQuantumCircuit,- int]]],- Iterable[- Mapping[- int,- Union[- int,- float]]]]
- create_sampler_from_sampling_backend(backend)#
- Create a simple - Samplerusing a- SamplingBackend.- Parameters:
- backend (SamplingBackend) – 
- Return type:
- core.sampling.Sampler 
 
- create_concurrent_sampler_from_sampling_backend(backend)#
- Create a simple - ConcurrentSamplerusing a- SamplingBackend.- Parameters:
- backend (SamplingBackend) – 
- Return type:
- core.sampling.ConcurrentSampler 
 
- create_sampler_from_concurrent_sampler(concurrent_sampler)#
- Parameters:
- concurrent_sampler (core.sampling.ConcurrentSampler) – 
- Return type:
- core.sampling.Sampler 
 
- class PauliSamplingSetting(pauli_set, n_shots)#
- Bases: - NamedTuple- Parameters:
- pauli_set (core.operator.pauli.CommutablePauliSet) – 
- n_shots (int) – 
 
 - pauli_set: CommutablePauliSet#
- Alias for field number 0 
 - n_shots: int#
- Alias for field number 1 
 
- PauliSamplingShotsAllocator#
- PauliSamplingShotsAllocator represents a function that distributes a given number of sampling shots to each - CommutablePauliSet.- alias of - Callable[[- Operator,- Collection[- Set[- PauliLabel]],- int],- Collection[- PauliSamplingSetting]]
- WeightedSamplingShotsAllocator#
- WeightedSamplingShotsAllocator represents a function that distributes a given number of sampling shots based on a set of weights. - alias of - Callable[[- Sequence[- complex],- int],- Sequence[- int]]