Table of Contents
Multi-Qubit Gates (n-qubit General)
Multi-qubit gates act on arbitrary numbers of qubits ($n \geq 3$) and are fundamental to quantum algorithms. Unlike three-qubit gates like Toffoli and Fredkin, general multi-qubit gates have no fixed size and scale with problem parameters. Most are constructed from two-qubit gates and are expensive to implement natively.
Permutation Gates
Permutation gates apply a classical permutation to the computational basis states. Examples include:
- Cycle gates: $|i\rangle \to |i \oplus 1 \pmod{n}\rangle$ (cyclic shift of basis states)
- Transposition gates: swap two specific basis states
- Bit-reversal permutation: reverse the bitstring (used in Fourier transforms)
Permutation gates are unitary, reversible, and preserve the Hamming weight (number of 1s). They have no phase information and are efficiently decomposable into two-qubit gates.
Quantum Fourier Transform (QFT)
**Quantum Fourier Transform** is an $n$-qubit unitary gate that maps $|j\rangle \to \frac{1}{\sqrt{2^n}} \sum_{k=0}^{2^n-1} e^{2\pi i jk/2^n} |k\rangle$. It is the quantum analogue of the classical discrete Fourier transform and is a subroutine in Shor's factoring algorithm and phase estimation algorithms.
- Circuit depth: $O(n^2)$ with nearest-neighbor interactions
- Uses: period finding, phase estimation, quantum simulation
- Key property: maps sparse computational basis states to uniform superposition and vice versa
Grover Diffusion Operator
The **diffusion operator** (inversion about average) is part of Grover's search algorithm. Applied to an $n$-qubit state, it reflects all amplitudes about the average amplitude, amplifying the marked states.
$$D = 2|\psi_0\rangle\langle\psi_0| - I$$
where $|\psi_0\rangle = \frac{1}{\sqrt{2^n}} \sum_j |j\rangle$ is the equal superposition. The diffusion operator is unitary and composable with oracle gates.
- Circuit depth: $O(n)$ with single-qubit rotations and CNOTs
- Uses: amplitude amplification, search algorithms, combinatorial optimization
- Key property: multiple applications of diffusion + oracle converge to the marked state
Phase Oracle Gates
**Phase oracles** mark solutions by applying a phase (typically $-1$) to basis states meeting some condition. For $n$ qubits, a phase oracle can be written:
$$O_f = \sum_{x=0}^{2^n-1} (-1)^{f(x)} |x\rangle\langle x|$$
where $f: \{0,1\}^n \to \{0,1\}$ is the Boolean function defining which states are marked.
- Construction: often uses ancilla qubits and function evaluation circuits
- Uses: quantum algorithms (Grover, variational algorithms), quantum simulation
- Key property: must be implementable efficiently for the algorithm to have advantage
Controlled-Unitary Gates
**Controlled-unitary gates** apply an arbitrary unitary $U$ to target qubits if all $k$ control qubits are $|1\rangle$. Generalizations include:
- Single or multiple control qubits
- Single or multiple target qubits
- Decomposition via Euler angle decomposition: $U = e^{i\alpha} A X B X C$
- Depth: $O(2^k)$ for $k$ controls (exponential in number of controls)
Reducing the number of controls is critical for scalability and error mitigation.
Scalability Considerations
Multi-qubit gates are expensive to implement natively:
- Native implementation: requires $O(n)$ elementary gates for $n$-qubit operations
- Circuit depth: polynomials in $n$, often quadratic or worse
- Practical limit: current devices (10–100 qubits) decompose large gates into two-qubit gates
- Error accumulation: each gate adds errors; reducing gate count is crucial for NISQ algorithms
Relation to Three-Qubit Gates
Three-qubit gates (Toffoli, Fredkin) are building blocks for larger gates. Multiple three-qubit gates in sequence can implement more complex operations, though direct decomposition into two-qubit gates is often more efficient.
