Lesson plan

Swap test

The swap test is a procedure in quantum computation that is used to check how much two quantum states differ, appearing first in the work of Barenco et al. and later rediscovered by Harry Buhrman, Richard Cleve, John Watrous, and Ronald de Wolf. It appears commonly in quantum machine learning, and is a circuit used for proofs-of-concept in implementations of quantum computers. Formally, the swap test takes two input states |\phi\rangle and |\psi\rangle and outputs a Bernoulli random variable that is 1 with probability \textstyle\frac{1}{2} - \frac{1}{2} ^2 (where the expressions here use bra–ket notation). This allows one to, for example, estimate the squared inner product between the two states, ^2 , to \varepsilon additive error by taking the average over O(\textstyle\frac{1}{\varepsilon^2}) runs of the swap test. This requires O(\textstyle\frac{1}{\varepsilon^2}) copies of the input states. The squared inner product roughly measures "overlap" between the two states, and can be used in linear-algebraic applications, including clustering quantum states.

Back to article

Article summary

The swap test is a procedure in quantum computation that is used to check how much two quantum states differ, appearing first in the work of Barenco et al. and later rediscovered by Harry Buhrman, Richard Cleve, John Watrous, and Ronald de Wolf. It appears commonly in quantum machine learning, and is a circuit used for proofs-of-concept in implementations of quantum computers. Formally, the swap test takes two input states |\phi\rangle and |\psi\rangle and outputs a Bernoulli random variable that is 1 with probability \textstyle\frac{1}{2} - \frac{1}{2} ^2 (where the expressions here use bra–ket notation). This allows one to, for example, estimate the squared inner product between the two states, ^2 , to \varepsilon additive error by taking the average over O(\textstyle\frac{1}{\varepsilon^2}) runs of the swap test. This requires O(\textstyle\frac{1}{\varepsilon^2}) copies of the input states. The squared inner product roughly measures "overlap" between the two states, and can be used in linear-algebraic applications, including clustering quantum states.

Key claims

No claims recorded.

Discussion questions

  1. Summarise the article in your own words. Which single claim would you verify first, and why?
  2. Which claim in this article is most likely to be revised as the sources update? How would you check its current status?
  3. If two sources disagreed about one of these facts, what would you need in order to trust one over the other?

Bibliography

No sources recorded.

Key claims and bibliography are generated from the same tracked claims and sources as the article page.