interactions 2 qubits
Magic
Changes from the computational basis to the magic (Bell) basis used in two-qubit local invariants.
The magic gate is a fixed two-qubit unitary that performs a basis change to the magic basis (a Bell basis with specific phases).
$$ M = \frac{1}{\sqrt{2}} \begin{bmatrix} 1 & i & 0 & 0 \\ 0 & 0 & i & 1 \\ 0 & 0 & i & -1 \\ 1 & -i & 0 & 0 \end{bmatrix} $$
Properties
- Columns are (phase-adjusted) Bell states, so it maps the computational basis to the magic basis: $M|00\rangle = \tfrac{|00\rangle + |11\rangle}{\sqrt{2}}$, $M|01\rangle = \tfrac{i(|00\rangle - |11\rangle)}{\sqrt{2}}$, $M|10\rangle = \tfrac{i(|01\rangle + |10\rangle)}{\sqrt{2}}$, $M|11\rangle = \tfrac{|01\rangle - |10\rangle}{\sqrt{2}}$.
- If $U \in \mathsf{SO}(4)$, then $M U M^\dagger = A \otimes B$ for some $A,B \in \mathsf{SU}(2)$ (the $\mathsf{SO}(4) \simeq (\mathsf{SU}(2)\times\mathsf{SU}(2))/\mathbb{Z}_2$ correspondence).
The unitary, drawn
Every entry of the matrix as a disc. The area is the transition probability $|U_{jk}|^2$; the colour and the hand are the phase. Rows are outputs $\langle j|$, columns inputs $|k\rangle$, in the computational basis.
Phase
Disc area $= |U_{jk}|^2$. Hover an entry for its value, or take the JSON.
Weyl chamber
Where this gate sits among all two-qubit gates, up to single-qubit rotations before and after.
Coordinates:
not entangling entangling perfect entangler
$(a, b, c)$ means the gate equals $e^{i(a\,XX + b\,YY + c\,ZZ)}$ up to single-qubit gates, reduced to the chamber $\pi/4 \ge a \ge b \ge |c|$ (the convention of the canonical gate, Qiskit and Cirq). The $a = \pi/4$ face is a mirror: $(\pi/4, b, c)$ and $(\pi/4, b, -c)$ are the same gate. Drag the figure to rotate it, double-click to reset.
SDK support
How to call this gate in each framework. Hover a ⓘ for a note; the support matrix compares every gate at once.
| SDK | Name |
|---|---|
| Qiskit | — |
| PennyLane | — |
| Cirq | — |
| Q# | — |
| PyQuil | — |
| Braket | — |
| BQSKit | — |
| Qibo | — |
| pytket | — ⓘ |
| Stim | — |
| OpenQASM | — |