← Atlas

Basic circuits · Oracle algorithm benchmark

Alternating-parity oracle scaffold · 16 qubits

A deterministic parity-oracle circuit that marks alternating input wires through phase kickback.

Strong empiricalUpdated

View frozen graph

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

Deutsch-Jozsa on a balanced function

3 input qubits, testing f(x) = x0 XOR x1 XOR x2, which is balanced.

q0q1q2q3Step 1 of 6 · XXStep 2 of 6 · Hadamard layer(4)Hadamard layer(4)Step 3 of 6 · DJ balanced oracle(3)DJ balanced oracle(3)Step 4 of 6 · Hadamard layer(3)Hadamard layer(3)Step 5 of 6 · HHStep 6 of 6 · XX

Step 1 of 6 · X

Probability of each outcome after this step

  • 1000100%
  1. Sets the ancilla to |1⟩, so the next step can put it into |−⟩.

    The whole state moves from 0000 to 1000 — one certain outcome before, one certain outcome after, no superposition either side.

  2. Hadamards everything: the ancilla becomes |−⟩, and the three input qubits spread into an equal superposition of all 8 inputs.

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

  3. Applies f by CX-ing each input qubit onto the ancilla; against |−⟩, this kicks a phase (−1)^f(x) onto each input branch.

    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.

  4. A second Hadamard layer on the inputs only turns those phases into a deterministic readout.

    Probability gathers from 16 outcomes onto 2. 0111 goes from 6.3% to 50.0%.

  5. Undoes the ancilla's Hadamard.

    Probability gathers from 2 outcomes onto 1. 1111 goes from 50.0% to 100.0%.

  6. Returns the ancilla to |0⟩, purely for a tidy final state. It plays no further role in the algorithm.

    The whole state moves from 1111 to 0111 — one certain outcome before, one certain outcome after, no superposition either side.

Readout The three input qubits read 111 (any nonzero result proves f is balanced, not constant); the ancilla reads 0.

Open in Studio
  • Steps40
  • Wires16
  • Qubits16
  • Operations40
  • Framework exports7
  • Papers1
  1. X on q15
  2. H on q0
  3. H on q1
  4. H on q2
  5. H on q3
  6. H on q4
  7. H on q5
  8. H on q6
  9. H on q7
  10. H on q8
  11. H on q9
  12. H on q10
  13. H on q11
  14. H on q12
  15. H on q13
  16. H on q14
  17. H on q15
  18. CX on q0, q15
  19. CX on q2, q15
  20. CX on q4, q15
  21. CX on q6, q15
  22. CX on q8, q15
  23. CX on q10, q15
  24. CX on q12, q15
  25. CX on q14, q15
  26. H on q0
  27. H on q1
  28. H on q2
  29. H on q3
  30. H on q4
  31. H on q5
  32. H on q6
  33. H on q7
  34. H on q8
  35. H on q9
  36. H on q10
  37. H on q11
  38. H on q12
  39. H on q13
  40. H on q14

References

Strong empirical
  • Verified by construction
  • Peer-reviewed paper
Method
Deterministic portable-gate construction plus catalog schema validation
Result
Pass · 16 qubits and 40 pre-measurement operations emit non-empty Qiskit, PennyLane, Cirq, CUDA-Q, Amazon Braket, OpenQASM 3.0, and PyQuil source.
Caveat
This is a parameterized Leona Quantum benchmark scaffold informed by the cited suite, not an upstream benchmark file or a hardware result.
MQT Bench: Benchmarking Software and Design Automation Tools for Quantum Computing ↗
Kind
curated reference
Reviewed by
Leona Quantum curation pass
License
Citation metadata; Leona Quantum-authored scaffold
Deutsch–Jozsaparityoracle16 qubitsseven-framework export

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