![]() |
Holder for the unitary angles of the cirq.PhasedFSimGate.
cirq_google.calibration.PhasedFSimCharacterization(
theta: Optional[float] = None,
zeta: Optional[float] = None,
chi: Optional[float] = None,
gamma: Optional[float] = None,
phi: Optional[float] = None
)
This class stores five unitary parameters (θ, ζ, χ, γ and φ) that describe the cirq.PhasedFSimGate which is the most general particle conserving two-qubit gate. The unitary of the underlying gate is:
[[1, 0, 0, 0],
[0, exp(-i(γ + ζ)) cos(θ), -i exp(-i(γ - χ)) sin(θ), 0],
[0, -i exp(-i(γ + χ)) sin(θ), exp(-i(γ - ζ)) cos(θ), 0],
[0, 0, 0, exp(-i(2γ + φ))]]
The parameters θ, γ and φ are symmetric and parameters ζ and χ asymmetric under the qubits exchange.
All the angles described by this class are optional and can be left unknown. This is relevant for characterization routines that characterize only subset of the gate parameters. All the angles are assumed to take a fixed numerical values which reflect the current state of the characterized gate.
This class supports JSON serialization and deserialization.
Methods
all_none
all_none() -> bool
Returns True if all the angles are None
any_none
any_none() -> bool
Returns True if any the angle is None
asdict
asdict() -> Dict[str, float]
Converts parameters to a dictionary that maps angle names to values.
merge_with
merge_with(
other: 'PhasedFSimCharacterization'
) -> 'PhasedFSimCharacterization'
Substitutes missing parameter with values from other.
Args | |
---|---|
other
|
Parameters to use for None values. |
Returns | |
---|---|
New instance of PhasedFSimCharacterization with values from this instance if they are set or values from other when some parameter is None. |
override_by
override_by(
other: 'PhasedFSimCharacterization'
) -> 'PhasedFSimCharacterization'
Overrides other parameters that are not None.
Args | |
---|---|
other
|
Parameters to use for override. |
Returns | |
---|---|
New instance of PhasedFSimCharacterization with values from other if set (values from other that are not None). Otherwise the current values are used. |
parameters_for_qubits_swapped
parameters_for_qubits_swapped() -> 'PhasedFSimCharacterization'
Parameters for the gate with qubits swapped between each other.
The angles theta, gamma and phi are kept unchanged. The angles zeta and chi are negated for the gate with swapped qubits.
Returns | |
---|---|
New instance with angles adjusted for swapped qubits. |
__eq__
__eq__(
other
)
Class Variables | |
---|---|
chi |
None
|
gamma |
None
|
phi |
None
|
theta |
None
|
zeta |
None
|