QEncode Benchmark
← Blog
·9 min read·QEncode Team

Jordan-Wigner vs Parity vs Bravyi-Kitaev: A Practical Comparison for VQE

Before you run a single VQE circuit, you have to answer a question that most tutorials skip: which qubit encoding should you use? We compared all three standard encodings across five molecules with real benchmark data. Here's what actually matters.

The Variational Quantum Eigensolver operates on qubits, but molecular Hamiltonians are written in terms of fermionic operators — creation and annihilation operators that obey anti-commutation relations. To run VQE, you need a mapping that converts fermionic operators into qubit operators. This mapping is called a qubit encoding.

Three encodings dominate the literature: Jordan-Wigner (JW), parity, and Bravyi-Kitaev (BK). All three are mathematically exact — they preserve the fermionic anti-commutation relations and produce identical ground-state energies in the limit of perfect optimization. But they differ significantly in how they distribute information across qubits, which has direct consequences for circuit depth, gate count, and practical VQE performance.

QEncode Suite v2 benchmarks every molecule-ansatz combination at all three encodings. Here's what the data shows.

How each encoding works

Jordan-Wigner

Jordan-Wigner is the oldest and most intuitive encoding. Each qubit directly represents one spin-orbital: qubit k stores whether spin-orbital k is occupied (|1⟩) or empty (|0⟩). Fermionic creation and annihilation operators are mapped to Pauli strings where the anti-commutation relations are enforced by a chain of Z operators extending from qubit 0 to qubit k−1.

The consequence is locality: JW operators can be long. A fermionic operator acting on spin-orbital k becomes a Pauli string of length k, because all qubits below k must be included to enforce the correct fermionic statistics. For a molecule with many spin-orbitals, this produces deep, gate-heavy circuits.

Parity encoding

Parity encoding reorganizes what each qubit stores. Instead of occupation numbers, each qubit stores the parity of all spin-orbitals up to that index — whether an even or odd number of them are occupied. This makes fermionic operators more local: a creation or annihilation operator acting on spin-orbital k only requires qubits k and k+1, regardless of how many spin-orbitals are below it.

The practical benefit of parity encoding is a two-qubit reduction. Because the total particle number and total spin are conserved quantities, two qubits in the parity basis become redundant and can be removed. For a molecule that requires n qubits under JW, parity encoding uses n−2 qubits. This directly reduces circuit depth and gate count, since the excitation operators in UCCSD scale with qubit count.

Bravyi-Kitaev

Bravyi-Kitaev is a more sophisticated encoding that stores information in a balanced binary tree structure. Each qubit encodes a combination of occupation and parity information over a range of spin-orbitals whose size scales logarithmically with system size. This gives BK operators that scale as O(log n) rather than O(n) for JW or O(1)/O(2) for parity.

BK is theoretically appealing for large systems where the logarithmic scaling becomes meaningful. In practice, for the 4–14 qubit systems in QEncode Suite v2, the difference is smaller than the theory suggests because the constant factors matter at small system sizes.

What the benchmark data shows

Across all five Suite v2 molecules and both ansatz families, three consistent patterns emerge from the benchmark data.

Pattern 1: Parity wins on circuit cost for UCCSD

For UCCSD, parity encoding consistently produces the shallowest circuits and lowest two-qubit gate counts. The two-qubit reduction compounds through the ansatz construction: fewer qubits means fewer excitation operators, which means fewer parameterized gates. For BeH₂ — the largest Suite v2 molecule at 14 qubits under JW — parity encoding reduces the two-qubit gate count by 18–24% compared to JW, and produces circuits 15–20% shallower.

This makes parity the default encoding recommendation for UCCSD on any of the Suite v2 molecules.

Pattern 2: JW and parity tie on accuracy

Despite the circuit depth advantage of parity, the energy gap results are statistically indistinguishable between JW and parity across all molecules. Both encodings reach chemical accuracy with UCCSD on H₂, LiH, and HF. Both struggle equally with N₂ under noisy conditions. The encoding doesn't affect the expressibility of the ansatz in the noiseless simulation setting — all three encodings reach the same FCI energy given sufficient optimization.

This means the accuracy leaderboard is encoding-neutral: a UCCSD result at parity encoding and a UCCSD result at JW encoding that both achieve chemical accuracy are equivalent scientifically. The difference only shows up in the cost and balanced categories.

Pattern 3: BK underperforms at small qubit counts

Bravyi-Kitaev's theoretical advantage is logarithmic scaling — meaningful when you have 50+ qubits. In the 4–14 qubit range of Suite v2, the overhead from the binary tree structure's non-local indexing pattern produces circuits that are consistently slightly deeper than parity and comparable to or slightly worse than JW.

For H₂ (4 qubits) and LiH (12 qubits), BK circuits have 5–12% more two-qubit gates than the parity equivalents. For N₂ and BeH₂, the gap is smaller but parity still comes out ahead. BK holds a theoretical advantage for future large-molecule benchmarks where qubit counts exceed 30–40, but it's not the practical choice for current Suite v2 molecules.

Encoding and hardware-efficient ansatz

The encoding choice matters much less for hardware-efficient ansatz than for UCCSD. HEA doesn't use the fermionic structure of the problem — it just places parameterized gates across the qubit register. The qubit reduction from parity encoding still applies (fewer qubits = shallower HEA circuit), but the effect is proportionally smaller because HEA circuits are already shallower and the ansatz structure doesn't amplify the qubit count difference the way UCCSD does.

For HEA on H₂ and LiH, JW and parity produce circuits that differ by only 1–2 two-qubit gates. For practical purposes, encoding choice is a secondary concern when using HEA on small molecules.

A note on Hamiltonian term count

One metric we track internally but don't surface on the leaderboard is the number of Pauli terms in the qubit Hamiltonian after encoding. This matters for shot-based (non-statevector) evaluation because each distinct Pauli term typically requires a separate measurement circuit.

Under JW, the Hamiltonian term count is generally higher than under parity or BK for the same molecule. For LiH under JW, the full qubit Hamiltonian has over 600 Pauli terms; under parity with two-qubit reduction, this drops below 450. For teams planning real hardware runs — where shot budget is a genuine constraint — this difference in Hamiltonian term count becomes significant and favors parity encoding more strongly than the noiseless simulation results suggest.

Practical recommendations

Based on the Suite v2 benchmark data:

Why encoding choice is underreported

Most VQE papers fix one encoding and don't discuss the choice. Jordan-Wigner is the most common default — it's conceptually simplest and most tutorials use it — which means a significant fraction of published results leave circuit depth optimization on the table. Switching from JW to parity encoding is a one-line change in Qiskit (replace JordanWignerMapper with ParityMapper) and consistently produces shallower circuits for UCCSD.

The QEncode leaderboard benchmarks all three encodings for every certified submission, so the encoding effect is always visible in the results. If your submission uses JW and a competitor uses parity, the cost leaderboard will show the difference directly.

See encoding comparisons on the live leaderboard

Every certified QEncode result includes results at Jordan-Wigner, parity, and Bravyi-Kitaev encoding. The leaderboard lets you filter by molecule, encoding, and ansatz to see the comparisons directly.

← All postsNext: UCCSD vs HEA →