@@ -71,32 +71,33 @@ class EigenGate(raw_types.Gate):
71
71
eigenvalue i and a part with eigenvalue -i, then EigenGate allows this
72
72
functionality to be unambiguously specified via the _eigen_components
73
73
method.
74
- """
75
74
76
- def __init__ (
77
- self , * , exponent : value .TParamVal = 1.0 , global_shift : float = 0.0 # Forces keyword args.
78
- ) -> None :
79
- """Initializes the parameters used to compute the gate's matrix.
80
-
81
- The eigenvalue of each eigenspace of a gate is computed by
75
+ The eigenvalue of each eigenspace of a gate is computed by:
82
76
83
- 1. Starting with an angle in half turns as returned by the gate's
77
+ 1. Starting with an angle in half turns as returned by the gate's
84
78
``_eigen_components`` method:
85
79
86
80
θ
87
81
88
- 2. Shifting the angle by `global_shift`:
82
+ 2. Shifting the angle by `global_shift`:
89
83
90
84
θ + s
91
85
92
- 3. Scaling the angle by `exponent`:
86
+ 3. Scaling the angle by `exponent`:
93
87
94
88
(θ + s) * e
95
89
96
- 4. Converting from half turns to a complex number on the unit circle:
90
+ 4. Converting from half turns to a complex number on the unit circle:
97
91
98
92
exp(i * pi * (θ + s) * e)
99
93
94
+ """
95
+
96
+ def __init__ (
97
+ self , * , exponent : value .TParamVal = 1.0 , global_shift : float = 0.0 # Forces keyword args.
98
+ ) -> None :
99
+ """Initializes the parameters used to compute the gate's matrix.
100
+
100
101
Args:
101
102
exponent: The t in gate**t. Determines how much the eigenvalues of
102
103
the gate are phased by. For example, eigenvectors phased by -1
0 commit comments