We're celebrating World Quantum Day 2022! Join us


Options for calibrating a PhasedFSim-like gate using XEB.

Inherits From: XEBCharacterizationOptions

Used in the notebooks

Used in the tutorials

You may want to use more specific subclasses like SqrtISwapXEBOptions which have sensible defaults.

characterize_theta Whether to characterize θ angle.
characterize_zeta Whether to characterize ζ angle.
characterize_chi Whether to characterize χ angle.
characterize_gamma Whether to characterize γ angle.
characterize_phi Whether to characterize φ angle.
theta_default The initial or default value to assume for the θ angle.
zeta_default The initial or default value to assume for the ζ angle.
chi_default The initial or default value to assume for the χ angle.
gamma_default The initial or default value to assume for the γ angle.
phi_default The initial or default value to assume for the φ angle.



View source

Whether the default angles are set.

This only considers angles where characterize_{angle} is True. If all such angles have {angle}_default set to a value, this returns True. If none of the defaults are set, this returns False. If some defaults are set, we raise an exception.


View source

Get an initial simplex and parameter names for the optimization implied by these options.

The initial simplex initiates the Nelder-Mead optimization parameter. We use the standard simplex of x0 + s*basis_vec where x0 is given by the xxx_default attributes, s is initial_simplex_step_size and basis_vec is a one-hot encoded vector for each parameter for which the parameterize_xxx attribute is True.

We also return a list of parameter names so the Cirq param_resovler can be accurately constructed during optimization.


View source

The parameterized gate to use.


View source

Whether to replace op with a parameterized version.


View source

A new Options class with {angle}_defaults inferred from gate.

This keeps the same settings for the characterize_{angle} booleans, but will disregard any current {angle}_default values.


characterize_chi True
characterize_gamma True
characterize_phi True
characterize_theta True
characterize_zeta True
chi_default None
gamma_default None
phi_default None
theta_default None
zeta_default None