![]() |
Options for configuring a PhasedFSim calibration using a local version of XEB.
Inherits From: XEBPhasedFSimCalibrationOptions
, PhasedFSimCalibrationOptions
cirq_google.calibration.LocalXEBPhasedFSimCalibrationOptions(
*args, **kwds
)
XEB uses the fidelity of random circuits to characterize PhasedFSim gates. The parameters of the gate are varied by a classical optimizer to maximize the observed fidelities.
These "Local" options (corresponding to LocalXEBPhasedFSimCalibrationRequest
) instruct
cirq_google.run_calibrations
to execute XEB analysis locally (not via the quantum
engine). As such, run_calibrations
can work with any cirq.Sampler
, not just
QuantumEngineSampler
.
Args | |
---|---|
n_library_circuits
|
The number of distinct, two-qubit random circuits to use in our
library of random circuits. This should be the same order of magnitude as
n_combinations .
|
n_combinations
|
We take each library circuit and randomly assign it to qubit pairs. This parameter controls the number of random combinations of the two-qubit random circuits we execute. Higher values increase the precision of estimates but linearly increase experimental runtime. |
cycle_depths
|
We run the random circuits at these cycle depths to fit an exponential decay in the fidelity. |
fatol
|
The absolute convergence tolerance for the objective function evaluation in the Nelder-Mead optimization. This controls the runtime of the classical characterization optimization loop. |
xatol
|
The absolute convergence tolerance for the parameter estimates in the Nelder-Mead optimization. This controls the runtime of the classical characterization optimization loop. |
fsim_options
|
An instance of XEBPhasedFSimCharacterizationOptions that controls aspects
of the PhasedFSim characterization like initial guesses and which angles to
characterize.
|
n_processes
|
The number of multiprocessing processes to analyze the XEB characterization
data. By default, we use a value equal to the number of CPU cores. If 1 is specified,
multiprocessing is not used.
|
Attributes | |
---|---|
n_library_circuits
|
Dataclass field |
n_combinations
|
Dataclass field |
cycle_depths
|
Dataclass field |
fatol
|
Dataclass field |
xatol
|
Dataclass field |
fsim_options
|
Dataclass field |
n_processes
|
Dataclass field |
Methods
create_phased_fsim_request
create_phased_fsim_request(
pairs: Tuple[Tuple[cirq.Qid, cirq.Qid], ...], gate: cirq.Gate
)
Create a PhasedFSimCalibrationRequest of the correct type for these options.
Args | |
---|---|
pairs
|
Set of qubit pairs to characterize. A single qubit can appear on at most one pair in the set. |
gate
|
Gate to characterize for each qubit pair from pairs. This must be a supported gate which can be described cirq.PhasedFSim gate. This gate must be serialized by the cirq_google.SerializableGateSet used |
to_args
to_args() -> Dict[str, Any]
Convert this dataclass to an args
dictionary suitable for sending to the Quantum
Engine calibration API.
__eq__
__eq__(
other
)
Class Variables | |
---|---|
cycle_depths |
(5, 25, 50, 100, 200, 300)
|
fatol |
0.005
|
fsim_options |
Instance of cirq.experiments.xeb_fitting.XEBPhasedFSimCharacterizationOptions
|
n_combinations |
10
|
n_library_circuits |
20
|
n_processes |
None
|
xatol |
0.005
|