## Abstract

Face recognition is one of the most ubiquitous examples of pattern recognition in machine learning, with numerous applications in security, access control, and law enforcement, among many others. Pattern recognition with classical algorithms requires significant computational resources, especially when dealing with high-resolution images in an extensive database. Quantum algorithms have been shown to improve the efficiency and speed of many computational tasks, and as such, they could also potentially improve the complexity of the face recognition process. Here, we propose a quantum machine learning algorithm for pattern recognition based on quantum principal component analysis, and quantum independent component analysis. A novel quantum algorithm for finding dissimilarity in the faces based on the computation of trace and determinant of a matrix (image) is also proposed. The overall complexity of our pattern recognition algorithm is \(O(N\,\log N)\)—*N* is the image dimension. As an input to these pattern recognition algorithms, we consider experimental images obtained from quantum imaging techniques with correlated photons, e.g. “interaction-free” imaging or “ghost” imaging. Interfacing these imaging techniques with our quantum pattern recognition processor provides input images that possess a better signal-to-noise ratio, lower exposures, and higher resolution, thus speeding up the machine learning process further. Our fully quantum pattern recognition system with quantum algorithm and quantum inputs promises a much-improved image acquisition and identification system with potential applications extending beyond face recognition, e.g., in medical imaging for diagnosing sensitive tissues or biology for protein identification.

## Introduction

In any intelligent image processing system, there are essentially two main steps: the acquisition of the image and the recognition of the desired patterns. Image acquisition for any pattern recognition method can be performed in multiple ways. For instance, classical sources (incoherent light from thermal radiation or a coherent beam from a laser) or quantum sources (entangled photons obtained from down conversion or squeezed light) can be used to obtain the images. Classical bright field imaging techniques employing the former sources, have the disadvantage of high probe illumination requirement, especially while imaging sensitive samples. Additionally, they are also plagued by the shot noise inherent in the intensities, and the background noise from the environment. Quantum techniques such as quantum illumination, or ghost imaging or even interaction-free imaging, alleviates the problems of background noise, and the probe illumination by utilizing quantum correlations between photon pairs^{1,2}. Furthermore, quantum sub-shot noise imaging^{3} and super resolution techniques^{4} enhance the noise sensitivity and resolution in any images beyond the classical limits.

As a second important step, pattern recognition in the acquired images is a prominent feature of any intelligent imaging system. Face recognition^{5,6} is one of the branches of pattern recognition, with numerous applications such as face ID verification, passport checks, entrance control, computer access control, criminal investigations, crowd surveillance, and witness face reconstruction^{7}, among several others. For face recognition, several classical machine learning algorithms exist^{8}, generally requiring huge computational resources especially when faced with the problem of identification from a large database. Quantum machine learning algorithms employing quantum features such as superposition and entanglement^{9,9,10,11,12,13,14,15,16,17} promise enhancements in terms of the computing resources and the speed compared to the classical counterparts. Several experimental researches have been done to implement these algorithms^{18,19,20,21,22,23,24,25}. In this article, we present a quantum algorithm for face recognition as one of the potential applications of quantum algorithms in machine learning.

The problem of identification of faces from any images generally constitutes different steps (shown in Fig. 1): creating a database of faces consisting of training and test images, feature extraction using principal component analysis (PCA), linear discriminant analysis (LDA) or independent component analysis (ICA), feature matching using dissimilarity measures, and recognition^{26}. PCA extracts the eigenstates (or eigenfaces) of the covariance matrix of the images in the database, including information like average face, gender (male or female), face direction, brightness, shadows, etc. ICA, however, extracts the independent elements such as eyes, eyebrows, mouth, nose, etc. in a face. Quantum algorithms which provide speedup for PCA and ICA have already been proposed^{9,27}. Here, we focus on three main steps: (1) Quantum Principle Component Analysis (QPCA)^{9}, (2) Quantum Independent Component Analysis (QICA)^{27}, and (3) Dissimilarity measures (i.e., face matching), to develop a quantum algorithm for face recognition. In what follows, we present a quantum algorithm for dissimilarity measures for face matching with speedup. This is based on a quantum algorithm to compute the log determinant divergence using both the determinant and the trace of a matrix. Our algorithm combined with the inputs obtained from quantum imaging techniques provides a fully intelligent pattern identification system, with the joint benefit of the low-dose and higher resolution of quantum imaging methods, and the speedup and efficiency of the quantum algorithms. Figure 1 shows the flowchart of the quantum algorithm for the pattern identification.

## Quantum face recognition

Classical algorithms are unable to process quantum data directly. During the conversion of the quantum states (qubits) to classical data (bits), most of the information is lost in the measurement process, due to the “collapse” of the wavefunction. Although techniques such as quantum state tomography implemented on unlimited ensemble of the states can be used to fully reconstruct the quantum states from classical projections, these processes are generally complex and expensive. Therefore, the optimal input to our quantum algorithms, would be the quantum states directly obtained from quantum processes, for example, quantum imaging methods, or from a quantum memory, without performing a strong measurement on the wavefunction.

Photonic quantum memories^{28}, allowing storage and on-demand retrieval of quantum states of light, is one of the key components for the realization of quantum optical pattern-recognition technology. Quantum memories essentially form a quantum database for the matching stage in the recognition process. With the state-of-art quantum memories, the possibility of storing hundreds of spatial modes has already been shown in experimental studies using atomic-cold gases^{29,30}. Furthermore, using solid-state atomic memories, it is possible to simultaneously store hundreds of photonic quantum states in distinct temporal modes, thus allowing us to store patterns scanned at separate times^{31,32}. In addition, optically accessible spin-states of certain atomic systems can reach several hours of coherence time^{33}. A very recent experimental demonstration reports one-hour memory lifetime for light storage, showing the feasibility of long-lived photonic quantum memory devices^{34}. Atomic memory approaches have also been shown to reach high retrieval efficiencies up to \(92\%\)^{35} and high fidelities above \(99\%\)^{36}. However, an implementation with all of the aforementioned properties still remains as a challenge in developing a practical quantum database memory.

Quantum techniques such as quantum ghost imaging^{37}, quantum lithography^{38}, or quantum sensing^{39}, when appropriately interfaced with photonic quantum processors, for example an array of optical fibers connected to an integrated quantum photonic circuit, can also act as inputs to our algorithms (see Fig. 2). Here for the case of our face recognition algorithm, we assume that the input images are acquired by quantum ghost imaging^{37}. Ghost imaging exploits the spatial correlations between photon pairs generated through a nonlinear process called spontaneous parametric down-conversion (SPDC). Since the images are obtained by triggering the shutter in order to capture only the “coincident” photon pairs, the level of background noise is significantly reduced, along with a reduction in probe illumination. In a variation of this technique using non degenerate photon pairs, the image detection and sample interaction can happen at different wavelengths, which can be useful when imaging sensitive tissues when limited in detection technologies^{40}. Combining quantum detection techniques such as interaction-free measurement with ghost imaging, the illumination level required for the same levels of Signal to Noise ratio (SNR) in images^{41} is further reduced significantly. Figure 3 shows some of the images of human faces obtained in a quantum ghost imaging setup, where spatially correlated photon pairs (namely signal and idler), are generated by pumping a BiBO crystal with pump photons. Phase holograms placed in a Spatial Light Modulator, a liquid crystal device, created by superimposing the human faces with a diffraction grating acts as an object for the signal photon, while the idler photon passes to the Intensified Charged Coupled Devices (ICCD) camera via a delaSupplementary Informationy line. The images are obtained by triggering the ICCD shutter with the signal photons detected through a Single Photon Avalanche Diode (SPAD) detector—see (SI) for the detail of the experimental setup.

### Quantum principal component analysis (QPCA)

We have now the input images either retrieved from a quantum memory or directly as outputs from a quantum imaging setup. The pattern recognition processor applies Quantum Principal Component Analysis (QPCA)^{9,42} to extract the principal eigenvectors of the covariance matrix \(C_X\), formed by the set of the training images.

Let us consider a set of *N*-dimensional training images (or faces), \(\{\vert {x}^{(1)} \rangle ,\ldots , \vert {x}^{(M)} \rangle \}\). Here, \(\vert {x}^{(i)} \rangle\) is the i-th training image, which is given by,

where \(x_q^{(i)}\) are the components, and \(\vert {\psi }^{(i)}_q \rangle\) are the basis kets. The covariance matrix \({C}_X\) can be formed as a sum over *M* training faces^{42},

The next step is to exponentiate the covariance matrix \({C}_X\), so that we can use the Quantum Phase Estimation (QPE) subroutine for finding the eigenvectors and eigenvalues. It has been shown that the exponentiation of the covariance matrix, i.e., \(e^{-i{C}_X\,t}\), can be performed in \({\mathcal {O}}(\log {}N)\) time^{9}.

In QPCA algorithm, for the phase estimation subroutine, we apply the operator \({U} = e^{-i{C}_X\, t}\) on \({C}_X\)^{42}. The action of *U* on one of the states \(\vert x^{(i)}\rangle\) in \({ C}_X\) is:

where \(\vert {\phi }^{j} \rangle\)’s are the eigenvectors of \({C}_X\), and \(c^{ij}=e^{-i{\tilde{\lambda }}_c^{(j)}t}\langle \phi ^j \vert {x}^{(i)} \rangle\) in which \({\tilde{\lambda }}_c^{(j)}={\left( 2\pi \lambda _c^{(j)}t\right) }/{2^n}\) where \(\lambda _c^{(j)}\)’s are the corresponding estimated eigenvalues of \({C}_X\) with precision *n*^{9,42}.

In order to obtain the principal eigenfaces (the eigenvectors of the covariance matrix with larger eigenvalues), we define a score \(s^{(ij)}\), which is the projection of an eigenvector \(\vert \phi ^{(j)} \rangle\) on a training vector \(\vert x^{(i)} \rangle\),

where \(\phi ^{(j)}_n\) are the components of the eigenvector \(\vert \phi ^j \rangle\). The eigenvectors corresponding to the *r* highest scores are the principal components (or eigenfaces). Each face can be expanded in terms of the *r* eigenfaces (principal components) but with different weights \(\omega _j'\)s as follows

The “mean image” is the eigenface corresponding to the largest eigenvalue of \(C_X\). The QPCA algorithm is efficient for the case \(r\ll N\)^{42}.

### Quantum independent component analysis (QICA)

In classical machine learning, Independent Component Analysis (ICA) is performed to decompose an observed signal into a linear combination of unknown independent signals^{26}. Similar to the PCA, the ICA finds a new basis to represent the data, however with a different goal. We assume that there is a data set of faces \(s \in {R}^d\) that is a collection of *d* independent elements in the face such as nose, eye, eyebrow, mouth, etc. Each image observed through a camera can be expressed as \({x}={F}\cdot s\), where *F* is a mixing matrix of the independent face elements. Repeated observation gives us a dataset *x* as \(\{x^{(i)},\ldots ,x^{(M)}\}\), and ICA estimates the independent sources \(s^{(i)}\) that had generated the face. We let \({W}={F}^{-1}\) which is the unmixing matrix and solve the linear systems of equations \(s^{(i)}={W}\,x^{(i)}\) for estimating the independent elements of the face. We should note here that \(s^{(i)}\) is a d-dimensional vector and \(s^{(i)}_j\) is the data of element *j*. Similarly, \(x^{(i)}\) is an d-dimensional vector, and \(x^{(i)}_j\) is the observed (or recorded) element *j* by camera. The ICA can be exponentially speedup via a quantum algorithm for sparse matrices, with the Harrow-Hassidim-Lloyd (HHL) algorithm^{27}, which is used to solve linear systems of equations optimally with \(O(\log {}N)\). For comparison, classically it takes a time \(O(N^3)\) to be solved via the Gauss elimination, and approximately \(O(N\sqrt{\kappa })\) via iterative methods^{27} for a sparse matrix of size \(N\times N\), with \(\kappa\) being the ratio between the greatest and the smallest eigenvalue.

### Pattern matching: comparing faces

As important details of a face are obtained either by using QPCA or QICA, each face is represented in the form of a sparse matrix in which non-important elements are set to zero. The last and important step of the algorithm is comparing the face patterns to recognize the target face. Pattern matching algorithms investigate exact matches in the input with pre-existing patterns in the database. In fact, the problem here is comparing matrices with each other. The evaluation of matching between matrices (or face patterns) can be done by using “dissimilarity”^{43} measures that calculate the “distance” between the matrices. The lower the values of the dissimilarity/distance measures, more similar the matrices, with the fully matched matrices having a zero distance. One such distance measure used to compare two matrices *X* and *Y* is called the “Log-determinant divergence”^{43,44} defined as,

where *N* is the dimension of the matrices. When \(D=0\), the matrices *X* and *Y* are completely matched, and higher the distance value the more different are the matrices. The least value among the all distance values identifies the best match and consequently recognizes the face. As it is seen in the distance formula, it is a benefit to be able to calculate the trace and the determinants of matrices with speedup to expedite the distance calculation. In the following, we propose quantum algorithms for computation of the determinant and the trace of a sparse matrix.

#### Quantum computation of sparse matrix determinants and trace

To obtain a measure of dissimilarity between two matrices we need to calculate the determinant and the trace of the sparse matrix \(A = X\cdot Y^{-1}\). First we calculate \(Y^{-1}\) using the HHL algorithm^{27} and obtain *A* by multiplying it with *X*. We then apply the Quantum Phase Estimation (QPE) subroutine, which consists of a quantum Fourier transform (QFT) followed by a controlled Unitary (\(\text {CU}\)) operation, with \(U = e^{-iA\,t}\), and a inverse quantum Fourier transform. We then apply a controlled Rotation operation followed by the inverse Quantum Phase Estimation (QPE) subroutine. At the end we have a multiplication operator \(\Pi\) which finally gives us the product of the eigenvalues—the algorithm steps are explained in more detail in the Supplementary Information. The running time of the algorithm up to the third step, i.e. applying the controlled-U operator, is \(O(\log {}N(s^2 \kappa ^2 /\epsilon ))\)^{27}, where *s* is the sparsity, \(\kappa\) is the ratio of largest eigenvalue to the smallest eigenvalue of *A*, and \(\epsilon\) is the acceptable error. Additionally, the multiplication operation in the last step can be performed in time \(O(\log {} N)\) and the algorithm should run *N* times. Therefore, the overall complexity of the algorithm is \(O\left( N\,{\log {}}N(1+ s^2 \kappa ^2 / \epsilon )\right)\), which is much faster than the classical ones (see Table 1).

In order to compute the trace of the matrix *A*, an adder quantum algorithm^{48} can speedup the computation. The adder operation between two diagonal elements is mainly based on the quantum Fourier transform (QFT), i.e. \(\vert \Phi (a) \rangle :=\text {QFT}\,\vert a \rangle = \frac{1}{\sqrt{N}}\sum _{k=0}^{N-1}e^{i\frac{2\pi a k}{N}}\vert k \rangle\) and the inverse QFT, i.e., \(\text {QFT}^{-1}\vert \Phi (a) \rangle =\vert a \rangle\). By continuation of this method sequentially for the all diagonal elements, one can obtain the trace of the matrix. The detail of the adder algorithm and the quantum circuit for the computation of trace is discussed in the Supplementary Information (Fig. S2 shows the corresponding quantum circuit). The whole process which is based on QFT and \(\hbox {QFT}^{-1}\) has a complexity of \(O(\log {} N)\) (Table 2).

QPCA and QICA both have logarithmic complexities, i.e., \(O(\log {}N)\). For the calculation of the log determinant divergence, the computation of trace has a complexity of \(O(\log {}N)\), while the determinant has complexity of \(O(N\log {}N)\)). Hence, the overall complexity of the whole algorithm is \(O(N\log {} N)\). Table 2 shows a summary of estimated complexities along with the complexity of the general quantum face recognition algorithm.

## Discussion

Here, we have shown that classically the best pattern recognition algorithm based on ICA and PCA would take at least O(\(N^2\)Log*N*) steps while our algorithm only takes O(*N*Log*N*) steps, which is an order of magnitude faster—*N* is the dimension of images (see Table 3 for some estimates). We should note here that our protocol is not compared with neural networks approaches, for instance, we did not compare our quantum protocol with a classical deep learning model. In fact, the protocol suggested in our paper is only a comparison with its classical counterparts based on classical PCA, ICA, and Distance. There are other quantum models which are robust versus their classical counterparts, for example, using QPCA and quantum neural networks show advantages over the best classical approaches^{49,50}, or training deep quantum neural networks give a fast optimization and a striking robustness to noisy training data^{51}. It has been shown that a quantum convolutional neural network uses only O(Log*N*) variational parameters for input sizes of *N* qubits, allowing for its efficient training and implementation on realistic, near-term quantum devices^{52}.

Apart from these, our protocol would also benefit from the quantum nature of the image acquisition, namely lower sample exposure, background acquisition, and resolution enhancement. From the acquisition point of view, to have an image with a desirable resolution the images were accumulated for 300 frames with an exposure time of 0.5 s, hence, to obtain a single image it takes roughly 150 s, i.e. independent from the image processing side (see Table 4). Classical or direct imaging offers much faster image acquisition times, however here we are relying on the entangled photon pairs, the production rate of which is less than 1% of the total power of the pump beam, hence we have much less photons interacting with the sample (or face) and hence the need for longer exposure times. In fact, it is not the speed that is the improvement in the imaging part. With higher pump power and efficient crystals this process can also be improved further however the state of the art on this would not match the acquisition speed of classical methods. The advantage of this is that we achieve a better SNR if we compare the images with classical acquisition with a similar number of photons interacting with the sample.

Depending on the database, compared to the best classical pattern recognition algorithm, the proposed quantum algorithm will be *N* times faster. Both the QPCA and QICA can be used for face recognition in classical images as well, as it can perform the pattern identification on any matrix. Run on a quantum processor, it would provide a speedup in the process compared to the traditional recognition methods. At the moment, due to the image size, no quantum computers are yet available that can successfully implement the quantum protocol. However, this is indeed a possible future step once such devices are available.

## Conclusion

In summary, we propose a new concept of a quantum protocol for 2D face recognition, combining the benefits of quantum imaging in image acquisition with the speedup from the quantum machine learning algorithms. In this concept, we consider images to be obtained via a ghost imaging protocol either as inputs to the quantum memories or as a hardware encoding of quantum information for the photonic pattern recognition processor. Feeding the “images” directly from a quantum protocol also eliminates the need for the conversion of classical data to quantum inputs for the processor saving valuable computational resources. The quantum pattern recognition processor then runs an algorithm composed of three main subroutines: (1) quantum principal components analysis (QPCA), (2) quantum independent component analysis (QICA), and (3) quantum dissimilarity measures for comparing faces. For the QPCA and QICA, we propose slight modifications in the existing algorithms, whereas for finding the dissimilarity measure, we propose a novel algorithm for obtaining the distance between two matrices based upon a metric called log-determinant divergence. Our algorithm obtains the determinant and the trace of the two matrices in \(O(N\log {N})\) time—*N* is the dimension of the matrix. Complexity analysis shows that all of the three parts have speedup as compared to their classical counterparts, with the overall complexity given by \(O(N\log {N})\). Our conceptual protocol provides a framework for an intelligent and fully quantum image recognition system with quantum inputs and a quantum machine learning processor. The joint benefits of the quantum image acquisition and quantum machine learning promises exciting technological developments in the field of image recognition systems.

## Data availability

All data needed to evaluate the conclusions in the paper are present in the paper and/or the Supplementary Materials. Additional data related to this paper may be requested from V.S.(vahid.salari1@ucalgary.ca) or E.K. (ekarimi@uottawa.ca).

## References

Shapiro, Jeffrey H. & Boyd, Robert W. The physics of ghost imaging.

*Quant. Inform. Process.***11**, 949–993 (2012).Moreau, P. A., Toninelli, E., Gregory, T. & Padgett, M. J. Ghost imaging using optical correlations.

*Laser Photon. Rev.***12**, 1700143 (2018).Brida, G., Genovese, M. & Berchera, I. R. Experimental realization of sub-shot-noise quantum imaging.

*Nat. Photon.***4**, 227–230 (2010).Tsang, M., Nair, R. & Xiao-Ming, L. Quantum theory of superresolution for two incoherent optical point sources.

*Phys. Rev. X***6**, 031033 (2016).Kortli, Y., Jridi, M., Al Falou, A. & Atri, M. Face recognition systems: A survey.

*Sensors***20**, 342 (2020).Wright, J.

*et al.*Robust face recognition via sparse representation.*IEEE Trans. Patt. Anal. Mach. Intell.***31**, 210 (2009).Acan, A. & Toygar, O. Face recognition using pca, lda and ica approaches on colored images.

*J. Elect. Elect. Eng.***3**, 735 (2003).Hasan, Md. K.

*et al.*Human face detection techniques: A comprehensive review and future research directions.*Electronics***10**, 2354 (2021).Lloyd, S., Mohseni, M. & Rebentrost, P. Quantum principal component analysis.

*Nat. Phys.***10**, 631–633 (2014).Rebentrost, P., Mohseni, M. & Lloyd, S. Quantum support vector machine for big data classification.

*Phys. Rev. Lett.***113**, 130503 (2014).Lloyd, S., Garnerone, S. & Zanardi, P. Quantum algorithms for topological and geometric analysis of data.

*Nat. Commun.***7**, 1–7 (2016).Biamonte, J.

*et al.*Quantum machine learning.*Nature***549**, 195–202 (2017).Petruccione, F. & Schuld, M.

*Supervised Learning with Quantum Computers*3rd edn. (Springer, 1993).Powell, D. Quantum boost for artificial intelligence.

*Nature News*https://doi.org/10.1038/nature.2013.13453 (2013).Alvarado Barrios, G., Albarrán-Arriagada, F., Cárdenas- López, F. A., Romero, G. & Retamal, J. C. Role of quantum correlations in light-matter quantum heat engines.

*Phys. Rev. A.***96**, 052119 (2017).Cárdenas-López, F. A., Lamata, L., Retamal, J. C. & Solano, E. Multiqubit and multilevel quantum reinforcement learning with quantum technologies.

*PloS One***13**, e0200455 (2018).Paneru, D., Cohen, E., Fickler, R., Boyd, R. W. & Karimi, E. Entanglement: Quantum or classical?

*Rep. Prog. Phys.***83**, 064001 (2020).Zhang, X.

*et al.*Semiconductor quantum computation.*Natl. Sci. Rev.***6**, 32–54 (2019).Gaita-Ariño, A., Luis, F., Hill, S. & Coronado, E. Molecular spins for quantum computation.

*Nat. Chem.***11**, 301–309 (2019).Collins, D., Kim, K. W., Holton, William C., Sierzputowska-Gracz, H. & Stejskal, E. O. Nmr quantum computation with indirectly coupled gates.

*Phys. Rev. A.***62**, 022304 (2000).Schuch, N. & Siewert, J. Implementation of the four-bit deutsch-jozsa algorithm with josephson charge qubits.

*Phys. Status Solidi b***233**, 482–489 (2002).Zhen, W.

*et al.*Experimental demonstration of the deutschjozsa algorithm in homonuclear multispin systems.*Phys. Rev. A***84**, 042312 (2011).Takeuchi, S. Experimental demonstration of a threequbit quantum computation algorithm using a single photon and linear optics.

*Phys. Rev. A***62**, 032301 (2000).Gulde, S.

*et al.*Implementation of the deutsch-jozsa algorithm on an ion-trap quantum computer.*Nature***421**, 48–50 (2003).Barz, S.

*et al.*A two-qubit photonic quantum processor and its application to solving systems of linear equations.*Sci. Rep.***4**, 1–5 (2014).Draper, B. A., Baek, K., Bartlett, M. S. & Beveridge, J. R. Recognizing faces with pca and ica’’.

*Comput. Vis. Image Underst.***91**, 115–137 (2003).Harrow, A. W., Hassidim, A. & Lloyd, S. Quantum algorithm for linear systems of equations.

*Phys. Rev. Lett.***103**, 150502 (2009).Lvovsky, A. I., Sanders, B. C. & Tittel, W. Optical quantum memory.

*Nat. Photon.***3**, 706–714 (2009).Parniak, M.

*et al.*Wavevector multiplexed atomic quantum memory via spatially-resolved single-photon detection.*Nat. Commun.***8**, 1–9 (2017).Pu, Y. F.

*et al.*Experimental realization of a multiplexed quantum memory with 225 individually accessible memory cells.*Nat. Commun.***8**, 1–6 (2017).Bonarota, M., Le Gouët, J. L. & Chaneliere, T. Highly multimode storage in a crystal.

*New J. Phys.***13**, 013013 (2011).Tang, J.-S.

*et al.*Storage of multiple single-photon pulses emitted from a quantum dot in a solid-state quantum memory.*Nat. Commun.***6**, 1–7 (2015).Zhong, M.

*et al.*Optically addressable nuclear spins in a solid with a six-hour coherence time.*Nature***517**, 177–180 (2015).Ma, Yu., Ma, Y.-Z., Zhou, Z.-Q., Li, C.-F. & Guo, G.-C. One-hour coherent optical storage in an atomic frequency comb memory.

*Nat. Commun.***12**, 1–6 (2021).Hsiao, Y. F.

*et al.*Highly efficient coherent optical memory based on electromagnetically induced transparency.*Phys. Rev. Lett.***120**, 183602 (2018).Liu, C.

*et al.*Reliable coherent optical memory based on a laserwritten waveguide.*Optica***7**, 192–197 (2020).Morris, P. A., Aspden, R. S., Bell, J. E. C., Boyd, R. W. & Padgett, M. J. Imaging with a small number of photons.

*Nat. Commun.***6**, 1–6 (2015).Boto, A. N.

*et al.*Quantum interferometric optical lithography: Exploiting entanglement to beat the diffraction limit.*Phys. Rev. Lett.***85**, 2733 (2000).Israel, Y., Rosen, S. & Silberberg, Y. Supersensitive polarization microscopy using noon states of light.

*Phys. Rev. Lett.***112**, 103604 (2014).Chan, K. W. C., O’Sullivan, M. N. & Boyd, R. W. Two-color ghost imaging.

*Phys. Rev. A***79**, 033808 (2009).Zhang, Y.

*et al.*Interaction-free ghost-imaging of structured objects.*Opt. Exp.***27**, 2212–2224 (2019).Kopczyk, D. Quantum machine learning for data scientists. arXiv preprint arXiv:1804.10068 (2018).

Cichocki, A., Cruces, S. & Amari, S. Logdeterminant divergences revisited: Alpha-beta and gamma logdet divergences.

*Entropy***17**, 2988–3034 (2015).Dhillon, I. S. & Tropp, J. A. Matrix nearness problems with bregman divergences.

*SIAM J. Matrix Anal. Appl.***29**, 1120–1146 (2008).Bunch, J. R. & Hopcroft, J. E. Triangular factorization and inversion by fast matrix multiplication.

*Math. Comput.***28**, 231–236 (1974).Williams, V. V. Multiplying matrices in o (n2. 373) time. preprint (2014).

Wiedemann, D. Solving sparse linear equations over finite fields.

*IEEE Trans. Inf. Theory***32**, 54–62 (1986).Ruiz-Perez, L. & Garcia-Escartin, J. C. Quantum arithmetic with the quantum fourier transform.

*Quantum Inf. Process.***16**, 152 (2017).Huang, H. Y.

*et al.*Quantum advantage in learning from experiments.*Science***376**(6598), 1182–1186 (2022).Lídia, H. W., del Iten, R. R., Metger, T. & Renner, R. Discovering physical concepts with neural networks.

*Phys. Rev. Lett.***124**, 010508 (2020).Beer, K.

*et al.*Training deep quantum neural networks.*Nat. Commun.***11**, 808 (2020).Cong, S. C. I. & Lukin, M. D. Quantum convolutional neural networks.

*Nat. Phys.***15**, 1273–1278 (2019).

## Acknowledgements

V. S. is very thankful for several helpful discussions with Mikel Sanz and Enrique Solano during his research stay in QUTIS center in Bilbao (Spain) and QuArtist center in Shanghai (China) who encouraged the idea to be developed. Also, V. S. is very grateful for useful discussions with Seth Lloyd and Nathan Wiebe during the Quantum Machin Learning and Biomimetic Quantum Technologies conference held in Bilbao.

## Funding

D. P., M. R. and E. K. acknowledge the support of Ontario’s Early Researcher Award (ERA), Canada Research Chairs (CRC), and the European Union’s Horizon 2020 Research and Innovation Programme (Q-SORT), grant number 766970. V. S. is grateful for the financial support by Alberta Innovates Grant in Canada, and the Spanish State Research Agency through BCAM Severo Ochoa excellence accreditation SEV-2017-0718 and BERC 2018-2021 program. S.B. acknowledges funding by the Natural Sciences and Engineering Research Council of Canada (NSERC) through its Discovery Grant, funding and advisory support provided by Alberta Innovates through the Accelerating Innovations into CarE (AICE)—Concepts Program, and support from Alberta Innovates and NSERC through Advance Grant. This project is funded [in part] by the Government of Canada. / Ce projet est financé [en partie] par le gouvernement du Canada

## Author information

### Authors and Affiliations

### Contributions

V.S. and D.P. contributed equally to this work. V.S. and E.K. developed the idea and consulted it with D.P., S.B., M.R., and E.S. to design the protocol. V.S., M.G., and M.Ab. developed the algorithm, D.P. performed the experiments under the supervision of E.K. All authors contributed to discussions. V.S., D.P., and E.K. wrote the manuscript, and V.S., S.B., and E.K. revised the final version.

### Corresponding author

## Ethics declarations

### Competing interests

The authors declare no competing interests.

## Additional information

### Publisher's note

Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.

## Supplementary Information

## Rights and permissions

**Open Access** This article is licensed under a Creative Commons Attribution 4.0 International License, which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons licence, and indicate if changes were made. The images or other third party material in this article are included in the article's Creative Commons licence, unless indicated otherwise in a credit line to the material. If material is not included in the article's Creative Commons licence and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder. To view a copy of this licence, visit http://creativecommons.org/licenses/by/4.0/.

## About this article

### Cite this article

Salari, V., Paneru, D., Saglamyurek, E. *et al.* Quantum face recognition protocol with ghost imaging.
*Sci Rep* **13**, 2401 (2023). https://doi.org/10.1038/s41598-022-25280-5

Received:

Accepted:

Published:

DOI: https://doi.org/10.1038/s41598-022-25280-5

## Comments

By submitting a comment you agree to abide by our Terms and Community Guidelines. If you find something abusive or that does not comply with our terms or guidelines please flag it as inappropriate.