We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 29a0af2 commit 7e7754aCopy full SHA for 7e7754a
cirq-core/cirq/ops/global_phase_op.py
@@ -130,7 +130,14 @@ def global_phase_operation(
130
def from_phase_and_exponent(
131
half_turns: cirq.TParamVal, exponent: cirq.TParamVal
132
) -> cirq.GlobalPhaseGate:
133
- """Creates a GlobalPhaseGate from the global phase and exponent."""
+ """Creates a GlobalPhaseGate from the global phase and exponent.
134
+
135
+ Args:
136
+ half_turns: The number of half turns to rotate by.
137
+ exponent: The power to raise the phase to.
138
139
+ Returns: A `GlobalPhaseGate` with the corresponding coefficient.
140
+ """
141
coefficient = 1j ** (2 * half_turns * exponent)
142
coefficient = (
143
complex(coefficient)
0 commit comments