# Interpreting quantum oracles that makes a quantum operation

I am preparing for my master thesis in Quantum Image Processing (QImP), i choose to work with Novel Enhanced Quantum Representation of Digital Images (NEQR).

To convert an image from Classical domain to Quantum domain we need to do a Quantum Image Preparation which in case of NEQR is consists of two steps as shown in the image below:

The second step is the one that set the colors. The paper descripe this step as follow

It is divided into $2^{2n}$ sub-operations to store the gray-scale information for every pixel. For pixel $(Y,X)$, the quantum sub- operation $U_{YX}$ is shown as (8) $$U_{YX} = \Biggl(I \otimes \sum_{j=0}^{2^n -1} \sum_{i=0,ji \neq YX}^{2^n - 1} \lvert ji \rangle \langle ji \rvert \Biggr) + \Omega_{YX} \otimes \lvert YX \rangle \langle YX \rvert \tag{8}$$

Where $\Omega_{YX}$ is a quantum operation as shown in (9), which is the value setting operation for pixel $(Y,X)$: $$\Omega_{YX} = {\displaystyle \bigotimes_{i=0}^{q-1} \Omega_{YX}^{i}} \tag{9}$$ Because $q$ qubits represent the gray-scale value in NEQR, $\Omega_{YX}$ is consisted of $q$ quantum oracles as shown in (10): $$\Omega_{YX}^{i} : \rvert 0 \rangle \rightarrow \Bigl\rvert 0 \oplus C_{YX}^{i} \Bigr\rangle \tag{10}$$ From (10), if $C_{YX}^{i}=1, \Omega_{YX}^i$ is a $2n - CNOT$ gate. Otherwise, it is a quantum gate which will do nothing on the quantum state.

My question is, how (10) is a $2n - CNOT$ gate if $C_{YX}^{i}$ is $1$?

From my understanding $C_{YX}^{i}$ is a computational basis, that is it is either $\rvert 0 \rangle$ or $\rvert 1 \rangle$ and the tensoring of $C_{YX}^{i}$ in (9) will produce a column vector.

Also if i interpret $\Bigl\rvert 0 \oplus C_{YX}^{i} \Bigr\rangle$ as follow: it is the result of $0 \oplus C_{YX}^i$ this is just $C_{YX}^i$ because $0 \oplus x$ is just $x$. Where $\oplus$ is XOR. How this will produce a $2n-CNOT$ gate where it is a 3 qubit gate (its matrix is 8 * 8)

• I know that, but in (10) i think that the part after the right arrow is the classical 0 and the result of this Boolean operation is the content of the ket. Could this be true ? @ShivDuttSharma – Abdalla Essam Ali Apr 4 '17 at 14:36

The interpretation of the tensor in (9) is not correct. The quantum states are being represented in the computational basis, meaning, any state will be represented as a mixture of $|0\rangle$ and $|1\rangle$, but this is not particularly important, it could be any basis, in this case is just notationally easier. Further, the tenor in (9) is over the $\Omega_{YX}^i$, not the $C_{YX}^i$ (is this a typo?), and each $\Omega_{YX}^i$ is an operator, and thus the tensor $\Omega_{YX} = \bigotimes^{q-1}_{i=0}\Omega_{YX}^i$ would again be an operator, on the $q$ qubits. It could be easier to think of as a matrix, but this is not particularly beneficial I think.
There is a typo I think. If $C^i_{YX} = 1$, $\Omega_{YX}^i$ would be a $2n$-CNOT, and not $\Omega_{YX}$ as you have written. When $C_{YX}^i = 1$, $\Omega_{YX}^i|0\rangle = |1\rangle$.
I don't know what $C_{YX}^i$ represents, and I'm not familiar with what a $2n$-CNOT gate is, but I think probably it will not always be an $8\times 8$ matrix, especially since it has the variable $n$ in it. Sorry to not fully answer your question, but I hope I helped a bit.
• I'm not sure exactly what the "control" part is for this CNOT gate. I guess the control is just $C_{YX}^i$. Your interpretation of (10) is the same one I have. – Stephen Diadamo Apr 4 '17 at 21:31