interactions 2 qubits
B Gate
Two-qubit entangling gate that can synthesize arbitrary elements of $U(4)$ with only two applications.
The B gate introduced in Zhang, Vala, Sastry, and Whaley is
$$ \begin{align*} B & = \exp\left[i\left(\frac{\pi}{4}X\otimes X + \frac{\pi}{8}Y\otimes Y\right)\right] \\ & = \begin{bmatrix} \alpha^{+} & 0 & 0 & i\alpha^{-} \\ 0 & \alpha^{-} & i\alpha^{+} & 0 \\ 0 & i\alpha^{+} & \alpha^{-} & 0 \\ i\alpha^{-} & 0 & 0 & \alpha^{+} \end{bmatrix} \end{align*} $$
Where $$ \begin{align*} \alpha^{\pm} & = \tfrac{\sqrt{2}}{2}\left(\cos \tfrac{\pi}{8} \pm \sin \tfrac{\pi}{8}\right) \\ & = \tfrac{\sqrt{2}}{4}\left(\sqrt{2 + \sqrt{2}} \pm \sqrt{2 - \sqrt{2}}\right) \end{align*} $$
Properties
- Any $U \in U(4)$ can be realized with only two B gates plus local single-qubit gates.
- This improves on common alternatives (for example CNOT and DCNOT), which need three applications, and many other two-qubit gates that need three or more to synthesize arbitrary $U(4)$ operations.
References
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 | bqskit.ir.gates.BGate |
| Qibo | — |
| pytket | — ⓘ |
| Stim | — |
| OpenQASM | — |