![]() |
Association of a user gate with gate to calibrate.
cirq_google.calibration.phased_fsim.PhaseCalibratedFSimGate(
engine_gate: cirq.FSimGate, phase_exponent: float
)
This association stores information regarding rotation of the calibrated FSim gate by phase_exponent p:
(Z^-p ⊗ Z^p) FSim (Z^p ⊗ Z^-p).
The unitary matrix of the gate is:
[[1, 0, 0, 0], [0, cos(θ), (1/g^2) sin(θ), 0], [0, (g^2) sin(θ), cos(θ), 0], [0, 0, 0, exp(-iφ)]]
where g = exp(i·π·p)
The rotation should be reflected back during the compilation after the gate is calibrated and is equivalent to the shift of -2πp in the χ angle of PhasedFSimGate.
Attributes | |
---|---|
engine_gate
|
Gate that should be used for calibration purposes. |
phase_exponent
|
Phase rotation exponent p. |
Methods
as_characterized_phased_fsim_gate
as_characterized_phased_fsim_gate(
parameters: cirq_google.calibration.PhasedFSimCharacterization
) -> cirq.PhasedFSimGate
Creates a PhasedFSimGate which represents the characterized engine_gate but includes deviations in unitary parameters.
Args | |
---|---|
parameters
|
The results of characterization of the engine gate. |
Returns | |
---|---|
Instance of PhasedFSimGate that executes a gate according to the characterized parameters of the engine_gate. |
with_zeta_chi_gamma_compensated
with_zeta_chi_gamma_compensated(
qubits: Tuple[cirq.Qid, cirq.Qid],
parameters: cirq_google.calibration.PhasedFSimCharacterization
,
*,
engine_gate: Optional[cirq.Gate] = None
) -> Tuple[Tuple[cirq.Operation, ...], ...]
Creates a composite operation that compensates for zeta, chi and gamma angles of the characterization.
Args | |
---|---|
qubits
|
Qubits that the gate should act on. |
parameters
|
The results of characterization of the engine gate. |
engine_gate
|
2-qubit gate that represents the engine gate. When None, the internal engine_gate of this instance is used. This argument is useful for testing purposes. |
Returns | |
---|---|
Tuple of tuple of operations that describe the compensated gate. The first index iterates over moments of the composed operation. |
Raises | |
---|---|
ValueError
|
If the engine gate is not a 2-qubit gate. |
__eq__
__eq__(
other
)