Measurement Grouping
A realistic molecular Hamiltonian decomposes into hundreds or thousands of Pauli terms. Measuring each one in its own circuit — preparing the trial state, rotating, sampling, repeating — is the dominant cost of VQE. Measurement grouping slashes that cost by measuring many terms from a single circuit. The key fact: terms that commute share a common eigenbasis, so one measurement in that basis estimates them all.
Commuting families
Two observables and can be measured simultaneously if and only if . For Pauli strings there are two useful notions of commutation:
- Qubit-wise commuting (QWC). Two strings commute qubit by qubit — on every qubit their single Pauli factors are equal or one is identity. Such a group is diagonalized by single-qubit rotations only (an for each , an for each ).
- General commuting. The strings commute as full operators even if they clash on individual qubits (for example and commute). These need a small entangling Clifford circuit to reach the shared eigenbasis, but they pack more terms per group.
From terms to cliques
Decide which terms can share a measurement, then partition the term set into as few groups as possible. Build a graph whose vertices are Pauli terms and whose edges connect commuting pairs; a valid grouping is a partition into cliques (fully-connected subsets). Minimizing the number of groups is the minimum clique cover problem. It is NP-hard in general, but cheap greedy colorings (Verteletskyi et al.) already cut the number of distinct measurement circuits by large factors on real molecules.
Reading several expectations from one histogram
Suppose you measure two qubits in the basis and obtain probabilities . From this one distribution you can read off three expectation values, using the sign rule , :
Three terms, one circuit. Scaled up to a clique of dozens of commuting terms, this is exactly where the savings come from.
Try it
Prepare the trial state with on qubit 0 and on qubit 1, then measure both qubits in the computational basis. The grader checks the full measurement distribution — the single histogram from which all of , , and can be reconstructed.
After running, open the Probabilities tab and verify by hand that , consistent with placing qubit 1 exactly on the equator.
Sign in on the full site to ask questions and join the discussion.