Skip to main content
. 2019 Aug 15;21(8):800. doi: 10.3390/e21080800
Algorithm 2: Deutsch and Jozsa [10]
  Proceed with the following steps.
  1. Prepare an n-qubit query register in the state 0, and an output qubit in 1.

  2. Apply the Walsh-Hadamard transform to the query register and the output qubit.

  3. Apply the oracle.

  4. Apply the Walsh-Hadamard transform to the query register.

  5. Test if the output state of the query register is 0 by a measurement of the observable 00I2.

  If the test is positive, output “constant,” otherwise “balanced”.