appendix D  Exploring the Deutsch–Jozsa algorithm by example

In this appendix, we do a deep dive on the Deutsch–Jozsa algorithm to show how it works and how we can use the skills and tools we developed in chapter 8 to check our understanding. We implement the Deutsch–Jozsa algorithm in chapter 7 and make heavy use of QuTiP for checking our math at certain steps.

D.1 Using our skills to try things

In chapters 2 and 5, we learn to use NumPy and QuTiP to simulate how the states of qubits are transformed when we send instructions to a quantum computer. We effectively use these packages to do math for us to find out what happens to our quantum states. This is like the “make the computer do the math” approach in figure D.1.

Figure D.1 Three different ...

Get Learn Quantum Computing with Python and Q# now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.