Skip to content

Commit 86064e8

Browse files
committed
feat: ✨ add detailed explanation of the Deutsch Problem and Quantum Oracle in IQC 006
1 parent c988258 commit 86064e8

1 file changed

Lines changed: 29 additions & 0 deletions

File tree

blog/2026/03/30/iqc-006.md

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,38 @@ x & {\color{orange}{f_0}} & f_1 & f_2 & {\color{blue}{f_3}} & f_4 & {\color{blu
3737
\end{array}
3838
$$
3939

40+
## The Deutsch Problem
41+
42+
- Given a boolean function $f:\{0,1\}^{n} \to \{0,1\}$, determine if $f$ is constant or balanced.
43+
- **Constant**: same output for all inputs.
44+
- **Balanced**: outpus 0 for half the inputs and 1 for the other half.
45+
4046
## The Quantum Oracle
4147

4248
- Traditional **Oracle**: black box that computes $f$.
4349
- Query complexity: number of queries to the oracle needed to solve a problem.
4450

4551
$$ x \xrightarrow{O_f} f(x) $$
52+
53+
- **Quantum Oracle**: unitary operation that encodes $f$.
54+
55+
$$ U_f \ket{x}\ket{y} = \ket{x}\ket{y \oplus f(x)} $$
56+
57+
- First register: input $x$.
58+
- Second register: auxiliary qubit initialized to $\ket{0}$ or $\ket{1}$.
59+
- Oracle don't change $x$, but flips $y$ if $f(x)=1$.
60+
- $0 \oplus 0 = 0$
61+
- $0 \oplus 1 = 1$
62+
- $1 \oplus 0 = 1$
63+
- $1 \oplus 1 = 0$
64+
- $f(x) = 0$: $y$ unchanged.
65+
- $f(x) = 1$: $y$ flipped.
66+
- Example:
67+
- $\ket{x}\ket{0}$
68+
- $U_f \ket{x}\ket{0} = \ket{x}\ket{0} \oplus \ket{f(x)} = \ket{x}\ket{f(x)}$.
69+
- if $f(x) = 0$: $\ket{x}\ket{0}$.
70+
- if $f(x) = 1$: $\ket{x}\ket{1}$
71+
- so that it ignores the input $x$ and only flips the second qubit if $f(x)=1$.
72+
- it can be reversed: $(y \oplus f(x)) \oplus f(x) = y$.
73+
- if we put the second register to $\ket{-}$, $f(x)$ will be encoded **in the phase** of the first register:
74+
- $\ket{x}\ket{-}\mapsto (-1)^{f(x)} \ket{x} \ket{-}$.

0 commit comments

Comments
 (0)