mimiqcircuits.operations.gates.standard.sy¶
SY (Sqrt(Y)) and SYDG gates.
Classes
|
Single qubit \(\sqrt{Y}\) gate. |
|
Single qubit \(\sqrt{Y}^\dagger\) gate, the inverse of |
- class GateSY(operation=None, exponent=None, *args, **kwargs)[source]¶
Bases:
PowerSingle qubit \(\sqrt{Y}\) gate.
Equal to
GateY().power(1/2).Matrix Representation
\[\begin{split}\operatorname{SY} = \sqrt{\operatorname{Y}} = \frac{1}{2} \begin{pmatrix} 1+i & -1-i \\ 1+i & 1+i \end{pmatrix}\end{split}\]Examples
>>> from mimiqcircuits import * >>> GateSY() SY >>> GateSY().matrix() [0.5 + 0.5*I, -0.5 - 0.5*I] [0.5 + 0.5*I, 0.5 + 0.5*I] >>> c = Circuit().push(GateSY(), 0) >>> c 1-qubit circuit with 1 instruction: └── SY @ q[0] >>> GateSY().power(2), GateSY().inverse() (Y**1, SY†) >>> GateSY().decompose() 1-qubit circuit with 4 instructions: ├── S @ q[0] ├── S @ q[0] ├── H @ q[0] └── U(0, 0, 0, (1/4)*pi) @ q[0]
See also
GateSYDG,GateY,Power- isopalias()[source]¶
Whether the operation is a named alias of a wrapper.
Some named gates are defined as a wrapper around another operation, for example
GateSasGateZto the power 1/2. Such gates returnTrue. Not every such gate reports it:GateSDGandGateCXreturnFalse.- Returns:
Truefor a named alias of a wrapper that reports it,Falseotherwise.- Return type:
- class GateSYDG(operation=None, *args, **kwargs)[source]¶
Bases:
InverseSingle qubit \(\sqrt{Y}^\dagger\) gate, the inverse of
GateSY.Matrix Representation
\[\begin{split}\operatorname{SYDG} = \sqrt{\operatorname{Y}}^\dagger = \frac{1}{2} \begin{pmatrix} 1-i & 1-i \\ -1+i & 1-i \end{pmatrix}\end{split}\]Examples
>>> from mimiqcircuits import * >>> GateSYDG() SY† >>> GateSYDG().matrix() [0.5 - 0.5*I, 0.5 - 0.5*I] [-0.5 + 0.5*I, 0.5 - 0.5*I] >>> c = Circuit().push(GateSYDG(), 0) >>> c 1-qubit circuit with 1 instruction: └── SY† @ q[0] >>> GateSYDG().power(2), GateSYDG().inverse() (SY†**2, SY) >>> GateSYDG().decompose() 1-qubit circuit with 4 instructions: ├── U(0, 0, 0, (-1/4)*pi) @ q[0] ├── H @ q[0] ├── S† @ q[0] └── S† @ q[0]
See also
GateSY,GateY,Inverse- isopalias()[source]¶
Whether the operation is a named alias of a wrapper.
Some named gates are defined as a wrapper around another operation, for example
GateSasGateZto the power 1/2. Such gates returnTrue. Not every such gate reports it:GateSDGandGateCXreturnFalse.- Returns:
Truefor a named alias of a wrapper that reports it,Falseotherwise.- Return type: