← Atlas

Algorithms · Generalized Grover / amplitude amplification

Viterbi decoding of classical convolutional codes

The Viterbi algorithm finds the most likely sequence of hidden states a hidden Markov model passed through, given a sequence of emissions. Applied to decoding, the hidden states are the encoder states of a classical convolutional code and the emissions are the received symbols, so the most likely path is the decoded message.

Attested & literatureUpdated

View frozen graph

A small worked example, computed in your browser. It is not a result from this record's papers.

Grover's algorithm finds |101⟩

3 qubits, searching for |101⟩ among 8 states, with 2 Grover iterations.

q0q1q2Step 1 of 5 · Hadamard layer(3)Hadamard layer(3)Step 2 of 5 · Phase oracle(101)Phase oracle(101)Step 3 of 5 · Grover diffuser(3)Grover diffuser(3)Step 4 of 5 · Phase oracle(101)Phase oracle(101)Step 5 of 5 · Grover diffuser(3)Grover diffuser(3)

Step 1 of 5 · Hadamard layer(3)

Probability of each outcome after this step

  • 00013%
  • 00113%
  • 01013%
  • 01113%
  • 10013%
  • 10113%
  • 11013%
  • 11113%
  1. Spreads the state into an equal superposition of all 8 three-qubit strings. Every answer is equally likely, including the right one.

    Probability spreads from 1 outcome to 8. All 8 are equally likely.

  2. The oracle marks |101⟩ by flipping its sign, and leaves the other seven states exactly as they were. Measuring now would be no better than guessing — the mark is a phase, and a phase is not an outcome.

    The outcome probabilities do not move at all. What this step changes is phase — 2 distinct relative phases across the state now — which no measurement can see until a later step turns it back into probability. This is the step that entangles the qubits: from here on no single qubit has a state of its own, only the register as a whole does.

  3. The diffuser reflects every amplitude about their average. The marked state sits below the average because its sign was flipped, so reflecting pushes it up and pulls the other seven down. This is where the phase becomes probability.

    Probability moves between the same 8 outcomes. Up: 101 12.5% → 78.1%. Down: 111 12.5% → 3.1%, 011 12.5% → 3.1%.

  4. The same oracle again, flipping the sign of |101⟩ — now the largest amplitude rather than one of eight equal ones.

    The outcome probabilities do not move at all. What this step changes is phase — 2 distinct relative phases across the state now — which no measurement can see until a later step turns it back into probability.

  5. And the same reflection again. Two iterations is close to the optimal number for 8 states: a third would overshoot and start pushing the answer back down.

    Probability moves between the same 8 outcomes. Up: 101 78.1% → 94.5%. Down: 100 3.1% → 0.8%, 010 3.1% → 0.8%.

Readout Measuring gives 101, the marked state, with high probability.

Open in Studio
  • Record typeLiterature reference
  • Speedup class (secondary source)Varies
  • Primary source on the speedupStated by the primary source: "We present a quantum Viterbi algorithm (QVA) with better than classical performance under certain conditions. … The quantum speedup is possible because the performance of the QVA depends on the fanout (number of possible transitions from any given state in the hidden Markov model) which is in general much less than Q."
  • Reported costA single iteration has gate complexity O(N |Q| F (log F)²) and time complexity O(N log F) if |Q| quantum systems can be manipulated simultaneously, where N is the frame length, Q the state set and F the fanout. The number of iterations can be up to O(√L) as in Grover's algorithm, with L = N F log F, giving O(√(F^N) N log F) overall when the maximal amount of parallelism is used.
  • Papers1

This record is not a concrete circuit.

References

  • A quantum algorithm for Viterbi decoding of classical convolutional codes

    Jon R. Grice, David A. Meyer · 2014

    Primary source, and the source of this record's cost claim. Consult it for the simultaneous-manipulation assumption that the time complexity is conditioned on, for the fanout-versus-state-set relationship that the whole advantage argument rests on, and for section 3, where the phase parameter is chosen numerically because the general analysis is difficult.

Attested & literature
  • Peer-reviewed paper
Method
Curation only. The problem statement was recorded from the literature; the speedup class is checked against the record's own primary paper, which states it; the primary reference's title, authors and submission year were read from its arXiv abs page; the complexity claim was taken from a clause of that paper's abstract (section 1 of arXiv:1405.7479: "A single iteration of the QVA will be shown to have gate complexity O(N |Q|F(log F)²) and time complexity O(N log F), if |Q| quantum systems can be manipulated simultaneously."; same section: "The number of iterations in general can be up to O(√L) as in Grover's algorithm [1], where here L = N F log F."; and "If using the maximal amount of parallelism, the QVA decodes the convolutional code in time O(√(F^N) N log F)."). No circuit was constructed, simulated or run.
Result
Pass · the record's problem, speedup class and primary reference agree with the two sources named above.
Caveat
This is a literature record: no circuit was built, compiled, simulated or run, and no codeword was decoded here. The advantage is conditional and the paper says so — it is most apparent for fanout much smaller than the state set and for short decode frames, so nothing here claims a speedup for a general hidden Markov model. The headline time complexity is bought with an explicit hardware assumption stated in the same sentence, that |Q| quantum systems can be manipulated simultaneously; without that parallelism the gate complexity, not the time complexity, is the figure that applies. No formula for the classical Viterbi algorithm's own cost appears anywhere in the text read, so the comparison is argued through the relationship between the fanout and the state set rather than by putting two bounds side by side, and this record cannot state the classical baseline. A single iteration is explicitly not enough — the paper notes it is only a constant factor better than a random guess, which is correct with probability 2^(−N) — so the advantage depends on the iteration count. The paper also leaves open whether its optimization step is optimal, and says the general analysis is difficult, with the phase parameter chosen numerically for small frame lengths rather than derived. Finally the Zoo's speedup class for this entry is "Varies", which is a class about the entry rather than about this paper.
A quantum algorithm for Viterbi decoding of classical convolutional codes ↗
Kind
curated reference
Reviewed by
Leona Quantum curation pass
License
Citation metadata only; source publication terms apply
viterbi algorithmconvolutional codedecodinghidden markov modelamplitude amplification

Atlas stars stay in the public catalog. Saving this entry to your workspace starts an unstarred private copy.