|View source on GitHub|
Extracts a minimal set of Floquet characterization requests necessary to characterize given
cirq_google.calibration.prepare_floquet_characterization_for_moments( circuit: cirq.Circuit, options:
cirq_google.calibration.FloquetPhasedFSimCalibrationOptions= cirq_google.calibration.WITHOUT_CHI_FLOQUET_PHASED_FSIM_CHARACTERIZATION, 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[FloquetPhasedFSimCalibrationRequest]] = None, permit_mixed_moments: bool = False ) -> Tuple[CircuitWithCalibration, List[FloquetPhasedFSimCalibrationRequest]]
This variant of 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.
If merge_subsets parameter is True then the method tries to merge moments into the other moments listed previously if they can be characterized together (they have no conflicting operations). If merge_subsets is False then only moments of exactly the same structure are characterized together.
The circuit can only be composed of single qubit operations, wait operations, measurement operations and operations supported by gates_translator.
||Circuit to characterize.|
||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.|
||Function that translates a gate to a supported FSimGate which will undergo characterization. Defaults to sqrt_iswap_gates_translator.|
||Whether to merge moments that can be characterized at the same time together.|
||The characterization requests obtained by a previous scan of another circuit; i.e., the requests field of the return value of make_floquet_request_for_circuit invoked on another circuit. This might be used to find a minimal set of moments to characterize across many circuits.|
||Whether to allow a mix of two-qubit gates with other irrelevant single-qubit gates.|
|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.|