cirq.google.run_zeta_chi_gamma_compensation_for_moments

Compensates circuit against errors in zeta, chi and gamma angles by running calibrations on

Used in the notebooks

Used in the tutorials

the engine.

The method calls prepare_floquet_characterization_for_moments to extract moments to characterize, run_calibrations to characterize them and make_zeta_chi_gamma_compensation_for_moments to compensate the circuit with characterization data.

circuit Circuit to characterize and calibrate.
engine cirq.google.Engine or cirq.google.PhasedFSimEngineSimulator object used for running the calibrations. When cirq.google.Engine then processor_id and gate_set arguments must be provided as well.
processor_id processor_id passed to engine.run_calibrations method. Can be None when cirq.google.PhasedFSimEngineSimulator is used as an engine.
gate_set Gate set to use for characterization request. Can be None when cirq.google.PhasedFSimEngineSimulator is used as an engine.
options Options that are applied to each characterized gate within a moment. Defaults to all_except_for_chi_options which is the broadest currently supported choice.
gates_translator Function that translates a gate to a supported FSimGate which will undergo characterization. Defaults to sqrt_iswap_gates_translator.
merge_subsets Whether to merge moments that can be characterized at the same time together.
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.

Tuple of:

  • Calibrated circuit together with its calibration metadata in CircuitWithCalibration object. The calibrated circuit has single-qubit Z gates added which compensates for the true gates imperfections. The moment to calibration mapping is updated for the new circuit so that successive calibrations could be applied.
  • List of characterizations results that were obtained in order to calibrate the circuit.