Translate

Wednesday, 17 December 2025

what is Fidelity / Gate Fidelity in quantum computing. explain with examples

In the context of quantum computing, Fidelity is a score (ranging from 0 to 1, or 0% to 100%) that measures how "close" a real-world quantum state or operation is to the perfect, ideal theoretical version.1

Think of it like an accuracy score for a musician playing a song. If they play every note perfectly, the fidelity is 1 (100%).2 If they miss a few notes or play slightly out of tune, the fidelity drops to 0.9 or lower.3

Here is the breakdown of the two main types: State Fidelity and Gate Fidelity.


1. State Fidelity (The "Snapshot" Score)

State fidelity measures the accuracy of the quantum information stored in a qubit at a specific moment in time.4 It compares the state you actually have in the hardware against the state you wanted to prepare.

  • Ideal: 5$F = 1$ (The states are identical).6

  • Worst Case: 7$F = 0$ (The states are completely opposite/orthogonal).8

The Formula

For two pure quantum states, the target state 9$|\psi\rangle$ and the actual state 10$|\phi\rangle$, the fidelity is the squared overlap between them:11

$$F = |\langle \psi | \phi \rangle|^2$$

Example

Imagine you want to prepare a qubit in the "Up" state ($|0\rangle$).

  • Ideal Scenario: Your hardware works perfectly. The actual state is $|0\rangle$.

    • Calculation: $F = |\langle 0 | 0 \rangle|^2 = 1^2 = 1$. (100% Fidelity).

  • Real Scenario (Noise): Due to heat or magnetic interference, the qubit tilts slightly.12 Instead of pointing straight up, it is tilted by a small angle $\theta$. The actual state is slightly mixed with $|1\rangle$.

    • If the overlap is $0.99$, your fidelity is $0.99^2 \approx 0.98$.

    • This means your qubit is "98% accurate" relative to the target.


2. Gate Fidelity (The "Action" Score)

Gate fidelity is more complex; it measures the accuracy of an operation (like a logical gate) rather than just a static state.13 It answers the question: "When I tell the computer to perform an operation (like flipping a bit), how often does it do it correctly?"

Because a gate acts on any input state, Gate Fidelity is essentially the average state fidelity over all possible input states.

  • High Gate Fidelity (>99%): The gate is reliable and introduces very little noise.14

  • Low Gate Fidelity (<90%): The gate is "noisy" and essentially garbles the data.

The Concept

If you have a NOT gate (X-gate) that is supposed to flip $|0\rangle$ to $|1\rangle$:

  • Perfect Gate: Always turns $|0\rangle \rightarrow |1\rangle$ and $|1\rangle \rightarrow |0\rangle$ exactly. $F_{gate} = 1$.15

  • Noisy Gate: Sometimes it over-rotates or under-rotates. Maybe it turns $|0\rangle$ into $99.9\% \ |1\rangle$ and $0.1\% \ |0\rangle$.

Example: The "Three Nines" Standard

In the industry, you often hear about "two nines" (99%) or "three nines" (99.9%) gate fidelity.16

  • 99.9% Fidelity: This implies that, on average, the gate operation will fail or introduce a fatal error only 1 time out of 1000 executions.

  • Why this matters: If you run an algorithm with 1,000 gates (which is a small algorithm), and each gate has 99.9% fidelity, your total chance of success is roughly $0.999^{1000} \approx 36\%$. If the fidelity drops to 99%, your success rate plummets to $0.99^{1000} \approx 0.004\%$. This illustrates why high gate fidelity is absolutely critical for running useful algorithms.


Summary Comparison table

FeatureState FidelityGate Fidelity
What it measuresAccuracy of a qubit's current status (Static).Accuracy of an operation performed on a qubit (Dynamic).
AnalogyIs the car parked exactly in the spot?Does the steering wheel turn the car exactly 90°?
Key Use CaseChecking memory storage (coherence).Checking processor performance (logic gates).
Mathematical BasisOverlap (Inner Product).Average overlap over all inputs.

Why is this important?

Quantum Error Correction (QEC) requires a specific threshold of gate fidelity to work.17 If your physical gate fidelity is below a certain "threshold" (often cited around 99% to 99.9% depending on the code), adding more qubits to correct errors will actually introduce more noise than it fixes. We are currently in the era of trying to push Gate Fidelities past this "break-even" point.

No comments:

Post a Comment

Note: only a member of this blog may post a comment.