mimiqcircuits.operations.gates.standard.sy

SY (Sqrt(Y)) and SYDG gates.

Classes

GateSY([operation, exponent])

Single qubit \(\sqrt{Y}\) gate.

GateSYDG([operation])

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: Power

Single qubit \(\sqrt{Y}\) gate.

See also

GateSYDG, GateY, Power

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()
>>> 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]
__init__(operation=None, exponent=None)[source]

Initialize a SY gate.

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.

isopalias()[source]
class mimiqcircuits.operations.gates.standard.sy.GateSYDG(operation=None, *args, **kwargs)[source]

Bases: Inverse

Single qubit \(\sqrt{Y}^\dagger\) gate (conjugate transpose of the \(\sqrt{Y}\) gate).

See also

GateSY, GateY, Power, Inverse

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()
>>> 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
__init__(operation=None)[source]

Initialize a SYDG gate.

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.

isopalias()[source]