Posts

Showing posts from May, 2023

Behind phase Oracles

Image
  Quantum algorithms such as Deutsch, Bernstein-Vazirani, Simon and Grove rely on Oracles. A particular class of Oracles, the phase Oracles, allows to selectively switch phases of the input state, thus helping these algorithms to distinguish states by their phases. In this blog I will explore a bit more this class of Oracles Firstly. lets revisit the superposition state for a single qubit $|0\rangle$ after applying the Hadamard gate:                     $ H\otimes|0\rangle = \frac {1} {\sqrt{2}} ( |0\rangle + |1\rangle ) = |+\rangle $ To recap, this is a state of maximum uncertainty when measured in the computational basis. In simple terms, it represents a state where, when measured, has equal probability of being 0 or 1. As mentioned before, the trick to make the information conveyed by a state more useful is to include a local phase to it. This can be achieved by adding a new qubit in the superposition state $|-\rangle =...

A View on the Deutsch Algorithm

Image
  The Deutsch Algorithm is an excellent example of the application of quantum parallelism using superposition of states. The problem which is solved by the algorithm is the following: Given an unknown function f(x): {0:1} -> {0,1}, by using the minimum amount of queries to this function, determine if the function is constant (it always returns 0 or always returns 1) or balanced (on half of the inputs it returns 0 and the other half, 1). In the classical case, we need to query the function twice, one for x=0 and a second for x=1. In case of the quantum algorithm, a single query can define if the function is balanced or constant. There are many articles explaining how the algorithm works. Here I've taken a different approach: After a brief recap of the algorithm, the analysis of the algorithm follows by opening each state and showing how the problem definition and the function we want to classify contributes to the algorithm output.  On its simplest form, the algorithm utiliz...