Skip to content

Commit 7e7754a

Browse files
committed
Docstring
1 parent 29a0af2 commit 7e7754a

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

cirq-core/cirq/ops/global_phase_op.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,14 @@ def global_phase_operation(
130130
def from_phase_and_exponent(
131131
half_turns: cirq.TParamVal, exponent: cirq.TParamVal
132132
) -> cirq.GlobalPhaseGate:
133-
"""Creates a GlobalPhaseGate from the global phase and exponent."""
133+
"""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+
"""
134141
coefficient = 1j ** (2 * half_turns * exponent)
135142
coefficient = (
136143
complex(coefficient)

0 commit comments

Comments
 (0)