qrunch.quantum.measurement_caches
Module containing measurement caches used by samplers and estimators.
Classes
|
Class for creating full measurement caches. |
Class for creating measurement caches. |
|
|
Class for creating a minimal measurement cache. |
|
Class for creating a noise-reducing measurement cache. |
- class MeasurementCacheCreator
Bases:
objectClass for creating measurement caches.
- static minimal_measurement_cache() MinimalMeasurementCacheCreator
Narrow the cache to a minimal measurement cache.
This cache saves measurements taken on a circuit and full expectation values measured on circuits. The measurements are not used to calculate expectation values, i.e., if the exact operator has not been measured before it will not be cached.
- Return type:
MinimalMeasurementCacheCreator
- static noise_reducing_measurement_cache() NoiseReducingMeasurementCacheCreator
Narrow the cache to a noise-reducing measurement cache.
This cache saves measurements taken on a circuit. Expectation values are cached indirectly through the measurements. This cache does not limit the number of measurements instead it aims to reduce the amount of shots noise. Thus, a uncached loaded pauli sum will contain as many pauli strings as the original.However, the cached measurements are used as additional measurements to lower the shot noise on all pauli strings.
This is optimal when combined with BEAST-VQE where 2-3 groups are required for every measurement irrespective of what caching is done.
- Return type:
NoiseReducingMeasurementCacheCreator
- measurement_cache_creator() MeasurementCacheCreator
Create a measurement cache.
Measurement caches are used by samplers and estimators to cache measurements and expectation values to avoid redundant calculations. The same measurement cache can be provided to a sampler and a backend estimator, maximizing the reuse of measurements.
- Return type:
Modules
Module containing a full measurement cache. |
|
Module containing protocols for measurement caching. |
|
Module containing a minimal measurement cache. |
|
Module containing a noise reducing measurement cache. |