# Quantum Compressive Sensing: Mathematical Machinery, Quantum Algorithms, and Quantum Circuitry
## 3 Pixel-Qubit Mapping  
Before diving into the details of our protocol, we must first describe our methodology for pixel-qubit mapping, in which we map a signal onto a quantum sate. Let the signal \(y\) be an \(n\)-dimensional vector \(y\in Y\subset R^{n}\), where \(Y\) is the set of all signals we may expect to measure. We would like to prepare a Born machine \(|\Psi\rangle\) on the set \(Y\), implemented as a quantum state of \(n\) qubits. We must therefore have a procedure for mapping a signal \(y\in Y\)onto a quantum state \(|y\rangle\), an element of the \(d^{n}\)-dimensional Hilbert space characterizing \(n\) qubits. In this paper, we restrict ourselves to \(d=2\) (the ubiquitous \"qubit\") and to \(n^{\prime}=n\), meaning we require one qubit for each \"pixel\" in our image. This choice accommodates an entanglement-free _product state_ representation of \(|y\rangle\), where the state of each qubit depends only on the corresponding pixel \(y_{i}\). The intuitive choice for binary signals is to map onto the computational basis state: if \(y_{i}=0\), the corresponding qubit has the state \(|0\rangle\) and if \(y_{i}=1\), it has the state \(|1\rangle\). A real-valued pixel may be mapped onto a linear combination of the two basis states. [PERSON] and [PERSON] [PERSON] and [PERSON] (2010) use the following choice as a prototypical example:  
\[|y_{i}\rangle\rightarrow\cos\Bigl{(}\frac{\pi}{2}y_{i}\Bigr{)}|0\rangle+\sin \Bigl{(}\frac{\pi}{2}y_{i}\Bigr{)}|1\rangle. \tag{1}\]  
The use of \(\sin\) and \(\cos\) functions is convenient, because they automatically ensure a normalized qubit state. Further, assuming \(y\) is normalized such that each pixel \(y_{i}\in[0,1]\), this mapping is sensible in that the closer a pixel is to 0 or 1, the higher the amplitude that the corresponding qubit is at for the corresponding state, and a pixel value \(y_{i}=0.5\) corresponds to an equal superposition of states.  
We also consider a generalization to Equation (1) which designates an arbitrary pixel value \(p\) as the \"midpoint\" between 0 and 1, rather than 0.5:  
\[|y_{i}\rangle\rightarrow\cos\Big{[}\frac{\pi}{2}f_{p}(y_{i})\Bigr{]}|0\rangle+ \sin\Big{[}\frac{\pi}{2}f_{p}(y_{i})\Bigr{]}|1\rangle, \tag{2}\]  
where the function \(f_{p}\) is given by  
\[f_{p}(x)=\frac{1}{2}\Bigl{[}1+\frac{2}{\pi}\arctan\Big{[}\tan\biggl{(}\pi \biggl{(}x-\frac{1}{2}\biggr{)}\biggr{)}-\tan\biggl{(}\pi\biggl{(}p-\frac{1}{ 2}\biggr{)}\biggr{)}\Bigr{]}\Bigr{]}. \tag{3}\]  
The function \(f_{p}:[0,1]\rightarrow[0,1]\) satisfies \(f_{p}(0)=0\), \(f_{p}(p)=0.5\), and \(f_{p}(1)=1\). It reduces to \(f_{p}(x)=x\) for \(p=0.5\), and for \(p\
eq 0.5\) it is equivalent to a smooth non-linear rescaling of \(y_{i}\) before applying the mapping in Equation (2). Figure 1 provides a visualization of \(f_{p}(x)\) when different values of \(p\) are applied. The state specified by Equation (2) for an arbitrary \(n\)-dimensional signal \(y\) is a product state efficiently prepared by \(n\) parallel single-qubit gates, as shown in Figure 2.  
Figure 1: Visualization of Equation (3) as a function of \(x\) when the “midpoint” \(p=0.1,0.3,0.5,0.7,0.9\).  
A clear disadvantage of both mappings proposed in Equations (1) and (2) is that they do not take full advantage of the Hilbert space of a single qubit. One could encode additional information into a complex phase difference between the \(|0\rangle\) and \(|1\rangle\) amplitudes. One area of further research is to develop alternative mappings accommodating higher entanglement or a more compact use of qubits.