Level 3, Propeller head

Fidelity

The scale runs from 0 to 1, and a score of 1 means the two states match up to a global phase. The mark sits near 1, which is the region where a long circuit can still accumulate a miss.

Fidelity is a score from 0 to 1 for how close two quantum states are. A score of 1 means the same state, up to a global phase that no experiment sees. A gate fidelity is the same idea applied to an operation, scoring a real gate against the ideal one written on the page.

A score that looks very close to 1 can still disappoint in a long circuit, because small misses accumulate gate by gate. Malcolm does that accumulation on paper before he lets a percentage sound like reassurance.

An example

Say you meant to make |+⟩, with 0.71 and 0.71, and the machine made 0.8 for 0 and 0.6 for 1. Multiply the matching amplitudes and add. Each 0.71 is 1 over the square root of 2, so that gives (0.8 + 0.6) ÷ 1.41, about 0.99. This sum is the overlap. Its square, 1.96 ÷ 2 = 0.98, is the fidelity.

The 0.98 is the chance that a test for |+⟩ says yes. H turns |+⟩ into a certain 0, so press H and read. On the machine’s state H gives about 0.99 and 0.14, a 0 in 98 runs out of 100.

Taking the size of the overlap makes a global phase harmless. Put a minus on the whole state, giving −0.8 and −0.6. The overlap is about −0.99, and the squared size is still 0.98.

With complex amplitudes, flip the sign of each imaginary part in the ideal state before you multiply. Score 0.71 and 0.71i against itself this way and you get 1, as you should, but skip the flip and you get 0. Against |+⟩ it scores 0.5.

Say each gate scores 0.99 and the scores simply multiply, a rough rule since real misses can add up or partly cancel. Then 100 gates score 0.99 to the power 100, about 0.37.

What it is not

A fidelity of 0.98 does not mean 2 percent of the qubit is wrong, or that every reading is 98 percent right. A plain reading of the machine’s state gives 0 in 64 runs out of 100, against 50 for |+⟩. No test can do much better here. The biggest possible gap is about 14 runs in 100.

And it is not one fixed formula in every book. This entry squares the overlap. Some books call the size of the overlap, unsquared, the fidelity. That gives 0.99 above, not 0.98, so check which a paper uses before you compare.

The score compares two states and ignores a global phase. Noisy states are often mixed states, which need a longer formula. Error correction pays only once each gate scores high enough, and the note Noise scrambles the sign shows the phase fading, one common reason a score drops.

All the words