|q⟩ Bad Qubits

advanced · Programming · Quantum Chemistry on Quantum Computers

The Bravyi–Kitaev Transform

The Jordan–Wigner transform pays for its simplicity with long Pauli strings: a single fermionic operator on orbital pp drags a string of ZZ gates across all pp earlier qubits. For large molecules these O(n)O(n)-weight strings inflate circuit depth and measurement cost. The Bravyi–Kitaev (BK) transform is an alternative encoding that balances two competing bookkeeping tasks so that each fermionic operator touches only O(logn)O(\log n) qubits.

Two pieces of bookkeeping

Every fermion-to-qubit mapping must store two kinds of information:

Jordan–Wigner stores occupation locally (qubit pp holds npn_p directly) but computes parity non-locally, reading pp qubits via the ZZ string. The opposite extreme, the parity encoding, stores running parity locally but then needs a long string to recover occupation. Both are linear in nn for one of the two tasks.

The Bravyi–Kitaev idea

Bravyi and Kitaev observed that you do not have to store either raw occupation or raw parity at a single qubit. Instead, store partial sums of occupation numbers on a binary tree of qubits, so that both the occupation of any orbital and the parity of any prefix can be reconstructed from only a logarithmic number of qubits.

Concretely, qubit jj stores a sum

bj=kS(j)nk(mod2)b_j = \sum_{k \in S(j)} n_k \pmod 2

over a carefully chosen index set S(j)S(j) derived from the binary representation of jj. Three index sets organize the reconstruction:

Each of these sets has size O(logn)O(\log n), so the Pauli string for aja_j or aja_j^\dagger acts on only O(logn)O(\log n) qubits rather than O(n)O(n).

Worked small case

For n=4n = 4 orbitals the BK basis vectors differ from JW. For example, the number operator on orbital 1 is no longer simply 12(IZ1)\tfrac{1}{2}(I - Z_1); in the standard BK ordering it becomes a two-qubit operator involving Z0Z_0 and Z1Z_1, because qubit 1 stores the partial sum n0+n1n_0 + n_1. The total particle number, pn^p\sum_p \hat n_p, however, remains diagonal in both encodings.

Choosing an encoding in practice

| Property | Jordan–Wigner | Bravyi–Kitaev | |---|---|---| | Occupation lookup | local (O(1)O(1)) | O(logn)O(\log n) | | Parity lookup | O(n)O(n) | O(logn)O(\log n) | | Operator Pauli weight | up to O(n)O(n) | O(logn)O(\log n) | | Conceptual clarity | high | lower | | Qubit count | nn | nn |

Both use the same number of qubits (nn, one per spin-orbital) and produce a Hamiltonian that is a weighted sum of Pauli strings. The choice is a trade-off: JW for clarity and small systems, BK (or more recent low-weight encodings such as ternary-tree mappings) for scaling. Software libraries such as OpenFermion implement both behind a single interface, so a chemistry workflow can switch encodings by changing one argument.

In this module we proceed with Jordan–Wigner, whose Hamiltonian for H2\text{H}_2 we build explicitly in the next lesson.

Sign in on the full site to ask questions and join the discussion.