# Tag Info

### 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 ...

### 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 ...
Accepted

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 ...

### 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 ...
Accepted

### 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 ...
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 ...
Accepted

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 ### 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. ... 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.... 4 votes Accepted ### In Deutsch's algorithm, how to we get (-1)^{f(x)}|x\rangle(|0\rangle-|1\rangle) from |x\rangle(|0\rangle-|1\rangle)? It is limited to matrix U_f which maps |x,y\rangle to |x,y\oplus f(x)\rangle, and the little thought is$$U_f|x,-\rangle=\frac{1}{\sqrt{2}}(|x,0\oplus f(x)\rangle-|x,1\oplus f(x)\rangle)==\...
Your first formula is not correct. The correct formula for Hadamard gates for the arbitrary $|x\rangle$ from the calculational basis is (it can be proved by induction): H^{\otimes n}|x\rangle=\frac{...