@@ -328,18 +328,19 @@ class MeasurementGate(raw_types.Gate):
328328
329329 The measurement gate contains a key that is used to identify results
330330 of measurements.
331-
332- Attributes:
333- key: The string key of the measurement.
334- invert_mask: A list of values indicating whether the corresponding
335- qubits should be flipped. The list's length must not be longer than
336- the number of qubits, but it is permitted to be shorted.
337- Qubits with indices past the end of the mask are not flipped.
338331 """
339332
340333 def __init__ (self ,
341334 key : str = '' ,
342335 invert_mask : Tuple [bool , ...] = ()) -> None :
336+ """
337+ Args:
338+ key: The string key of the measurement.
339+ invert_mask: A list of values indicating whether the corresponding
340+ qubits should be flipped. The list's length must not be longer
341+ than the number of qubits, but it is permitted to be shorter.
342+ Qubits with indices past the end of the mask are not flipped.
343+ """
343344 self .key = key
344345 self .invert_mask = invert_mask or ()
345346
@@ -474,16 +475,20 @@ class HPowGate(eigen_gate.EigenGate, gate_features.SingleQubitGate):
474475 """A Gate that performs a rotation around the X+Z axis of the Bloch sphere.
475476
476477
477- HPowGate()**t = HPowGate(exponent=t) is given by the matrix
478+ The unitary matrix of ``HPowGate(exponent=t)`` is:
479+
478480 [[g·(c-i·s/sqrt(2)), -i·g·s/sqrt(2)],
479481 [-i·g·s/sqrt(2)], g·(c+i·s/sqrt(2))]]
482+
480483 where
484+
481485 c = cos(π·t/2)
482486 s = sin(π·t/2)
483487 g = exp(i·π·t/2).
484- Note in particular that for t=1, this gives the Hadamard matrix.
485488
486- `cirq.H`, the Hadamard gate, is an instance of this gate at exponent=1.
489+ Note in particular that for `t=1`, this gives the Hadamard matrix.
490+
491+ `cirq.H`, the Hadamard gate, is an instance of this gate at `exponent=1`.
487492 """
488493
489494 def _eigen_components (self ):
@@ -575,7 +580,7 @@ class CZPowGate(eigen_gate.EigenGate,
575580
576581 g = exp(i·π·t/2).
577582
578- `cirq.Z` `, the controlled Z gate, is an instance of this gate at
583+ `cirq.CZ `, the controlled Z gate, is an instance of this gate at
579584 `exponent=1`.
580585 """
581586
0 commit comments