|View source on GitHub|
Extracts a minimal set of characterization requests necessary to characterize given circuits.
cirq_google.calibration.prepare_characterization_for_circuits_moments( circuits: List[cirq.Circuit], options: PhasedFSimCalibrationOptions[RequestT], *, gates_translator: Callable[[cirq.Gate], Optional[PhaseCalibratedFSimGate]] =
cirq_google.calibration.try_convert_syc_or_sqrt_iswap_to_fsim, merge_subsets: bool = True, initial: Optional[Sequence[RequestT]] = None, permit_mixed_moments: bool = False ) -> Tuple[List[CircuitWithCalibration], List[RequestT]]
This prepare method works on moments of the circuit and assumes that all the two-qubit gates to calibrate are not mixed with other gates in a moment. The method groups together moments of similar structure to minimize the number of characterizations requested.
The circuit can only be composed of single qubit operations, wait operations, measurement operations and operations supported by gates_translator.
See also prepare_characterization_for_moments that operates on a single circuit.
|IncompatibleMomentError when circuit contains a moment with operations other than the operations matched by gates_translator, or it mixes a single qubit and two qubit gates.|