August 21st, 2019

Quantum Koan: High Probability

Mariia Mykhailova
Principal Software Engineer

A novice approached the master asking for a code review of his implementation of Grover’s search. The master examined the code and found that the algorithm terminated after applying a certain number of iterations and measuring the qubits to obtain the answer. The measurement was preceded by a comment: “This produces a solution to the search problem with high probability”.

That evening at dinner the novice was served a separate bowl with a note: “This food is not poisoned with high probability”.

Upon seeing this the novice was enlightened.

Scribe’s poem

Had the novice implemented Deutsch–Jozsa,
They would not have gone to bed hungry.
Randomized algorithms are like that,
No matter quantum or classical.

Scribe’s notes

This pseudo-koan has been inspired by The Codeless Code – a collection of short metaphoric stories about software development.

If you need more insight in the nuances of Grover’s algorithm, try to implement it in the Grover’s algorithm quantum kata.

Category
Q#

Author

Mariia Mykhailova
Principal Software Engineer

Mariia Mykhailova is a principal software engineer at the Advanced Quantum Development team at Microsoft. She works on developing software for fault-tolerant quantum computation. Mariia is also a part-time lecturer at Northeastern University, teaching Introduction to Quantum Computing since 2020, and the author of O’Reilly book “Q# Pocket Guide”. In her spare time, she writes problems for programming competitions and creates puzzles.

0 comments

Discussion are closed.

Feedback