12
votes
How would I implement the quantum oracle in Deutsch's algorithm?
There are two questions here. The first asks how you might actually implement this in code, and the second asks what's the point if you know which oracle you're passing in.
##Implementation
Probably ...
10
votes
How to prove that the query oracle is unitary?
Apply it twice:
$$
O_xO_x|i\rangle|b\rangle=O_x|i\rangle|b\oplus x_i\rangle=|i\rangle|b\oplus x_i\oplus x_i\rangle=|i\rangle|b\rangle
$$
Hence, $O_x$ is its own inverse, and therefore reversible.
To ...
10
votes
Accepted
Why doesn't Deutsch-Jozsa Algorithm show that P ≠ BQP?
I believe there are two issues here. The first isn't anything wrong with your statement, but rather that you could make a far stronger (non-quantum) statement by the same reasoning: $\mathsf{P}\neq \...
9
votes
Accepted
Understanding the oracle in Deutsch's algorithm
Remember that when you define the oracle effect as $B_f |x \rangle |y \rangle = |x \rangle |y \oplus f(x) \rangle $, $f(x)$ is a classical function of a classical 1-bit argument, so you do not have a ...
9
votes
Accepted
Is the Deutsch-Jozsa problem in NP?
NP is a class of decision problems, so before considering the membership of the problem in NP, we first need to formulate a decision variant of it. This entails, among other things$^1$, the choice of ...
8
votes
How is the Deutsch-Jozsa algorithm faster than classical for practical implementation?
I think there are probably two points to make here:
The way that one implements quantum computation is not by simply looking at the unitary matrix and building something out of that, in just the same ...
7
votes
Accepted
Balanced vs unbalanced superposition distinguisher
It is not possible at an information-theoretic level to do what you want to do.
Let us suppose we have two pure states: $|\phi\rangle$ and $|\psi\rangle$, where
$$
|\phi\rangle = \frac{1}{\sqrt{N}}\...
7
votes
Accepted
How is the Deutsch-Jozsa algorithm faster than classical for practical implementation?
If you see the operator only from the unitary matrix point of view and you enumerate all inputs/outputs, which makes you visualize the matrix, indeed you somehow already know the answer.
However, ...
7
votes
Accepted
Where is the parallelism in Deutsch-Jozsa algorithm?
In fact, in the original paper of Deutsch and Jozsa they actually implemented two oracles, here comes their procedure. If you omit the second $U_f$ and get a state $|\psi\prime>=\displaystyle\sum_{...
7
votes
Accepted
What kind of boolean functions are faster to compute on qc?
Following up on @luciano's answer, I think you are envisioning a quantum computer as being fast at evaluating functions, when in actuality, quantum computers are better at evaluating global properties ...
7
votes
Why isn't output of Deutsch–Jozsa Algorithm simply $|0\rangle$?
This is because of what known as Phase kickback.
The phase of the bottom qubit can kick back and create a relative phase change on the top qubit. This is a very useful and often use trick in quantum ...
7
votes
Where does Deutsch's algorithm use entanglement?
TL;DR: No entanglement is created in the course of Deutsch's algorithm.
Generalization
Deutsch's algorithm is a special case of Deutsch-Jozsa algorithm with $n=1$ qubits in the query register. ...
6
votes
How can a CNOT gate change the control qbit (e.g. in the Deutsch Oracle problem)?
The controlled dot doesn't do anything: it merely observes the bottom qubit in order to decide whether to apply the 𝑋 gate onto the top qubit.
In the answer below, the qubit that appears first is ...
6
votes
Accepted
Understanding Steps in Deutsch's Algorithm
To answer your first question, the quantum oracles are defined by their effect on the basis states $|0\rangle$ and $|1\rangle$, and if the oracle has to be computed on a superposition of basis states, ...
6
votes
Where is the parallelism in Deutsch-Jozsa algorithm?
"Where is the parallelism in Deutsch-Jozsa algorithm?"
Instead of inputting just 0 or just 1 into the black box, you input both 0 and 1 into the black box at the same time, because you send ...
5
votes
Accepted
Implementing the one-bit Deutsch Oracle algorithm using phase
Overview
To recap the one-bit Deutsch Oracle problem, there are four possible oracle functions: constant-0, constant-1, identity, and negation. The task is to determine whether the oracle function is ...
5
votes
Deutsch-Jozsa on non-balanced oracles
This is not so straightforward, I suspect. The issue is being able to distinguish between the constant case (e.g. every input gives output 0) and the case where only one input returns 1, and all ...
5
votes
Accepted
How to prove that the query oracle is unitary?
Notice that $\mathcal O_x$ is a permutation matrix.
The matrix elements are
$$\langle j, c\rvert\mathcal O_x\lvert i,b\rangle
=\delta_{ij}\langle c\rvert b\oplus x_i\rangle
=\delta_{ij}\delta_{c,b\...

glS♦
- 23.4k
5
votes
How would I implement the quantum oracle in Deutsch's algorithm?
There is no way to build the oracle in a way which would not defeat the point of Deutsch's algorithm - that's why it is an oracle-based algorithm.
The only way would be if you would come up with an ...
5
votes
Accepted
What can be a mini research project based on Grover's algorithm or the Deutsch Jozsa algorithm?
(Based on the time limitation I assume we're talking about an undergraduate level project, and not something more advanced.)
If you look at the questions about Grover's algorithm, you'll notice that ...
5
votes
Accepted
Analysis of the second Hadamard in the Detusch-Jozsa Algorithm
If you look at the formula you want to prove term-by-term, you'll notice that the sum and the $(-1)^f(x)$ part is the same in both formulas; you just need to show that
$$H^{\otimes n} |x\rangle = \...
5
votes
Accepted
Probability estimate in classical Deutsch-Jozsa problem
Yes, it will depend on $n$ because sampling with replacement is assumed in the proof, which doesn't make sense if $n$ is finite. Intuitively, if a function $f$ really is balanced, and first output ...
5
votes
Accepted
Understanding the working of oracle in Deutsch - Jozsa Algorithm
Here the subscripts are of the form $1i$, where $i$ is the label of the subsystem (recall that you are using two qubits for this $\left|\psi\right>_0=\left|00\right>_{1}$). So any product of ...
5
votes
Example of a quantum algorithm better than its classical counterpart which involves only $1$ qubit?
There aren't many examples! The main reason for advantages in quantum computers is the ability to constructively combine amplitudes - if you've only got 1 qubit, there aren't any amplitudes to combine!...
5
votes
Accepted
Why does the Hadamard gate satisfy $H|x\rangle=\frac{1}{\sqrt2}\sum_{z\in\{0,1\}}(-1)^{xz}\lvert z\rangle$?
This is just a compact way of representing the Hadamard operator. The summation operator can be expanded, yielding:
$$ \frac{1}{\sqrt{2}} \Big( (-1)^{x \cdot 0} | 0 \rangle + (-1)^{x \cdot 1} | 1 \...
5
votes
Accepted
Shouldn't the input state of Deutsh-Jozsa's algorithm look like $|0\rangle^{\otimes n}\otimes |1\rangle$ rather than $|0\rangle^{\otimes n}|1\rangle$?
This is just a convention. People tend to write $|01 \rangle$ instead of $|0 \rangle \otimes |1\rangle $, but they mean the same thing. In this case,
$$ \overbrace{|0\rangle \otimes |0\rangle \otimes \...
5
votes
Accepted
Deutsch's algorithm makes no sense
In your framing, the second qubit is the ancilla that's initialized to $\vert 0\rangle$. That is, the first qubit is the input qubit, which remains the same after application of the oracle, and the ...
4
votes
How would I implement the quantum oracle in Deutsch's algorithm?
I think that ahelwer's answer touches on some the ways that we think about the complexity of algorithms. However — given that we don't literally have "oracles&...
4
votes
Balanced vs unbalanced superposition distinguisher
There are many different variants depending on what it is precisely that you want to achieve (note, this was written before recent edits, although I think there is still value/relevance in this more ...
4
votes
Accepted
How to measure one of the qubits in a two-qubit register?
To measure, observe that you are simply projecting a quantum state onto some basis set of vectors. First, I will note that this state is not normalized. Let us first define the following quantum state....
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
deutsch-jozsa-algorithm × 92quantum-algorithms × 48
oracles × 15
textbook-and-exercises × 13
quantum-gate × 11
nielsen-and-chuang × 9
quantum-state × 7
entanglement × 6
complexity-theory × 6
bernstein-vazirani-algorithm × 6
hadamard × 5
qiskit × 4
mathematics × 4
grovers-algorithm × 4
ibm-q-experience × 3
circuit-construction × 3
measurement × 3
speedup × 3
simulation × 2
quantum-circuit × 2
shors-algorithm × 2
linear-algebra × 2
photonics × 2
bqp × 2
quantum-parallelism × 2