mimiqcircuits.operations.gates.standard.sy¶
SY (Sqrt(Y)) and SYDG gates.
Classes
|
Single qubit \(\sqrt{Y}\) gate. |
|
Single qubit \(\sqrt{Y}^\dagger\) gate (conjugate transpose of the \(\sqrt{Y}\) gate). |
- class mimiqcircuits.operations.gates.standard.sy.GateSY(operation=None, exponent=None, *args, **kwargs)[source]¶
Bases:
PowerSingle qubit \(\sqrt{Y}\) gate.
See also
GateSYDG,GateY,PowerMatrix 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() >>> c.push(GateSY(), 1) 2-qubit circuit with 1 instruction: └── SY @ q[1]
>>> c.push(GateSY(), 2) 3-qubit circuit with 2 instructions: ├── SY @ q[1] └── SY @ q[2]
>>> power(GateSY(), 2) Y**1
Decomposition
>>> 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]
- inverse()[source]¶
Raise an error, as non-unitary operators cannot be inverted.
This method is not implemented for non-unitary operators and will raise a NotImplementedError if called.
- Raises:
NotImplementedError – If the method is called.
- class mimiqcircuits.operations.gates.standard.sy.GateSYDG(operation=None, *args, **kwargs)[source]¶
Bases:
InverseSingle qubit \(\sqrt{Y}^\dagger\) gate (conjugate transpose of the \(\sqrt{Y}\) gate).
See also
GateSY,GateY,Power,InverseMatrix 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() >>> c.push(GateSYDG(), 1) 2-qubit circuit with 1 instruction: └── SY† @ q[1]
>>> c.push(GateSYDG(), 2) 3-qubit circuit with 2 instructions: ├── SY† @ q[1] └── SY† @ q[2]
>>> power(GateSYDG(), 2) SY†**2
>>> inverse(GateSYDG()) SY
- inverse()[source]¶
Raise an error, as non-unitary operators cannot be inverted.
This method is not implemented for non-unitary operators and will raise a NotImplementedError if called.
- Raises:
NotImplementedError – If the method is called.