QubitLab
IDELearnPlaygroundDocsCommunity
Log in
QubitLab
IDELearnPlaygroundDocsCommunity
Log in
HomeLearnCatalogRanksPlaygroundDocs
  1. Docs
  2. Metrics: comparing distributions
Learn
  • Quantum basics
  • OpenQASM 3 cheat sheet
  • All gates, with the math
  • Every gate, interactive
  • Entanglement: how CNOT connects qubits
Circuits
  • Dynamic circuits: if/else, loops and conditions
Lessons
  • Learning path: from one qubit to algorithms
  • Quantum machine learning by hand
Run
  • Compile (transpile): levels, basis gates, topology
  • Simulators, noise, T1/T2 and fake backends
  • Python in the Playground
  • GitHub and git in the Playground
  • Articles and sharing
Analyze
  • Metrics: comparing distributions
  • Q-sphere and Bloch spheres
Hardware
  • Real IBM Quantum hardware
  • Device topology and calibration heat maps
  • Benchmark circuits: MQT Bench and QASMBench
Advanced
  • Circuit cutting, in depth
Story
  • The story of quantum computing
  • The Hamiltonian: where gates come from
  • What to expect next
Documentation/Analyze/Metrics: comparing distributions

Metrics: comparing distributions

Every target's outcome distribution q is compared with the ideal statevector distribution p.

TVD(p,q)=21​x∑​∣p(x)−q(x)∣
Total variation distance: 0 = identical, 1 = no overlap. The most intuitive 'how wrong' number.
FH​(p,q)=(x∑​p(x)q(x)​)2,DH​=1−FH​​​
Hellinger fidelity (1 = identical) and distance. Matches qiskit.quantum_info.hellinger_fidelity.

Success probability is the probability the target assigns to the ideal most likely bitstring: the number you care about for algorithms with one right answer (Grover, Bernstein–Vazirani).

pqTVDHellinger fidelity
{00: .5, 11: .5}same01
{00: .5, 11: .5}{00: .5, 01: .5}0.50.25
← Previous
Articles and sharing
Next →
Q-sphere and Bloch spheres
Try it in the IDE →
QubitLab
IDELearnPlaygroundDocsCommunity
Log in
QubitLab
IDELearnPlaygroundDocsCommunity
Log in