Runs calibration requests on the Engine.
cirq_google.calibration.run_calibrations(
calibrations: Sequence[cirq_google.calibration.PhasedFSimCalibrationRequest
],
sampler: Union[cirq_google.engine.AbstractEngine
, cirq.Sampler],
processor_id: Optional[str] = None,
max_layers_per_request: int = 1,
progress_func: Optional[Callable[[int, int], None]] = None
) -> List[cirq_google.calibration.PhasedFSimCalibrationResult
]
Args |
calibrations
|
List of calibrations to perform described in a request object.
|
sampler
|
cirq_google.Engine or cirq.Sampler object used for running the calibrations. When
sampler is cirq_google.Engine or cirq_google.ProcessorSampler object then the
calibrations are issued against a Google's quantum device. The only other sampler
supported for simulation purposes is cirq_google.PhasedFSimEngineSimulator.
|
processor_id
|
Used when sampler is cirq_google.Engine object and passed to
cirq_google.Engine.run_calibrations method.
|
max_layers_per_request
|
Maximum number of calibration requests issued to cirq.Engine at a
single time. Defaults to 1.
|
progress_func
|
Optional callback function that might be used to report the calibration
progress. The callback is called with two integers, the first one being a number of
layers already calibrated and the second one the total number of layers to calibrate.
|
Returns |
List of PhasedFSimCalibrationResult for each requested calibration.
|
Raises |
ValueError
|
If less than one layers was requested to be calibrated, if calibrations of
different types was supplied, if no processor_id or gate_set is provided, or
if the calibration / sampler combo is not supported.
|