|View source on GitHub|
Compensates circuit moments against errors in zeta, chi and gamma angles.
cirq_google.calibration.make_zeta_chi_gamma_compensation_for_moments( circuit: Union[cirq.Circuit,
cirq_google.calibration.CircuitWithCalibration], characterizations: List[
cirq_google.calibration.PhasedFSimCalibrationResult], *, gates_translator: Callable[[cirq.Gate], Optional[PhaseCalibratedFSimGate]] =
cirq_google.calibration.phased_fsim.try_convert_gate_to_fsim, merge_subsets: bool = True, permit_mixed_moments: bool = False ) ->
This method creates a new circuit with a single-qubit Z gates added in a such way so that zeta, chi and gamma angles discovered by characterizations are cancelled-out and set to 0.
This function preserves a moment structure of the circuit. All single qubit gates appear on new moments in the final circuit.
||Circuit to compensate or instance of CircuitWithCalibration (likely returned from prepare_characterization_for_moments) whose mapping argument corresponds to the results in the characterizations argument. If circuit is passed then the method will attempt to match the circuit against a given characterizations. This step is can be skipped by passing the pre-calculated instance of CircuitWithCalibration.|
||List of characterization results (likely returned from run_calibrations). This should correspond to the circuit and mapping in the circuit_with_calibration argument.|
||Function that translates a gate to a supported FSimGate which will undergo characterization. Defaults to sqrt_iswap_gates_translator.|
||Whether to allow for matching moments which are subsets of the characterized moments. This option is only used when instance of Circuit is passed as circuit.|
||Whether to allow a mix of two-qubit gates with other irrelevant single-qubit gates.|
|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.|