mimiqcircuits.operations.gates.standard.ecr

Echoed Cross-Resonance (ECR) gate.

Classes

GateECR()

Two qubit echoed cross-resonance (ECR) gate.

class GateECR[source]

Bases: Gate

Two qubit echoed cross-resonance (ECR) gate.

The gate is its own inverse.

Matrix Representation

\[\begin{split}\operatorname{ECR} = \frac{1}{\sqrt{2}} \begin{pmatrix} 0 & 0 & 1 & i \\ 0 & 0 & i & 1 \\ 1 & -i & 0 & 0 \\ -i & 1 & 0 & 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]

Return the inverse of the gate.

Gates with a known inverse return it directly (for example GateS().inverse() is GateSDG()); otherwise the gate is wrapped in Inverse.