mimiqcircuits.operations.gates.standard.ecr

Echoed Cross-Resonance (ECR) gate.

Classes

GateECR()

Two qubit ECR (echo) gate.

class mimiqcircuits.operations.gates.standard.ecr.GateECR[source]

Bases: Gate

Two qubit ECR (echo) gate.

Matrix representation:

\[\begin{split}\operatorname{ECR} =\begin{pmatrix} 0 & \frac{1}{\sqrt{2}} & 0 & \frac{i}{\sqrt{2}} \\ \frac{1}{\sqrt{2}} & 0 & \frac{-i}{\sqrt{2}} & 0 \\ 0 & \frac{i}{\sqrt{2}} & 0 & \frac{1}{\sqrt{2}} \\ \frac{-i}{\sqrt{2}} & 0 & \frac{1}{\sqrt{2}} & 0 \end{pmatrix}\end{split}\]

Examples

>>> from mimiqcircuits import *
>>> GateECR()
ECR
>>> GateECR().matrix()
[0, 0, 0.707106781186548, 0.0 + 0.707106781186548*I]
[0, 0, 0.0 + 0.707106781186548*I, 0.707106781186548]
[0.707106781186548, -0.0 - 0.707106781186548*I, 0, 0]
[-0.0 - 0.707106781186548*I, 0.707106781186548, 0, 0]

>>> c = Circuit().push(GateECR(), 0, 1)
>>> c
2-qubit circuit with 1 instruction:
└── ECR @ q[0:1]

>>> GateECR().power(2), GateECR().inverse()
(⨷ ² ID, ECR)
>>> GateECR().decompose()
2-qubit circuit with 3 instructions:
├── RZX((1/4)*pi) @ q[0:1]
├── X @ q[0]
└── RZX((-1/4)*pi) @ q[0:1]
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.