Hardware-efficient quantum principal component analysis for medical image recognition

Zidong Lin, Hongfeng Liu, Kai Tang, Yidai Liu, Liangyu Che, Xinyue Long, Xiangyu Wang, Yu-ang Fan, Keyi Huang, Xiaodong Yang, Tao Xin, Xinfang Nie, Dawei Lu

Front. Phys. ›› 2024, Vol. 19 ›› Issue (5) : 51202.

PDF(5917 KB)
Front. Phys. All Journals
PDF(5917 KB)
Front. Phys. ›› 2024, Vol. 19 ›› Issue (5) : 51202. DOI: 10.1007/s11467-024-1391-x
RESEARCH ARTICLE

Hardware-efficient quantum principal component analysis for medical image recognition

Author information +
History +

Abstract

Principal component analysis (PCA) is a widely used tool in machine learning algorithms, but it can be computationally expensive. In 2014, Lloyd, Mohseni & Rebentrost proposed a quantum PCA (qPCA) algorithm [Nat. Phys. 10, 631 (2014)] that has not yet been experimentally demonstrated due to challenges in preparing multiple quantum state copies and implementing quantum phase estimations. In this study, we presented a hardware-efficient approach for qPCA, utilizing an iterative approach that effectively resets the relevant qubits in a nuclear magnetic resonance (NMR) quantum processor. Additionally, we introduced a quantum scattering circuit that efficiently determines the eigenvalues and eigenvectors (principal components). As an important application of PCA, we focused on classifying thoracic CT images from COVID-19 patients and achieved high accuracy in image classification using the qPCA circuit implemented on the NMR system. Our experiment highlights the potential of near-term quantum devices to accelerate qPCA, opening up new avenues for practical applications of quantum machine learning algorithms.

Graphical abstract

Keywords

quantum simulation / quantum principal component analysis / nuclear magnetic resonance

Cite this article

Download citation ▾
Zidong Lin, Hongfeng Liu, Kai Tang, Yidai Liu, Liangyu Che, Xinyue Long, Xiangyu Wang, Yu-ang Fan, Keyi Huang, Xiaodong Yang, Tao Xin, Xinfang Nie, Dawei Lu. Hardware-efficient quantum principal component analysis for medical image recognition. Front. Phys., 2024, 19(5): 51202 https://doi.org/10.1007/s11467-024-1391-x

1 Introduction

With the rapid advancements in artificial intelligence, researchers have intensively and extensively explored the potential applications of machine learning (ML) [13] to enhance medical image analysis and optimize the allocation of medical resources [49]. ML algorithms have been successfully employed in various medical contexts, including the segmentation of pulmonary embolism using computerized tomographic (CT) angiography [10, 11], breast cancer detection and diagnosis using mammography [12], and the diagnosis of neurological disorders or brain tumors using magnetic resonance imaging [1316]. Moreover, ML techniques have proved valuable in aiding the diagnosis of COVID-19 patients by identifying ground-glass opacities and consolidations in thoracic CT images [1720], providing physicians with a reliable diagnostic reference. For these tasks, medical image recognition is an essential component, where the analysis of imaging data is paramount in assisting healthcare professionals to identify disorders, enabling early diagnosis and treatment.
Current endeavor of medical image recognition heavily relies on classical ML algorithms such as principal component analysis (PCA) to analyze and interpret complex imaging data. The classical PCA algorithm is computationally expensive, which limits its scalability when a large dataset is dealt with. Consequently, there is a growing interest in exploring quantum alternatives that can potentially overcome these limitations and provide superior performance [2137]. Quantum PCA (qPCA) [38], the quantum version of the PCA algorithm, offers an exponential speedup compared to its classical counterpart. Despite being proposed as early as in 2014, experimental realization of qPCA has been challenging due to the requirement of a significant number of data copies and implementation of the quantum phase estimation. To date, experimental realizations of qPCA have been achieved through parameterized quantum circuits [39] and resonant algorithms [40], both of which lack universality compared to the original qPCA algorithm.
In this work, building upon the original qPCA algorithm proposed by Lloyd et al. [38], we demonstrated a hardware-efficient qPCA protocol designed for medical image recognition. Our approach utilized an iterative method customized for the nuclear magnetic resonance (NMR) quantum processor [4146]. Instead of requiring multiple data copies, two copies were recycled indefinitely in our design. To extract the eigenvalues and eigenvectors of the covariance matrix, the quantum scattering circuit with an ancillary qubit was introduced to encode the eigen-information, enhancing the measurement efficiency [4751]. We applied our protocol to perform binary classification on CT images to identify patients affected by COVID. The results revealed that healthy and affected CT images processed by the qPCA protocol can be distinguished accurately in a two-dimensional parameter space, achieving remarkable fidelity of about 90%. Looking ahead, the continued development and optimization of qPCA techniques holds great potential for advancing the field of medical image analysis, enabling more accurate diagnoses and improved treatment strategies.

2 Experiment

2.1 Theoretical background

PCA is a classical ML subroutine widely used for medical image recognition. It facilitates the projection of high-dimensional vectors onto a lower-dimensional space while retaining their maximum discriminatory information, as illustrated in Fig.1(a). In the context of medical examinations, such as CT scans, each resulting image is flattened into a d-dimensional vector that encodes the pixel values, where d represents the number of pixels. Consequently, the dataset consisting of M images can be converted into a d×M matrix X, where each column encapsulates the pixel information of an individual image. After centralization (see Appendix A), classical PCA solves the eigenvalues of the d×d covariance matrix C=XXT, where the superscript T denotes the transpose operation. This covariance matrix captures the interdependencies among different components of the data, and PCA diagonalizes it as C=kλkekek, where ek represents the eigenvector of C corresponding to the eigenvalue λk. The eigenvectors associated with the largest eigenvalues are referred to as the principal components, and the dimensionality of the data X can be reduced by projecting it onto the subspace spanned by these principal components; see Fig.1(a). The computational and query complexity of the classical PCA algorithm is O(d2) [22], leading to a quadratic increase in computation time as the dimension d increases.
Fig.1 PCA-based medical image recognition and the corresponding qPCA circuits. (a) Flowchart illustrating the application of PCA for identifying lung CT images. The information of the CT images is encoded in the covariance matrix, which captures the interdependencies among different data components. Classically, principal components are obtained using iterative eigen-algorithms, e.g., power iteration, allowing for dimension reduction by projecting the data onto the subspace spanned by these principal components. (b) Quantum circuit for extracting the eigenvalues of the data matrix ρ. The Hadamard gate prepares the probe qubit in an equal superposition state, while the controlled-eiρt gate encodes the eigenvalues of ρ into the phase of the probe qubit. The trial qubits are initialized to an arbitrary pure state that must have non-zero overlaps with the eigenvectors of ρ. (c) Quantum circuit for eigenvectors extraction of ρ. The evolution time is set as τ=π/(λ2λ1), assuming that λ1<λ2. The single-qubit gate U0 prepares the probe qubit in |0+eiλ1τ|1. (d) Complete circuit incorporating the realization of the controlled-eiρt gate. It requires N copies of the data matrix ρ, and the key component is the eiSΔt gate between the trial qubits and each copy, where S is the standard swap gate and Δt=t/N.

Full size|PPT slide

QPCA offers a significant advantage over its classical counterpart by substantially reducing computational complexity, scaling as O[(logd)2] in both computational and query complexity [38]. In qPCA, the centralized classical data X is encoded into a quantum state ρ=XXT/Z using logd qubits, where Z serves as the normalization factor [52]. This quantum state ρ can be decomposed in its eigenbasis as ρ=k=1dλk|ekek|. By performing eiρt combined with the quantum phase estimation algorithm, the eigenvalues λk and eigenvectors |ek can be determined. However, the original qPCA algorithm is faced with significant experimental challenges due to the requirement of multiple copies of ρ for realizing eiρt and the complex quantum circuits involved in phase estimation. To address this issue, we proposed a hardware-efficient iterative method that enables the execution of eiρt without the need for multiple copies of ρ. The conventional phase estimation is replaced with a quantum scattering circuit, resulting in a substantial reduction in the number of required qubits.

2.2 Solving the eigenfunction

Assuming that ρ=kλk|ekek|, scattering quantum circuits for solving the eigenvalues λk and eigenvectors |ek are shown in Fig.1(b) and (c), respectively. The circuit utilizes one probe qubit and a trial system with the same dimension as ρ. The eigenvalues are first solved using the circuit in Fig.1(b). The probe qubit is prepared to an equal superposition state |+=(|0+|1)/2 using a Hadamard gate, and the trial qubits are initialized to an arbitrary pure state |ψ=kak|ek. It is worth noting that the coefficients ak need to be non-zero, which generally holds for generic data. After applying the controlled-eiρt gate, the entire system’s final state becomes 12kak(|0+eiλkt|1)|ek, where the partial density matrix of the probe qubit is given by
ρprobe=12(1k|ak|2eiλktk|ak|2eiλkt1).
The real part of the off-diagonal elements of the probe qubit, denoted as Mx(t), carries the information of the eigenvalues λk in the form of
Mx(t)=k=1|ak|2cos(λkt).
This quantity can be effectively measured in various physical systems of quantum processors, such as probing the transverse magnetization in NMR. Performing a discrete Fourier analysis on Mx(t) allows for the extraction of all the eigenvalues λk.
Once the eigenvalues are accurately obtained, the identification of the eigenvectors can be achieved using the quantum circuit shown in Fig.1(c). Without loss of generality, we describe the method for determining the two eigenvectors of a simple 2×2 density matrix ρ (see Appendix C for the generalization to high-dimensional density matrices). Compared to Fig.1(b), the probe qubit in this circuit requires a preloaded phase eiλ1τ, specifically |0+eiλ1τ|1, where τ=π/(λ2λ1) assuming that λ1<λ2. In addition, the evolution time t of the controlled-eiρt gate is set to τ as well. For a generic trial state |ψ=a1|e1+a2|e2, the final state of the entire system becomes (a1|0|e1+a2|1|e2)/2 after implementing the circuit. As a result, the eigenvectors |e1 and |e2 can be determined from the corresponding subspace of the probe qubit. Please see Appendix C for the generalization to the cases of multiple eigenvalues.
The key ingredient of implementing the aforementioned quantum circuits lies in the realization of eiρt for an unknown density matrix ρ. In the original qPCA algorithm [see Fig.1(d)] [38], n copies of ρ are available, and repeated applications of eiSΔt are performed between the trial state |ψ and each copy of ρ (which is subsequently discarded). Here, S represents the swap operator, and Δt=T/n needs to be sufficiently small to maintain the Trotter−Suzuki approximation. This technique can be viewed as a continuous sequence of infinitesimal swap operations between σ=|ψψ| and ρ. Ultimately, the trial qubits evolve to the state
eiρnΔtσeiρnΔt,
which is equivalent to the construction of eiρt. It should be noted that all the aforementioned operations are actually controlled gates conditional on the state of the probe qubit.
After performing the eigen-decomposition, the remaining steps of qPCA closely resemble its classical counterpart. The principal components obtained from the eigen-decomposition are utilized to compress the high-dimensional data into a lower-dimensional subspace for subsequent applications [see Electronic Supplementary Materials (ESM)]. However, the original qPCA algorithm requires a significant number of copies of the density matrix, which poses substantial challenges in terms of qubit resources, making the scheme nearly impractical to implement on state-of-the-art quantum processors. To overcome this limitation, we have developed a hardware-efficient approach that allows for the reset and recycling of discarded copies, enabling their reuse in multiple rounds. In the following sections, we will describe this approach in detail, along with the experimental hardware setup.

2.3 Experimental setup

We validate the effectiveness of the qPCA protocol by applying it to the identification of lung CT scans from COVID-19 patients. COVID-19 infection often leads to lung inflammation and the development of distinct fibrous lesions on CT images, which differentiate them from healthy lung scans. For our experiment, we utilize the iCTFT database, which provides an integrated collection of thoracic CT images and clinical data from patients diagnosed with COVID-19 pneumonia [53]. The dataset consists of a total of 80 images, with 40 scans from virus-positive patients and 40 scans from virus-negative patients. These scans are divided into a training dataset and a test dataset, serving as the basis for our proof-of-principle experiment. Our qPCA protocol aims to assist in diagnosing pneumonia symptoms and involves three main steps: (i) selecting a training dataset with labeled images (positive or negative), calculating the covariance matrix, and loading it onto the quantum processor; (ii) implementing the qPCA quantum circuit on the quantum processor; and (iii) post-processing the results using the classical PCA algorithm and evaluating the performance using the test dataset.

2.4 Data loading

We randomly select a training dataset consisting of two CT images: one from a virus-positive patient and the other from a virus-negative patient. Each CT image is discretized into 260×190 grayscale pixels, as shown in Fig.2(a). We flatten each image into a column-vector of size 49400×1, resulting in a training dataset represented by a 49400×2 matrix X. Prior to analysis, the dataset is centralized to remove any biases (see Appendix C). To prepare the data for the quantum circuit, we compute the covariance matrix C=XXT, which has dimensions 49400×49400. Implementing this large matrix on a quantum circuit requires an efficient implementation of quantum random access memory [52], which poses significant experimental challenges. In our work, we employ a dimension-reduction technique by computing a commuted covariance matrix D=XTX of dimension 2×2. This reduced matrix can be encoded into a density matrix ρD up to normalization, and this approach, known as the “eigenface” method, has been successfully applied in face image recognition [54]. It is a well-established data-processing technique in image classification tasks. More details regarding the data loading process can be found in the Appendix and Supplemental Information.
Fig.2 Data loading and the experimental quantum circuit in the 4-qubit NMR system. (a) Training dataset comprises one positive and one negative CT image from the iCTFT database. Each image is flattened into a 49400×1 vector based on grayscale values, resulting in a training dataset represented by a 49400×2 matrix X. After centering the data, instead of the covariance matrix C=XXT, we compute the commuted covariance matrix D=XTX and load it into the quantum register, denoted as ρD. (b) Experimental quantum circuit for performing the iterative qPCA algorithm on the 4-qubit NMR quantum processor. We prepare two copies of ρD and implement the controlled-eiρDt operation in N steps, where each step consists of two controlled-eiSΔt gates applied between the trial qubit (C2) and the data qubits (C3 or C4). In each step, the probe and trial qubits are reinitialized to their final state from the previous iteration using single- and two-qubit gates determined by the state of the previous iteration. Gradient-field pulses are applied to destroy instantaneous quantum coherence, serving as non-unitary operations.

Full size|PPT slide

The experiment was conducted using a NMR system on a Bruker 600 MHz spectrometer. The quantum processor consists of four nuclear spins of 13C in the crotonic acid molecule dissolved in aceton, which serve as the 4-qubit system. The experimental setup is depicted in Fig.2(b). The data matrix to be processed, denoted as ρD, can be encoded into a single qubit. In our 4-qubit processor, the qubits are labeled as C1 to C4, and each qubit has a specific role. C1 serves as the probe qubit for the scattering quantum circuit [cf. Fig.1(b) and (c)], C2 acts as the trial qubit, initially prepared in the state |ψ=|+=(|0+|1)/2, while C3 and C4 provide two copies of ρD. Therefore, the 4-qubit system is initialized as follows:
ρ0=|00||++|ρDρD.
This initialization is performed at the beginning of the experiment [see Fig.2(b)]. For the parameters of the quantum processor and experimental details, see Methods and Supplemental Information.

2.5 QPCA implementation

As mentioned earlier, the original qPCA algorithm requires a large number of copies of ρD, which is currently beyond the capabilities of state-of-the-art quantum technologies. In this work, we employ an iterative approach to implement the controlled-eiρDt operation in N steps, where each step consists of two controlled-eiSΔt gates applied between the trial qubit (C2) and the data qubits (C3 or C4). In the experiment, the chosen parameters are t=150, N=1000, and Δt=t/(2N)=0.075. It is important to note that, due to the normalization of ρD, the time scale used here may appear large. However, the actual experimental time required to perform the quantum circuit is orders of magnitude shorter. This experimental time is ensured to be much shorter than the relaxation time of the processor. Specifically, the two controlled-eiSΔt gates are implemented using an optimized pulse with a duration of 2 ms, achieving a fidelity of over 0.999. Subsequently, quantum state tomography is performed on the probe and trial qubits to obtain the state of this subsystem.
The iteration process is as follows: After measuring the probe and trial qubits, the entire processor undergoes a resetting operation, consisting of a fast-relaxation technique for less than 2 s [55] and a subsequent spatial averaging operation [44, 45, 5658] to create the |0000 state. Next, taking the (k+1)-th iteration as an example, the probe and trial qubits are reinitialized to their final state from the previous k-th iteration, denoted as ρk, while the data qubits C3 and C4 are reset to ρD. Since ρk is generally a mixed state, we apply 1 ms gradient-field pulses to destroy the instantaneous quantum coherence, which are served as non-unitary operations. The forms of the single- and two-qubit gates depend on the information of ρk, which can be efficiently calculated and experimentally realized in our NMR quantum processor, as described in Methods. Following the reinitialization, the two controlled-eiSΔt gates are sequentially applied to the entire system. In the absence of decoherence errors, this quantum circuit is equivalent to the original qPCA algorithm but requires fewer copies of ρD and is hardware-efficient for resetting the system in each iteration. It is important to note that in our experiment, we choose two copies to reduce the total number of iterations. However, the number of copies and iterations can be adjusted based on the hardware characteristics, specifically the tradeoff between the number of controllable qubits and the decoherence time.
In our implementation, the two eigenvalues λ1 and λ2 of ρD are encoded in the transverse magnetization Mx(t) of the probe qubit, C1, as shown in Eq. (2). In each iteration, we measure the Mx component of C1 and subsequently apply a discrete Fourier transformation to obtain the experimental results of the two eigenvalues. To determine the eigenvectors, we employ the scheme depicted in Fig.1(c). This circuit differs from the one in Fig.2(b) in the following ways: Firstly, the probe qubit C1 is preloaded with a phase factor eiλ1expτ, where τ=π/(λ2expλ1exp) and λ1exp and λ2exp are the experimentally obtained eigenvalues. Secondly, the evolution time t of the controlled-eiρDt gate is set to τ as well.

2.6 Experimental results

To validate the effectiveness and stability of the protocol, we perform four groups of experiments, each with a different training dataset and corresponding ρD. In the main text, we present the experimental results from two groups (other groups in ESM), labeled as Group 1 and Group 2. The original training images for these groups are displayed in Fig.3(a) and (d).
Fig.3 Experimental eigenvalues obtained by the hardware-efficient qPCA approach. (a) Training set images for Group 1 experiment. The left and right images are randomly sampled from lung CT images of negative and positive patients, respectively. Clear textures are observed in the healthy lung CT image, while the diseased lung CT image exhibits a hazy shadow. (b) Magnitude of the probe qubit’s xcomponent Mx(t) [cf. Eq. (2)] for Group 1 at different time instants. (c) Discrete Fourier analysis of Mx(t) in Group 1. The spectral lines of different colors represent the Fourier analysis of Mx(t) at every 200 iterations. (d−f) Results for Group 2. (g) Two eigenvalues obtained from the Fourier analysis every 50 iterations in Group 1 and Group 2. As the number of iterations increases, the eigenvalues λ1,2exp tend to converge towards the theoretical values. (h) Precision of eigenvalue measurement is quantified by the half-widths of the two peaks, denoted as Δλ1,2. The values in both groups gradually decrease as the number of iterations increases.

Full size|PPT slide

In Group 1, we observe the time-dependent transverse magnetization Mx(t), as depicted in Fig.3(b). It is evident that Mx(t) exhibits oscillations with two distinct frequencies, corresponding to the eigenvalues of ρD, as time progresses. However, the oscillation amplitude gradually decreases due to the decoherence effect in the NMR processor. We perform a discrete Fourier transformation to the first 200, 400, 600, 800, and the complete set of 1000 of experimental Mx(t), with results plotted in Fig.3(c). We also analyzed the changes of the two eigenvalues every 50 iterations, as shown in Fig.3(g). As the number of iterations increases, the two eigenvalues tend to approach their corresponding theoretical values λ1,2. Although the estimated eigenvalues at different iteration numbers show minor variations, the peaks corresponding to the eigenvalues become sharper. We quantify the measurement precision using the half-widths of the peaks, denoted as Δλ1,2. The results clearly demonstrate that the experimental eigenvalues λ1exp and λ2exp closely match their respective theoretical predictions after the iterative qPCA process. Moreover, the uncertainties Δλ1,2 gradually decrease as the number of iterations increases [see Fig.3(h)].
Once the eigenvalues are obtained, the corresponding eigenvectors can be determined by preparing the probe qubit in the state (|0+eiλ1expτ|1)/2 and modifying the controlled gate to controlled-eiρDτ. Here, τ=π/(λ2expλ1exp)4.87 s. Compared to the eigenvalue computation (t=150 s), the controlled evolution required for extracting the eigenvectors is significantly shorter, spanning only 65 iterations. The experimental results of the eigenvectors are shown in Fig.4(a). We separately plot the two components of the eigenvectors, |e1 and |e2, and compare the experimental results with the theoretical ones using a bar figure. The fidelities of the experimental eigenvectors, |e1exp and |e2exp, are 0.9998 and 0.9999, respectively.
Fig.4 Experimental eigenvectors and the iterative process. (a) Experimental results of the eigenvectors for Group 1 (left panel) and Group 2 (right panel). The coefficients of |e1 and |e2, represented in the computational basis, are illustrated. Both theoretical (green bars) and experimental (yellow bars) coefficients are shown for comparison, and the fidelities of the experimental eigenvectors exceed 0.9998. (b) Change in state fidelity (probe and trial qubits) as a function of the number of iterations. The fidelity is plotted at every 50 iterations for better visualization, while the solid line represents the fitting result. As a reference, we display the density matrices of the probe and trial qubits at the 200th and 800th iterations, as shown in the insets.

Full size|PPT slide

To evaluate the performance of the iterative qPCA, we perform state tomography on the probe and trial qubits every 50 iterations in Group 1. The state fidelity, defined as F=tr(ρexpρth)/tr(ρexp2)tr(ρth2), is computed and plotted against the number of iterations, as shown in Fig.4(b). The fidelity demonstrates a decreasing trend as the number of iterations increases, primarily due to the effects of decoherence and imperfections in the quantum gates during each iteration. These factors contribute to imperfections in the state of the probe and trial qubits, subsequently affecting the fidelity of the next iteration. Nevertheless, the fidelity consistently remains above a high level (0.96), indicating the robustness of the protocol against such errors.
Moving on to Group 2, the experimental eigenvalues and eigenvectors are depicted in Fig.3(d)−(h) and Fig.4(a). Despite the different training dataset used in this group, the experimental results exhibit high precision, further validating the stability and effectiveness of our iterative protocol. It is important to note that the experimental results for the remaining groups can be found in the Electronic Supplementary Materials, providing a comprehensive analysis of the protocol’s performance across multiple datasets.

2.7 Image classification

After obtaining the two eigenvalues λ1,2exp and corresponding eigenvectors |e1,2exp through the iterative qPCA process, the remaining tasks can be efficiently performed on classical computers. It is shown by Turk et al. [54] that e1=X|e1exp and e2=X|e2exp are two principal components of the covariance matrix C=XXT, which can be referred to as the “eigen-features” of the training dataset. Consequently, we can compress the information of all training images xjtrain and test images xjtest (after centralization) into a two-dimensional space spanned by these two principal components. Specifically, we define Ωjtrain=eTxjtrain and Ωjtest=eTxjtest as 2-dimensional weight vectors, which can be computed with polynomial complexity. To classify a CT image in the test dataset, we use the nearest-neighbor method with distance defined by the 2-norm ΩjtrainΩjtest. Further details can be found in the Methods and Supplemental Information.
We present a visualization of the two weight vectors Ωjtrain and all 80 weight vectors Ωjtest from the test dataset on a 2-dimensional plane in Fig.5. The positive images, as labeled in the iCTFT database, are colored in red, while the negative images are shown in blue. The weight vectors corresponding to the training images are marked with circles, and the decision boundary is represented by a dashed line. The weight vectors associated with the test images are denoted by crosses. It can be observed that most of the test images have been successfully classified using the iterative qPCA process for either Group 1 or Group 2. Among the 78 test CT images included in Group 1, 72 were successfully recognized, leading to an accuracy rate of 92.31%. Conversely, out of the 78 test images in Group 2, 68 were correctly classified, resulting in an achievement rate of 87.17%.
Fig.5 Classification of lung CT images after qPCA. (a) Classification results for Group 1. After performing qPCA, each CT image in the dataset is projected onto a two-dimensional space spanned by the two experimental eigenvectors |e1exp and |e2exp. The two training images are denoted by circles, while the test images are represented by crosses. The test dataset consists of 39 virus-negative images (blue) and 39 virus-positive images (red). The decision boundary is depicted by the dashed line. Out of the 78 test images, 72 are correctly identified, resulting in a success rate of 92.31%. (b) Classification results for Group 2. Among the 78 test images, 68 are accurately classified, yielding a success rate of 87.17%.

Full size|PPT slide

In this case where only two samples were used as the training set, PCA attempts to utilize the available information to capture the overall structure within the dataset. The dissimilarity between the two samples in the training set becomes the primary direction sought by PCA. Consequently, the two samples from the training set will be distributed along the principal component direction in the reduced-dimension space, with a relatively large distance between them, reflecting the differences present in the original data. When applying PCA to the test dataset, the samples within the test dataset are projected according to the principal components learned from the training data. As the test data were not involved in the training process, their projected positions may be closer to each other, as shown in Fig.5. It is important to note that the occurrence of this phenomenon depends on the similarity between the training and test datasets and the data distribution. However, with only two training samples, this phenomenon is more likely due to limited information availability.

3 Discussion

There are two issues regarding the experimental qPCA. First, loading the classical data into quantum states is generally difficult. Currently, no efficient method for loading classical data has been realized in any experiment. It is crucial to explore and develop efficient implementations of quantum RAM architectures, such as the “bucket brigade” approach or other alternatives. Despite this limitation, qPCA can still be employed to address problems involving quantum states, such as dimension reduction, process tomography, and state discrimination. Second, the multiple state copies and iterative approach can be combined as demonstrated in this experiment (two copies and 1000 iterations). For a real quantum processor, the number of allowable state copies is limited by the availability of controllable qubits, while the number of iterations is limited by the relaxation time. In most cases, it is necessary to combine these two techniques to perform the qPCA circuit with higher precision.
Classical PCA, a popular tool in many machine learning tasks, suffers from a severe scaling problem when computing the eigenvalues and eigenvectors of the covariance matrix. In this work, instead of using the original qPCA algorithm that requires multiple copies of quantum states and implementation of quantum phase estimations, we proposed a hardware-efficient qPCA approach to circumvent this problem. We demonstrated that a hardware-efficient iterative method could effectively reset the probe and trial qubits in the NMR quantum processor, and the eigenvalues and eigenvectors (principal components) could be efficiently determined using the quantum scattering circuit. As a practical application of PCA, we focused on the classification of lung CT images from COVID-19 patients, and demonstrated high accuracy in classifying these images using the NMR system. Our experiment marks the first implementation of the qPCA algorithm in a modified form and highlights the potential of near-term quantum devices to accelerate quantum machine learning algorithms, which opens up new avenues for practical applications of large-scale quantum computers.

References

[1]
T.M. Mitchell, Machine Learning, Vol. 1, New York: McGraw-Hill, 1997
[2]
M. I. Jordan, T. M. Mitchell. Machine learning: Trends, perspectives, and prospects. Science, 2015, 349(6245): 255
CrossRef ADS Google scholar
[3]
G. Carleo, I. Cirac, K. Cranmer, L. Daudet, M. Schuld, N. Tishby, L. Vogt-Maranto, L. Zdeborová. Machine learning and the physical sciences. Rev. Mod. Phys., 2019, 91(4): 045002
CrossRef ADS Google scholar
[4]
B. J. Erickson, P. Korfiatis, Z. Akkus, T. L. Kline. Machine learning for medical imaging. Radiographics, 2017, 37(2): 505
CrossRef ADS Google scholar
[5]
M. L. Giger. Machine learning in medical imaging. J. Am. Coll. Radiol., 2018, 15(3): 512
CrossRef ADS Google scholar
[6]
S. Wang, C. Li, R. Wang, Z. Liu, M. Wang, H. Tan, Y. Wu, X. Liu, H. Sun, R. Yang, X. Liu, J. Chen, H. Zhou, I. Ben Ayed, H. Zheng. Annotation-efficient deep learning for automatic medical image segmentation. Nat. Commun., 2021, 12(1): 5915
CrossRef ADS Google scholar
[7]
Y. C. Chiu, S. Zheng, L. J. Wang, B. S. Iskra, M. K. Rao, P. J. Houghton, Y. Huang, Y. Chen. Predicting and characterizing a cancer dependency map of tumors with deep learning. Sci. Adv., 2021, 7(34): eabh1275
CrossRef ADS Google scholar
[8]
J. Witowski, L. Heacock, B. Reig, S. K. Kang, A. Lewin, K. Pysarenko, S. Patel, N. Samreen, W. Rudnicki, E. Łuczyńska, T. Popiela, L. Moy, K. J. Geras. Improving breast cancer diagnostics with deep learning for MRI. Sci. Transl. Med., 2022, 14(664): eabo4802
CrossRef ADS Google scholar
[9]
N. M. Thomasian, I. R. Kamel, H. X. Bai. Machine intelligence in non-invasive endocrine cancer diagnostics. Nat. Rev. Endocrinol., 2022, 18(2): 81
CrossRef ADS Google scholar
[10]
U. J. Schoepf, A. C. Schneider, M. Das, S. A. Wood, J. I. Cheema, P. Costello. Pulmonary embolism: Computer-aided detection at multidetector row spiral computed tomography. J. Thorac. Imaging, 2007, 22(4): 319
CrossRef ADS Google scholar
[11]
M. M. Dundar, G. Fung, B. Krishnapuram, R. B. Rao. Multiple-instance learning algorithms for computer-aided detection. IEEE Trans. Biomed. Eng., 2008, 55(3): 1015
CrossRef ADS Google scholar
[12]
H. P. Chan, S. C. B. Lo, B. Sahiner, K. L. Lam, M. A. Helvie. Computer‐aided detection of mammographic microcalcifications: Pattern recognition with an artificial neural network. Med. Phys., 1995, 22(10): 1555
CrossRef ADS Google scholar
[13]
S. Bauer, R. Wiest, L. P. Nolte, M. Reyes. A survey of MRI-based medical image analysis for brain tumor studies. Phys. Med. Biol., 2013, 58(13): R97
CrossRef ADS Google scholar
[14]
T. M. Mitchell, S. V. Shinkareva, A. Carlson, K. M. Chang, V. L. Malave, R. A. Mason, M. A. Just. Predicting human brain activity associated with the meanings of nouns. Science, 2008, 320(5880): 1191
CrossRef ADS Google scholar
[15]
C. Davatzikos, Y. Fan, X. Wu, D. Shen, S. M. Resnick. Detection of prodromal Alzheimer’s disease via pattern classification of magnetic resonance imaging. Neurobiol. Aging, 2008, 29(4): 514
CrossRef ADS Google scholar
[16]
D. Kim, J. Burge, T. Lane, G. D. Pearlson, K. A. Kiehl, V. D. Calhoun. Hybrid ICA–Bayesian network approach reveals distinct effective connectivity differences in schizophrenia. Neuroimage, 2008, 42(4): 1560
CrossRef ADS Google scholar
[17]
W. Ning, S. Lei, J. Yang, Y. Cao, P. Jiang, Q. Yang, J. Zhang, X. Wang, F. Chen, Z. Geng, L. Xiong, H. Zhou, Y. Guo, Y. Zeng, H. Shi, L. Wang, Y. Xue, Z. Wang. Open resource of clinical data from patients with pneumonia for the prediction of COVID-19 outcomes via deep learning. Nat. Biomed. Eng., 2020, 4(12): 1197
CrossRef ADS Google scholar
[18]
A. J. Rodriguez-Morales, J. A. Cardona-Ospina, E. Guti’errez-Ocampo, R. Villamizar-Penã, Y. Holguin-Rivera, J. P. Escalera-Antezana, L. E. Alvarado-Arnez, D. K. Bonilla-Aldana, C. Franco-Paredes, A. F. Henao-Martinez, A. Paniz-Mondolfi, G. J. Lagos-Grisales, E. Ramírez-Vallejo, J. A. Suárez, L. I. Zambrano, W. E. Villamil-Gómez, G. J. Balbin-Ramon, A. A. Rabaan, H. Harapan, K. Dhama, H. Nishiura, H. Kataoka, T. Ahmad, R. Sah. Clinical, laboratory and imaging features of COVID-19: A systematic review and meta-analysis. Travel Med. Infect. Dis., 2020, 34: 101623
CrossRef ADS Google scholar
[19]
H. Shi, X. Han, N. Jiang, Y. Cao, O. Alwalid, J. Gu, Y. Fan, C. Zheng. Radiological findings from 81 patients with COVID-19 pneumonia in Wuhan, China: A descriptive study. Lancet Infect. Dis., 2020, 20(4): 425
CrossRef ADS Google scholar
[20]
K. C. Liu, P. Xu, W. F. Lv, X. H. Qiu, J. L. Yao, J. F. Gu, W. Wei. CT manifestations of coronavirus disease-2019: A retrospective analysis of 73 cases by disease severity. Eur. J. Radiol., 2020, 126: 108941
CrossRef ADS Google scholar
[21]
F. P. M. Schuld, I. Sinayskiy, F. Petruccione. An introduction to quantum machine learning. Contemp. Phys., 2015, 56(2): 172
CrossRef ADS Google scholar
[22]
J. Biamonte, P. Wittek, N. Pancotti, P. Rebentrost, N. Wiebe, S. Lloyd. Quantum machine learning. Nature, 2017, 549(7671): 195
CrossRef ADS Google scholar
[23]
C. Ciliberto, M. Herbster, A. D. Ialongo, M. Pontil, A. Rocchetto, S. Severini, L. Wossnig. Quantum machine learning: A classical perspective. Proc. Royal Soc. A, 2018, 474(2209): 20170551
CrossRef ADS Google scholar
[24]
P. Rebentrost, M. Mohseni, S. Lloyd. Quantum support vector machine for big data classification. Phys. Rev. Lett., 2014, 113(13): 130503
CrossRef ADS Google scholar
[25]
Z. Li, X. Liu, N. Xu, J. Du. Experimental realization of a quantum support vector machine. Phys. Rev. Lett., 2015, 114(14): 140504
CrossRef ADS Google scholar
[26]
I. Kerenidis, A. Prakash, D. Szilágyi. Quantum algorithms for second-order cone programming and support vector machines. Quantum, 2021, 5: 427
CrossRef ADS Google scholar
[27]
P. L. Dallaire-Demers, N. Killoran. Quantum generative adversarial networks. Phys. Rev. A, 2018, 98(1): 012324
CrossRef ADS Google scholar
[28]
C. Zoufal, A. Lucchi, S. Woerner. Quantum generative adversarial networks for learning and loading random distributions. npj Quantum Inf., 2019, 5: 103
CrossRef ADS Google scholar
[29]
H. L. Huang, Y. Du, M. Gong, Y. Zhao, Y. Wu, C. Wang, S. Li, F. Liang, J. Lin, Y. Xu, R. Yang, T. Liu, M. H. Hsieh, H. Deng, H. Rong, C. Z. Peng, C. Y. Lu, Y. A. Chen, D. Tao, X. Zhu, J. W. Pan. Experimental quantum generative adversarial networks for image generation. Phys. Rev. Appl., 2021, 16(2): 024051
CrossRef ADS Google scholar
[30]
A. W. Harrow, A. Hassidim, S. Lloyd. Quantum algorithm for linear systems of equations. Phys. Rev. Lett., 2009, 103(15): 150502
CrossRef ADS Google scholar
[31]
J. Pan, Y. Cao, X. Yao, Z. Li, C. Ju, H. Chen, X. Peng, S. Kais, J. Du. Experimental realization of quantum algorithm for solving linear systems of equations. Phys. Rev. A, 2014, 89(2): 022313
CrossRef ADS Google scholar
[32]
D. W. Berry. High-order quantum algorithm for solving linear differential equations. J. Phys. A Math. Theor., 2014, 47(10): 105301
CrossRef ADS Google scholar
[33]
D. W. Berry, A. M. Childs, A. Ostrander, G. Wang. Quantum algorithm for linear differential equations with exponentially improved dependence on precision. Commun. Math. Phys., 2017, 356(3): 1057
CrossRef ADS Google scholar
[34]
T. Xin, S. Wei, J. Cui, J. Xiao, I. Arrazola, L. Lamata, X. Kong, D. Lu, E. Solano, G. Long. Quantum algorithm for solving linear differential equations: Theory and experiment. Phys. Rev. A, 2020, 101(3): 032307
CrossRef ADS Google scholar
[35]
G. Carleo, M. Troyer. Solving the quantum many-body problem with artificial neural networks. Science, 2017, 355(6325): 602
CrossRef ADS Google scholar
[36]
L. Hu, S. H. Wu, W. Cai, Y. Ma, X. Mu, Y. Xu, H. Wang, Y. Song, D. L. Deng, C. L. Zou, L. Sun. Quantum generative adversarial learning in a superconducting quantum circuit. Sci. Adv., 2019, 5(1): eaav2761
CrossRef ADS Google scholar
[37]
Y. Liu, S. Arunachalam, K. Temme. A rigorous and robust quantum speed-up in supervised machine learning. Nat. Phys., 2021, 17(9): 1013
CrossRef ADS Google scholar
[38]
S. Lloyd, M. Mohseni, P. Rebentrost. Quantum principal component analysis. Nat. Phys., 2014, 10(9): 631
CrossRef ADS Google scholar
[39]
T. Xin, L. Che, C. Xi, A. Singh, X. Nie, J. Li, Y. Dong, D. Lu. Experimental quantum principal component analysis via parametrized quantum circuits. Phys. Rev. Lett., 2021, 126(11): 110502
CrossRef ADS Google scholar
[40]
Z. Li, Z. Chai, Y. Guo, W. Ji, M. Wang, F. Shi, Y. Wang, S. Lloyd, J. Du. Resonant quantum principal component analysis. Sci. Adv., 2021, 7(34): eabg2589
CrossRef ADS Google scholar
[41]
Z. Li, H. Zhou, C. Ju, H. Chen, W. Zheng, D. Lu, X. Rong, C. Duan, X. Peng, J. Du. Experimental realization of a compressed quantum simulation of a 32-spin Ising chain. Phys. Rev. Lett., 2014, 112(22): 220501
CrossRef ADS Google scholar
[42]
Z. Li, X. Liu, H. Wang, S. Ashhab, J. Cui, H. Chen, I. Peng, J. Du. Quantum simulation of resonant transitions for solving the eigenproblem of an effective water Hamiltonian. Phys. Rev. Lett., 2019, 122(9): 090504
CrossRef ADS Google scholar
[43]
M. Kjaergaard, M. E. Schwartz, A. Greene, G. O. Samach, A. Bengtsson, M. O’Keeffe, C. M. McNally, J. Braumüller, D. K. Kim, P. Krantz, M. Marvian, A. Melville, B. M. Niedzielski, Y. Sung, R. Winik, J. Yoder, D. Rosenberg, K. Obenland, S. Lloyd, T. P. Orlando, I. Marvian, S. Gustavsson, W. D. Oliver. Demonstration of density matrix exponentiation using a superconducting quantum processor. Phys. Rev. X, 2022, 12(1): 011005
CrossRef ADS Google scholar
[44]
S. Pal, N. Nishad, T. S. Mahesh, G. J. Sreejith. Temporal order in periodically driven spins in star-shaped clusters. Phys. Rev. Lett., 2018, 120(18): 180602
CrossRef ADS Google scholar
[45]
K. Micadei, J. P. S. Peterson, A. M. Souza, R. S. Sarthour, I. S. Oliveira, G. T. Landi, R. M. Serra, E. Lutz. Experimental validation of fully quantum fluctuation theorems using dynamic Bayesian networks. Phys. Rev. Lett., 2021, 127(18): 180603
CrossRef ADS Google scholar
[46]
R. J. de Assis, T. M. de Mendonça, C. J. Villas-Boas, A. M. de Souza, R. S. Sarthour, I. S. Oliveira, N. G. de Almeida. Efficiency of a quantum Otto heat engine operating under a reservoir at effective negative temperatures. Phys. Rev. Lett., 2019, 122(24): 240602
CrossRef ADS Google scholar
[47]
Z. Zhang, X. Long, X. Zhao, Z. Lin, K. Tang, H. Liu, X. Yang, X. Nie, J. Wu, J. Li, T. Xin, K. Li, D. Lu. Identifying Abelian and non-Abelian topological orders in the string-net model using a quantum scattering circuit. Phys. Rev. A, 2022, 105(3): L030402
CrossRef ADS Google scholar
[48]
C. Miquel, J. P. Paz, M. Saraceno, E. Knill, R. Laflamme, C. Negrevergne. Interpretation of tomography and spectroscopy as dual forms of quantum computation. Nature, 2002, 418(6893): 59
CrossRef ADS Google scholar
[49]
Z. Li, M. H. Yung, H. Chen, D. Lu, J. D. Whitfield, X. Peng, A. Aspuru-Guzik, J. Du. Solving quantum ground-state problems with nuclear magnetic resonance. Sci. Rep., 2011, 1: 88
CrossRef ADS Google scholar
[50]
T. B. Batalhão, A. M. Souza, R. S. Sarthour, I. S. Oliveira, M. Paternostro, E. Lutz, R. M. Serra. Irreversibility and the arrow of time in a quenched quantum system. Phys. Rev. Lett., 2015, 115(19): 190601
CrossRef ADS Google scholar
[51]
T. B. Batalhão, A. M. Souza, L. Mazzola, R. Auccaise, R. S. Sarthour, I. S. Oliveira, J. Goold, G. De Chiara, M. Paternostro, R. M. Serra. Experimental reconstruction of work distribution and study of fluctuation relations in a closed quantum system. Phys. Rev. Lett., 2014, 113(14): 140601
CrossRef ADS Google scholar
[52]
V. Giovannetti, S. Lloyd, L. Maccone. Quantum random access memory. Phys. Rev. Lett., 2008, 100(16): 160501
CrossRef ADS Google scholar
[53]
W. Ning, S. Lei, J. Yang, Y. Cao, P. Jiang, Q. Yang, J. Zhang, X. Wang, F. Chen, Z. Geng, J. Xiong, H. Zhou, K. Guo, Y. Zeng, H. Chi, L. Wang, Y. Xue, Z. Wang. Open resource of clinical data from patients with pneumonia for the prediction of COVID-19 outcomes via deep learning. Nat. Biomed. Eng., 2020, 4: 1197
CrossRef ADS Google scholar
[54]
M.A. TurkA. P. Pentland, in: Proceedings of 1991 IEEE Computer Society Conference on Computer Vision and Pattern Recognition, IEEE Computer Society, 1991, pp 586–587
[55]
J. Li, D. Lu, Z. Luo, R. Laflamme, X. Peng, J. Du. Approximation of reachable sets for coherently controlled open quantum systems: Application to quantum state engineering. Phys. Rev. A, 2016, 94(1): 012312
CrossRef ADS Google scholar
[56]
X. Nie, X. Zhu, K. Huang, K. Tang, X. Long, Z. Lin, Y. Tian, C. Qiu, C. Xi, X. Yang, J. Li, Y. Dong, T. Xin, D. Lu. Experimental realization of a quantum refrigerator driven by indefinite causal orders. Phys. Rev. Lett., 2022, 129(10): 100603
CrossRef ADS Google scholar
[57]
T. Xin, Y. Li, Y. A. Fan, X. Zhu, Y. Zhang, X. Nie, J. Li, Q. Liu, D. Lu. Quantum phases of three-dimensional chiral topological insulators on a spin quantum simulator. Phys. Rev. Lett., 2020, 125(9): 090502
CrossRef ADS Google scholar
[58]
K. Micadei, J. P. Peterson, A. M. Souza, R. S. Sarthour, I. S. Oliveira, G. T. Landi, T. B. Batalhão, R. M. Serra, E. Lutz. Reversing the direction of heat flow using quantum correlations. Nat. Commun., 2019, 10(1): 2456
CrossRef ADS Google scholar
[59]
S. J. Glaser, U. Boscain, T. Calarco, C. P. Koch, W. Köckenberger, R. Kosloff, I. Kuprov, B. Luy, S. Schirmer, T. Schulte-Herbrüggen, D. Sugny, F. K. Wilhelm. Training Schrödinger’s cat: Quantum optimal control. Eur. Phys. J. D, 2015, 69(12): 279
CrossRef ADS Google scholar
[60]
P. de Fouquieres, S. G. Schirmer, S. J. Glaser, I. Kuprov. Second order gradient ascent pulse engineering. J. Magn. Reson., 2011, 212(2): 412
CrossRef ADS Google scholar
[61]
G. E. Hinton, R. R. Salakhutdinov. Reducing the dimensionality of data with neural networks. Science, 2006, 313(5786): 504
CrossRef ADS Google scholar
[62]
H. Abdi, L. J. Williams. Principal component analysis. Wiley Interdiscip. Rev. Comput. Stat., 2010, 2(4): 433
CrossRef ADS Google scholar
[63]
J. Li, X. Yang, X. Peng, C. P. Sun. Hybrid quantum−classical approach to quantum optimal control. Phys. Rev. Lett., 2017, 118(15): 150503
CrossRef ADS Google scholar
[64]
D. Lu, K. Li, J. Li, H. Katiyar, A. J. Park, G. Feng, T. Xin, H. Li, G. Long, A. Brodutch, J. Baugh, B. Zeng, R. Laflamme. Enhancing quantum control by bootstrapping a quantum processor of 12 qubits. npj Quantum Inf., 2017, 3: 45
CrossRef ADS Google scholar
[65]
S. T. Flammia, Y. K. Liu. Direct fidelity estimation from few Pauli measurements. Phys. Rev. Lett., 2011, 106(23): 230501
CrossRef ADS Google scholar
[66]
M. P. da Silva, O. Landon-Cardinal, D. Poulin. Practical characterization of quantum devices without tomography. Phys. Rev. Lett., 2011, 107(21): 210404
CrossRef ADS Google scholar
[67]
S. Lloyd. Universal quantum simulators. Science, 1996, 273(5278): 1073
CrossRef ADS Google scholar
[68]
N. A. Gershenfeld, I. L. Chuang. Bulk spin-resonance quantum computation. Science, 1997, 275(5298): 350
CrossRef ADS Google scholar
[69]
D. Lu, H. Li, D. A. Trottier, J. Li, A. Brodutch, A. P. Krismanich, A. Ghavami, G. I. Dmitrienko, G. Long, J. Baugh, R. Laflamme. Experimental estimation of average fidelity of a clifford gate on a 7-qubit quantum processor. Phys. Rev. Lett., 2015, 114(14): 140505
CrossRef ADS Google scholar
[70]
G. Feng, F. H. Cho, H. Katiyar, J. Li, D. Lu, J. Baugh, R. Laflamme. Gradient-based closed-loop quantum optimal control in a solid-state two-qubit system. Phys. Rev. A, 2018, 98(5): 052341
CrossRef ADS Google scholar
[71]
T. Xin, X. Nie, X. Kong, J. Wen, D. Lu, J. Li. Quantum pure state tomography via variational hybrid quantum-classical method. Phys. Rev. Appl., 2020, 13(2): 024013
CrossRef ADS Google scholar

Declarations

The authors declare that they have no competing interests and there are no conflicts.

Electronic supplementary materials

The online version contains supplementary material available at https://doi.org/10.1007/s11467-024-1391-x and https://journal.hep.com.cn/fop/EN/10.1007/s11467-024-1391-x.

Acknowledgements

We thank Y. Peng for helpful discussion and suggestions about CT-image discrimination methods. This work was supported by the National Key Research and Development Program of China (No. 2019YFA0308100), the National Natural Science Foundation of China (Nos. 12075110 and 12104213), the Science, Technology and Innovation Commission of Shenzhen Municipality (Nos. KQTD20190929173815000 and JCYJ20200109140803865), Pengcheng Scholars, Guangdong Innovative and Entrepreneurial Research Team Program (No. 2019ZT08C044), and Guangdong Provincial Key Laboratory (No. 2019B121203002), Guangdong Basic and Applied Basic Research Foundation (No. 2020A1515110987).

RIGHTS & PERMISSIONS

2024 Higher Education Press
AI Summary AI Mindmap
PDF(5917 KB)

Supplementary files

fop-24391-of-ludawei_suppl_1 (5001 KB)

509

Accesses

1

Citations

Detail

Sections
Recommended

/