@@ -54,28 +54,40 @@ def _half_pi_mod_pi(param: 'cirq.TParamVal') -> bool:
54
54
55
55
@value .value_equality (approximate = True )
56
56
class FSimGate (gate_features .InterchangeableQubitsGate , raw_types .Gate ):
57
- """Fermionic simulation gate family.
57
+ r """Fermionic simulation gate family.
58
58
59
59
Contains all two qubit interactions that preserve excitations, up to
60
60
single-qubit rotations and global phase.
61
61
62
62
The unitary matrix of this gate is:
63
63
64
- [[1, 0, 0, 0],
65
- [0, a, b, 0],
66
- [0, b, a, 0],
67
- [0, 0, 0, c]]
64
+ $$
65
+ \begin{bmatrix}
66
+ 1 & 0 & 0 & 0 \\
67
+ 0 & a & b & 0 \\
68
+ 0 & b & a & 0 \\
69
+ 0 & 0 & 0 & c
70
+ \end{bmatrix}
71
+ $$
68
72
69
73
where:
70
74
71
- a = cos(theta)
72
- b = -i·sin(theta)
73
- c = exp(-i·phi)
75
+ $$
76
+ a = \cos(\theta)
77
+ $$
78
+
79
+ $$
80
+ b = -i \sin(\theta)
81
+ $$
82
+
83
+ $$
84
+ c = e^{i \phi}
85
+ $$
74
86
75
87
Note the difference in sign conventions between FSimGate and the
76
88
ISWAP and CZPowGate:
77
89
78
- FSimGate(θ, φ) = ISWAP**(-2θ/π) CZPowGate(exponent=-φ/π)
90
+ FSimGate(θ, φ) = ISWAP**(-2θ/π) CZPowGate(exponent=-φ/π)
79
91
"""
80
92
81
93
def __init__ (self , theta : 'cirq.TParamVal' , phi : 'cirq.TParamVal' ) -> None :
@@ -202,20 +214,24 @@ def _json_dict_(self) -> Dict[str, Any]:
202
214
203
215
@value .value_equality (approximate = True )
204
216
class PhasedFSimGate (gate_features .InterchangeableQubitsGate , raw_types .Gate ):
205
- """General excitation-preserving two-qubit gate.
217
+ r """General excitation-preserving two-qubit gate.
206
218
207
219
The unitary matrix of PhasedFSimGate(θ, ζ, χ, γ, φ) is:
208
220
209
- [[1, 0, 0, 0],
210
- [0, exp(-iγ - iζ) cos(θ), -i exp(-iγ + iχ) sin(θ), 0],
211
- [0, -i exp(-iγ - iχ) sin(θ), exp(-iγ + iζ) cos(θ), 0],
212
- [0, 0, 0, exp(-2iγ-iφ)]].
221
+ $$
222
+ \begin{bmatrix}
223
+ 1 & 0 & 0 & 0 \\
224
+ 0 & e^{-i \gamma - i \zeta} & -i e^{-i \gamma + i\chi} & 0 \\
225
+ 0 & -i e^{-i \gamma - i \chi} & e^{-i \gamma + i \zeta} & 0 \\
226
+ 0 & 0 & 0 & e^{-2i \gamma - i \phi}
227
+ \end{bmatrix}
228
+ $$
213
229
214
230
This parametrization follows eq (18) in https://arxiv.org/abs/2010.07965.
215
231
See also eq (43) in https://arxiv.org/abs/1910.11333 for an older variant
216
- which uses the same θ and φ parameters, but its three phase angles have
217
- different names and opposite sign. Specifically, ∆+ angle corresponds to
218
- -γ, ∆- corresponds to -ζ and ∆-,off corresponds to -χ.
232
+ which uses the same θ and φ parameters, but has three phase angles that
233
+ have different names and opposite sign. Specifically, ∆+ angle corresponds
234
+ to -γ, ∆- corresponds to -ζ and ∆-,off corresponds to -χ.
219
235
220
236
Another useful parametrization of PhasedFSimGate is based on the fact that
221
237
the gate is equivalent up to global phase to the following circuit:
0 commit comments