@@ -101,10 +101,10 @@ def control(
101
101
"""Return a (multi-)controlled-Phase gate.
102
102
103
103
Args:
104
- num_ctrl_qubits (int) : number of control qubits.
105
- label (str or None) : An optional label for the gate [Default: None]
106
- ctrl_state (int or str or None) : control state expressed as integer,
107
- string (e.g. '110'), or None. If None, use all 1s.
104
+ num_ctrl_qubits: number of control qubits.
105
+ label: An optional label for the gate [Default: `` None`` ]
106
+ ctrl_state: control state expressed as integer,
107
+ string (e.g. `` '110'`` ), or `` None`` . If `` None`` , use all 1s.
108
108
annotated: indicates whether the controlled gate can be implemented
109
109
as an annotated gate.
110
110
@@ -127,7 +127,17 @@ def control(
127
127
return gate
128
128
129
129
def inverse (self , annotated : bool = False ):
130
- r"""Return inverted Phase gate (:math:`Phase(\lambda)^{\dagger} = Phase(-\lambda)`)"""
130
+ r"""Return inverted Phase gate (:math:`Phase(\lambda)^{\dagger} = Phase(-\lambda)`)
131
+
132
+ Args:
133
+ annotated: when set to ``True``, this is typically used to return an
134
+ :class:`.AnnotatedOperation` with an inverse modifier set instead of a concrete
135
+ :class:`.Gate`. However, for this class this argument is ignored as the inverse
136
+ of this gate is always another :class:`.PGate` with an inverse parameter value.
137
+
138
+ Returns:
139
+ PGate: inverse gate.
140
+ """
131
141
return PhaseGate (- self .params [0 ])
132
142
133
143
def __array__ (self , dtype = None ):
@@ -244,10 +254,10 @@ def control(
244
254
"""Controlled version of this gate.
245
255
246
256
Args:
247
- num_ctrl_qubits (int) : number of control qubits.
248
- label (str or None) : An optional label for the gate [Default: None]
249
- ctrl_state (int or str or None) : control state expressed as integer,
250
- string (e.g. '110'), or None. If None, use all 1s.
257
+ num_ctrl_qubits: number of control qubits.
258
+ label: An optional label for the gate [Default: `` None`` ]
259
+ ctrl_state: control state expressed as integer,
260
+ string (e.g.`` '110'`` ), or `` None`` . If `` None`` , use all 1s.
251
261
annotated: indicates whether the controlled gate can be implemented
252
262
as an annotated gate.
253
263
@@ -370,10 +380,10 @@ def control(
370
380
"""Controlled version of this gate.
371
381
372
382
Args:
373
- num_ctrl_qubits (int) : number of control qubits.
374
- label (str or None) : An optional label for the gate [Default: None]
375
- ctrl_state (int or str or None) : control state expressed as integer,
376
- string (e.g. '110'), or None. If None, use all 1s.
383
+ num_ctrl_qubits: number of control qubits.
384
+ label: An optional label for the gate [Default: `` None`` ]
385
+ ctrl_state: control state expressed as integer,
386
+ string (e.g.`` '110'`` ), or `` None`` . If `` None`` , use all 1s.
377
387
annotated: indicates whether the controlled gate can be implemented
378
388
as an annotated gate.
379
389
0 commit comments