This paper was converted on www.awesomepapers.org from LaTeX by an anonymous user.
Want to know more? Visit the Converter page.

Quantum-enhanced bosonic learning machine

Chi-Huan Nguyen These authors contributed equally to this work    Ko-Wei Tseng These authors contributed equally to this work    Gleb Maslennikov222Present address: NKT Photonics, Bregnerødvej 144, 3460 Birkerød, Denmark    H. C. J. Gan Centre for Quantum Technologies, National University of Singapore, 3 Science Dr 2, 117543, Singapore    Dzmitry Matsukevich Centre for Quantum Technologies, National University of Singapore, 3 Science Dr 2, 117543, Singapore Department of Physics, National University of Singapore, 2 Science Dr 3, 117551, Singapore
(December 7, 2024)
Abstract

Quantum processors enable computational speedups for machine learning through parallel manipulation of high-dimensional vectors Biamonte et al. (2017). Early demonstrations of quantum machine learning have focused on processing information with qubits Cai et al. (2015); Trávníček et al. (2019); Havlíček et al. (2019); Johri et al. (2020); Bartkiewicz et al. (2020); Xin et al. (2021); Peters et al. (2021). In such systems, a larger computational space is provided by the collective space of multiple physical qubits. Alternatively, we can encode and process information in the infinite dimensional Hilbert space of bosonic systems such as quantum harmonic oscillators Braunstein and van Loock (2005); Ortiz-Gutiérrez et al. (2017); Flühmann et al. (2019). This approach offers a hardware-efficient solution with potential quantum speedups to practical machine learning problems. Here we demonstrate a quantum-enhanced bosonic learning machine operating on quantum data with a system of trapped ions. Core elements of the learning processor are the universal feature-embedding circuit that encodes data into the motional states of ions, and the constant-depth circuit that estimates overlap between two quantum states. We implement the unsupervised KK-means algorithm to recognize a pattern in a set of high-dimensional quantum states and use the discovered knowledge to classify unknown quantum states with the supervised kk-NN algorithm. These results provide building blocks for exploring machine learning with bosonic processors.

Machine learning techniques excel at finding patterns in data that are usually encoded as high dimensional feature vectors. As the size of these vectors grows, processing them classically requires enormous computational resources Lloyd et al. (2013). Recently proposed quantum algorithms show evidences of computational speedups, that comes from the exploitation of large Hilbert space of quantum systems Lloyd et al. (2013, 2014, 2016); Rebentrost et al. (2014). Demonstrations of quantum machine learning algorithms implemented on discrete variables platforms have shown tremendous potential Cai et al. (2015); Trávníček et al. (2019); Havlíček et al. (2019); Johri et al. (2020); Bartkiewicz et al. (2020); Xin et al. (2021). However, the number of gates and qubits must be increased for solving practical problems on near-term quantum processors.

An alternative approach is to utilize the infinite-dimensional Hilbert space of bosonic systems as the feature space for quantum machine learning Lau et al. (2017); Schuld and Killoran (2019). One advantage of the bosonic architecture is that a single operation, such as squeezing or displacement, is formally equivalent to processing infinitely-dimensional feature vectors Schuld and Killoran (2019). Furthermore, it allows for efficient use of physical resources. For discrete-variable schemes, approximately log(n)\log(n) physical qubits are required to encode an nn-bit data string, whereas in the alternate approach, one bosonic mode is sufficient. As an example, in the ideal case the motion of a single trapped ion suffices to encode 3 infinitely dimensional feature vectors, whereas the internal state of an ion typically only encodes a single qubit Ortiz-Gutiérrez et al. (2017).

Refer to caption
Figure 1: Experimental implementation. a. Schematic of the linear rf trap with two trapped 171Yb+ ions. One ion (black) is prepared in the F7/22{}^{2}F_{7/2} metastable state such that it does not interact with optical fields applied during the experiment. Two Raman beams (R1,R2) couple the motion in the radial directions with the internal states |g,|e|g\rangle,|e\rangle. The xx and yy axes point along the diagonally opposite trap electrodes (Methods).  b. Energy level diagram of 171Yb+. The internal states used in the experiment are |g=|2S1/2,F=0,mF=0|g\rangle=|^{2}S_{1/2},F=0,m_{F}=0\rangle and |e=|2S1/2,F=1,mF=0|e\rangle=|^{2}S_{1/2},F=1,m_{F}=0\rangle. The arrows represent the Raman beams. c. Schematic of radial motional modes. ωA\omega_{A}, ωB\omega_{B}, and ωC\omega_{C} are frequencies of the motional modes AA, BB, and CC which denotes the out-of-phase motion in the yy direction, out-of-phase and in-phase motion in the xx direction respectively. ωAB=|ωAωB|,ωAC=|ωAωC|\omega_{AB}=|\omega_{A}-\omega_{B}|,\,\omega_{AC}=|\omega_{A}-\omega_{C}| d. The experimental sequence to implement the bosonic learning machine. The motional modes are initialized in the ground state. The embedding circuit prepares arbitrary nn-dimensional states in mode BB and CC by applying n1n-1 pairs of carrier (UcU_{\textrm{c}}) and red sideband pulses (UrsbU_{\textrm{rsb}}). The gate sequence for the SWAP test consists of two controlled beam splitters UCBS(θ,ψ)U_{\textrm{CBS}}(\theta,\psi) followed by a projective measurement of the internal state.

In this letter, we report a bosonic learning machine that consists of two building blocks for encoding and processing either quantum or classical data (see Fig. 1d). First, a universal embedding circuit implements a feature map ϕ\phi of classical data 𝒙=(x1,x2,,xn)\boldsymbol{x}=(x_{1},x_{2},...,x_{n}) to a quantum state |ϕ(𝒙)|\phi(\boldsymbol{x})\rangle. The map chosen in this work is amplitude encoding |ϕamp(𝒙)=1/𝒙2j=1nxj|j1|\phi_{\textrm{amp}}(\boldsymbol{x})\rangle=1/||\boldsymbol{x}||_{2}\sum\limits_{j=1}^{n}x_{j}|j-1\rangle, where {|j}\{|j\rangle\} are the Fock states, nn denotes the dimension of the data, and 𝒙2=j=1nxj2||\boldsymbol{x}||_{2}=\sqrt{\sum\limits_{j=1}^{n}x^{2}_{j}} is the Euclidean norm. The universal embedding circuit ϕ\phi can be associated with a state preparation gate sequence Uϕ(𝒙)U_{\phi}(\boldsymbol{x}), that prepares an arbitrary state |ϕ(𝒙)|\phi(\boldsymbol{x})\rangle satisfying Uϕ(𝒙)|0=|ϕ(𝒙)U_{\phi}(\boldsymbol{x})|0\rangle=|\phi(\boldsymbol{x})\rangle Schuld and Killoran (2019); Lloyd et al. (2020).

Machine learning algorithms frequently rely on distance measures that can quantify the similarity between feature vectors Hastie et al. (2009). Here, we employ the Hilbert-Schmidt distance defined as DHS(|ϕ(𝒙),|ϕ(𝒙))=22|ϕ(𝒙)|ϕ(𝒙)|2D_{\textrm{HS}}(|\phi(\boldsymbol{x})\rangle,|\phi(\boldsymbol{x^{\prime}})\rangle)=\sqrt{2-2|\langle\phi(\boldsymbol{x})|\phi(\boldsymbol{x^{\prime}})\rangle|^{2}}, where |ϕ(𝒙)|ϕ(𝒙)|2|\langle\phi(\boldsymbol{x})|\phi(\boldsymbol{x^{\prime}})\rangle|^{2} is the overlap between two quantum states |ϕ(𝒙)|\phi(\boldsymbol{x})\rangle and |ϕ(𝒙)|\phi(\boldsymbol{x^{\prime}})\rangle Trávníček et al. (2019). The overlap measurement, reported throughout this work, can be efficiently realized with a constant-depth circuit implemented by a SWAP test Filip (2002); Gao et al. (2018); Gan et al. (2020); Nguyen et al. (2021).

Refer to caption
Figure 2: K\boldsymbol{K}-means clustering results. a. Measurement of overlap |dm|clk|2|\langle d_{m}|{c_{lk}}\rangle|^{2} between the data states and the kk-th centroid |clk|{c_{lk}}\rangle of the assignment step ll. The data states are the squeezed vacuum states (sqz\mathcal{H}_{\textrm{sqz}}), superposition of |0|0\rangle and |1|1\rangle Fock states (Fock\mathcal{H}_{\textrm{Fock}}), and coherent states (coh\mathcal{H}_{\textrm{coh}}). Top row shows the step-by-step assignment of states into clusters, visualized in the x3x_{3}-x4x_{4} scatter plot. b. The scatter plot matrix of the centroids (crosses) and data states: sqz\mathcal{H}_{\textrm{sqz}} (circles), Fock\mathcal{H}_{\textrm{Fock}} (squares), and coh\mathcal{H}_{\textrm{coh}} (diamonds). The classification results of KK-means algorithm into three clusters are labeled by different colors: cluster 1 (red), cluster 2 (blue), and cluster 3 (purple). The algorithm assigns sqz\mathcal{H}_{\textrm{sqz}} to cluster 1, Fock\mathcal{H}_{\textrm{Fock}} to cluster 2, and coh\mathcal{H}_{\textrm{coh}} to cluster 3. Inset shows the process of updating the centroids visualized in the x1x_{1}-x2x_{2} scatter plot. The error bar denotes the one σ\sigma fit error of the state characterization (see Methods).

In this work, the bosonic learning machine comprises two trapped 171Yb+ ions in a linear radio-frequency Paul trap, employing three motional modes denoted AA, BB, and CC. We start the experiment by preparing all the modes in the ground state of motion. Two of the modes, BB and CC, are used for storing information while AA acts as an auxiliary mode required for implementing the SWAP test. The hyperfine states |g,|e|g\rangle,|e\rangle of one ion mediate interaction between the motional modes, while the other ion is prepared in the F7/22{}^{2}F_{7/2} metastable state and does not interact with optical fields during the experiment (See Fig.1). The Jaynes-Cumming interaction between the internal state and the motional modes enables deterministic preparation of an arbitrary state with dimension nn in n1n-1 steps, using methods presented in Law and Eberly (1996); Ben-Kish et al. (2003). Alternatively, we use displacement and squeezing operations to prepare coherent and squeezed vacuum states respectively. The SWAP test relies on controlled beam splitter gates of the form UCBS(θ,ψ)=exp[(i/)0TσxHBS(ψ,t)dt)]U_{\textrm{CBS}}(\theta,\psi)=\exp[-(i/\hbar)\int_{0}^{T}\sigma_{x}H_{\textrm{BS}}(\psi,t)dt)] that enacts the Hamiltonian HBS(ψ)/=g(t)2(abeiψ+abeiψ)H_{\textrm{BS}}(\psi)/\hbar=\frac{g(t)}{2}(a^{\dagger}be^{i\psi}+ab^{\dagger}e^{-i\psi}), depending on the internal state of the ions in the σx\sigma_{x} basis Filip (2002); Gao et al. (2018); Nguyen et al. (2021). Here a(a)a(a^{\dagger}) and b(b)b(b^{\dagger}) are the annihilation (creation) operator of the motional modes, g(t)g(t) is the coupling strength, ψ\psi an experimentally tunable phase, and θ=0Tg(t)𝑑t\theta=\int_{0}^{T}g(t)dt the effective mixing angle for a gate duration TT (Methods).

Given two quantum states |ϕ(𝒙)B|\phi(\boldsymbol{x})\rangle_{B} and |ϕ(𝒙)C|\phi(\boldsymbol{x^{\prime}})\rangle_{C} prepared in mode BB and CC respectively, the SWAP test can be implemented with controlled beam splitter gates UCBS(π,0)U_{\textrm{CBS}}(\pi,0) acting between modes AA and BB, and UCBS(π/2,π)U_{\textrm{CBS}}(\pi/2,\pi) between modes AA and CC, followed by a projection measurement of the internal state. The overlap between two states is proportional to the probability PgP_{g} to detect the internal state in |g|g\rangle: |Bϕ(𝒙)|ϕ(𝒙)C|2=|12Pg||_{B}\langle\phi(\boldsymbol{x})|\phi(\boldsymbol{x^{\prime}})\rangle_{C}|^{2}=|1-2P_{g}| (Fig.1d). The SWAP test duration is independent from the dimension of the data and is significantly shorter than the coherence times of the motional modes Nguyen et al. (2021).

To highlight applications of our bosonic learning machine, we demonstrate the unsupervised KK-means clustering and supervised kk-NN algorithms using quantum states as the input data. We note that the input data may also be classical as it can be mapped to quantum states by using the universal embedding circuit. We begin with the description of implementing the unsupervised KK-means clustering algorithm. Consider two parties Alice and Bob. Alice prepares and sends Bob identical copies of MM quantum states. The quantum states can be expressed in the Fock basis |dm=j=0n1xm,j+1|j|d_{m}\rangle=\sum\limits_{j=0}^{n-1}x_{m,j+1}|j\rangle, where mm runs from 11 to MM. In this scenario, Bob is assumed to have no a priori information about the states that Alice prepares. Without resorting to a full tomography of the input states, Bob’s task is to sort the quantum states into KK clusters based on similarities among the states.

The algorithm begins with Bob making a guess of the number of clusters KK, and associates each cluster to a centroid state that are randomly initialized. The states are assigned to the cluster that has the nearest centroid. In step ll we implement a map |dmrlm=argmink{D(|dm,|clk)}|d_{m}\rangle\rightarrow r^{m}_{l}=\operatorname*{argmin}_{k}\{D(|d_{m}\rangle,|c_{lk}\rangle)\}, where |clk|c_{lk}\rangle denotes the centroids corresponding to the kk-th cluster. Our quantum advantage comes from the reduction of complexity involved in estimating the distance of the two states |dm|d_{m}\rangle and |clk|c_{lk}\rangle. This estimation takes approximately nn steps to perform classically, in comparison to the constant-time operation in our experiment. The centroids are subsequently updated by Alice to be the mean of the states contained in the corresponding cluster. The assignment and update are repeated until the clusters cease to change.

Refer to caption
Figure 3: Pattern recognition of quantum states with kk-nn algorithm. The overlap between trial states and all members in each cluster were measured with SWAP test. a. Proportion of members in each cluster in the set of k=7k=7 nearest neighbors of the trial states. The trial states are assigned to the cluster that has the largest proportion. For visualization, the calculated Wigner functions of trial and cluster states are shown in the left column and top row, respectively. b. Measured overlap between the training data and the trial states: 12(|0+|1)\frac{1}{\sqrt{2}}(|0\rangle+|1\rangle) (top) and (up to a normalization factor) 0.3S(r=0.8eiπ)+0.2(|0+|1)+0.5D(α=1.7)|0\sqrt{0.3}S(r=0.8e^{i\pi})+\sqrt{0.2}(|0\rangle+|1\rangle)+\sqrt{0.5}D(\alpha=1.7)|0\rangle (bottom). The error bars correspond to statistical uncertainty and represent 95%95\% confidence intervals. Other overlap measurements can be found in the Supplementary Information.

Our data is a set of 15 quantum states and consists of three clusters: the set sqz\mathcal{H}_{\textrm{sqz}} of squeezed vacuum states |reiπ|re^{i\pi}\rangle, Fock\mathcal{H}_{\textrm{Fock}} superposition of Fock states cos(φ/2)|0+sin(φ/2)|1\cos(\varphi/2)|0\rangle+\sin(\varphi/2)|1\rangle, and coh\mathcal{H}_{\textrm{coh}} coherent states |α|\alpha\rangle. We choose the parameters as r{1.5,1.1,1.2,1.3,1.4}r\in\{1.5\,,1.1\,,1.2\,,1.3\,,1.4\}, φ/π{0.37,0.45,0.47,0.72,0.55}\varphi/\pi\in\{0.37\,,0.45\,,0.47\,,0.72\,,0.55\}, and α{1.5,1.3,1.0,1.2,1.1}\alpha\in\{1.5\,,1.3\,,1.0\,,1.2\,,1.1\}. Our simulations verify that KK-means algorithm can partition this data set correctly on a classical computer. The data states are prepared in the mode BB. For the first step, we choose the centroid states in mode C to be |c01=|0|c_{01}\rangle=|0\rangle, |c02=|1|c_{02}\rangle=|1\rangle, and |c03=|2|c_{03}\rangle=|2\rangle. After each step the centroids, truncated to dimension 5, are updated and approximately synthesized using the embedding circuit. We characterize the state generation through measurements of Rabi oscillations on the |g|n+1|g\rangle|n+1\rangle to |e|n|e\rangle|n\rangle red-sideband transition (see Methods).

Figure 2a shows the overlap measurements between the data states and the centroids. We used on average 700 experimental runs for each measurement. With this particular choice of the initial centroids, the algorithm attains a stationary assignment after four steps. The final classification result is given in Fig. 2b, where the scatter plot of the amplitudes xjx_{j} of the data states are shown for jj up to 5. The algorithm associates cluster 1 to HsqzH_{\textrm{sqz}}, cluster 2 to HFockH_{\textrm{Fock}}, and cluster 3 to HcohH_{\textrm{coh}}. The SWAP test measurements, albeit imperfect, produce classification results that agrees perfectly with the prior knowledge about the states sent to Bob. Stationary assignment of the centroids is evident from the step-by-step evolution shown in the inset of Fig. 2b. The assignment results after each step can be found in Extended Data.

We next demonstrate the kk-NN algorithm to classify unknown trial states, by using the three labelled clusters from the KK-means results as training states. The traditional approach to solving the problem of classifying unknown states is to perform a complete tomography, which requires a number of measurements that grows exponentially with the state dimension nn Haah et al. (2017). However, if complete information regarding the state is unnecessary, kk-NN algorithm could offer an efficient alternative, especially when nn is large. With a constant depth SWAP test, computational complexity of the kk-NN becomes independent of nn.

The kk-NN algorithm requires estimation of the overlap between each trial state and all training states. We identify the kk states having highest overlap with the trial state. The trial state is then assigned to the cluster that labels the majority of kk states. Figure 3 shows the experimental results of kk-NN classification with k=7k=7 for a variety of trial states. The first three trial states utilize the same operation that prepares the three clusters, respectively, and are observed to be correctly classified. We further carry out the classification of trial states that are prepared with other operations (See Methods). Such examples are the two states D(α=1)(|0|1)D(\alpha=1)(|0\rangle-|1\rangle) and 0.3S(r=0.8eiπ)|0+0.2(|0+|1)+0.5D(α=1.7)|0\sqrt{0.3}S(r=0.8e^{i\pi})|0\rangle+\sqrt{0.2}(|0\rangle+|1\rangle)+\sqrt{0.5}D(\alpha=1.7)|0\rangle (up to a normalization factor), that are both classified to cluster 2. These results indicate that the outcome of the algorithm is determined by overlap of the quantum states, which can be visualized by the similarity of their Wigner functions. This can be interpreted as a form of Wigner function pattern recognition, much like applying kk-NN to handwriting recognition in classical ML Hastie et al. (2009).

In conclusion, we realize a bosonic learning machine using motional modes in a system of trapped ions. The core subroutine of the machine is the efficient SWAP test that estimates the overlap of two motional modes with a constant gate duration, a feature that is preferred in solving problems with large dimension such as quantum support vector machines. We expect that the experimentally accessible dimensions can be further increased by improving various technical aspects of the setup, such as the motional coherence time and coupling strength between modes. The same bosonic learning machine can also be used to implement several quantum kernels proposed in Schuld and Killoran (2019) and on different experimental platforms such as superconducting microwave cavities Hofheinz et al. (2009); Gao et al. (2018). These results provide a key primitive for developing advanced quantum-enhanced machine learning algorithms in infinite-dimensional feature spaces.

Acknowledgements.
We thank P.T. Le, H.N. Le, and L.C. Kwek for discussions. This research is supported by the National Research Foundation, Prime Ministers Office, Singapore, and the Ministry of Education, Singapore, under the Research Centers of Excellence program and NRF Quantum Engineering Program (Award QEP-P4)

Author contributions

C.H.N. and D.M. conceived the experiment. C.H.N. K.W.T, G.M. and H.C.J.G. built and maintained the experimental apparatus. C.H.N. and K.W.T performed the experiments and analyzed the experimental data with assistance from G.M. and H.C.J.G. All authors contributed to the manuscript preparation.

Data availability

The data that support the findings of this study are available from the corresponding authors on reasonable request.

Author Information

The authors declare no competing financial interests. Correspondence and requests for materials should be addressed to C.H.N. ([email protected]) or D.M. ([email protected]).

Methods

Experimental setup. We trap two 171Yb+ ions in a four-rod linear radio-frequency Paul trap with single-ion secular trap frequencies (ωx,ωy,ωz)=2π×(1.274,0.945,0.519)(\omega_{x},\omega_{y},\omega_{z})=2\pi\times(1.274,0.945,0.519) MHz. The normal motional modes AA, BB, and CC are the out-of-phase motion in the yy direction, out-of-phase motion and in-phase in the xx direction with frequencies (ωA,ωB,ωC)=2π×(0.782,1.159,1.274)(\omega_{A},\omega_{B},\omega_{C})=2\pi\times(0.782,1.159,1.274) MHz, respectively. The transverse trapping frequencies are actively stabilized and drift less than 100 Hz/hour.

One of the ions, pumped to the metastable state F7/22{}^{2}F_{7/2} by driving the D3/22{}^{2}D_{3/2}\rightarrow 3[1/2]3/23[1/2]^{\circ}_{3/2} transition at 398.98398.98 nm, does not interact with optical fields and is referred to as the “dark” ion. At the beginning of all experiments, the other ion is Doppler cooled by a 369.53  nm laser red-detuned from the |2S1/2,F=1|^{2}S_{1/2},F=1\rangle to |2P1/2,F=0|^{2}P_{1/2},F=0\rangle transition, and sympathetically cools the “dark” ion. The two hyperfine states used in the experiment are |g=|2S1/2,F=0,mF=0|g\rangle=|^{2}S_{1/2},F=0,m_{F}=0\rangle and |e=|2S1/2,F=1,mF=0|e\rangle=|^{2}S_{1/2},F=1,m_{F}=0\rangle, which are separated by ω0/2π=12.643\omega_{0}/2\pi=12.643 GHz. The ion is initialized via optical pumping in the state |g|g\rangle. Resonance fluorescence state detection technique is used to detect the ion’s internal state Olmschenk et al. (2007).

A frequency-doubled, mode-locked Ti:Sapphire laser with a central wavelength of 372.85 nm is used to drive the stimulated Raman transitions. The mode-locked laser has a pulse duration of 3 ps and a repetition rate of 76.2 MHz. Two beams, R1 and R2 (Fig. 1a,b) with an average power of 60mW each, are sent through acoustic-optical modulators (AOMs) and focused to a beam waist of 15μ\sim 15\,\mum at the ions. The beams R1 and R2 form 45 and 135 angles with respect to the zz-axis (Fig. 1a). The detuning of the Raman beams are controlled by the AOMs.

We begin all experiments with all the radial motional modes prepared in the ground state (residual n¯0.05\bar{n}\leq 0.05) using 10 ms Sisyphus cooling followed by 250 cycles of Raman sideband cooling.

Controlled beam splitter gates. We implement controlled beam splitter gates UCBSU_{\textrm{CBS}} between modes AA and BB by applying a bichromatic Raman beatnote at ω0±ωAB\omega_{0}\pm\omega_{AB}, where ωAB=|ωAωB|\omega_{AB}=|\omega_{A}-\omega_{B}|. The resulting Hamiltonian is

HI=g(t)2σx(abeiψ+abeiψ)=σxHBS,H_{I}=\frac{\hbar g(t)}{2}\sigma_{x}(a^{\dagger}be^{-i\psi}+ab^{\dagger}e^{i\psi})=\sigma_{x}H_{\textrm{BS}}, (1)

where ψ=ψbψr2\psi=\frac{\psi_{b}-\psi_{r}}{2}, and ψr\psi_{r} and ψb\psi_{b} are the phases of the bichromatic fields. We let σx=(eiψSσ++eiψSσ)\sigma_{x}=(e^{-i\psi_{S}}\sigma_{+}+e^{i\psi_{S}}\sigma_{-}), where ψS=ψr+ψb2\psi_{\textrm{S}}=-\frac{\psi_{r}+\psi_{b}}{2}, and σ+=|eg|\sigma_{+}=|e\rangle\langle g|, σ=|ge|\sigma_{-}=|g\rangle\langle e|. g(t)g(t) is the coupling strength.

The controlled beam splitter gate corresponds to the unitary evolution UCBS(θ,ψ)=exp[(i/)0TσxHBS(ψ,t)dt)]U_{\textrm{CBS}}(\theta,\psi)=\exp[-(i/\hbar)\int_{0}^{T}\sigma_{x}H_{\textrm{BS}}(\psi,t)dt)], where θ=0Tg(t)𝑑t\theta=\int_{0}^{T}g(t)dt. In the experiment, we obtain a coupling strength g/2π680g/2\pi\sim 680 Hz. This corresponds to implementing a beam splitter operation UCBS(θ=π/2)U_{\textrm{CBS}}(\theta=\pi/2) in T365T\sim 365μ\mus, much shorter than the motional phase coherence time for the superposition of |0+|1|0\rangle+|1\rangle which is approximately 1010 ms.

Preparation and characterization of quantum states. The universal embedding circuit relies on a series n1n-1 pairs of carrier and red-sideband:

l=1n1Ursb(τl,Υl)Uc(tl,υl+υl)\prod_{l=1}^{n-1}U_{\textrm{rsb}}(\tau_{l},\Upsilon_{l})U_{c}(t_{l},\upsilon_{l}+\upsilon^{{}^{\prime}}_{l}) (2)

where tlt_{l} (τl\tau_{l}) and υl\upsilon_{l} (Υl\Upsilon_{l}) are the duration and phase for the ll-th carrier (red-sideband) pulse that are determined by the Eberly-Law algorithm Law and Eberly (1996). The additional phases υl\upsilon^{{}^{\prime}}_{l} compensate for the rotation of the internal states due to the AC Stark shifts of the red-sideband pulses (See Supplementary). The embedding circuit is used to prepare the centroid states of KK-means, the cluster state Fock\mathcal{H}_{\textrm{Fock}} of KK-means experiment, and the trial state (up to a normalization factor) 0.3S(r=0.8eiπ)|0+0.2(|0+|1)+0.5D(α=1.7)|0\sqrt{0.3}S(r=0.8e^{i\pi})|0\rangle+\sqrt{0.2}(|0\rangle+|1\rangle)+\sqrt{0.5}D(\alpha=1.7)|0\rangle of kk-NN experiment. We use spin-dependent force to prepare all coherent states and the squeezed vacuum states Leibfried et al. (2003). For the trial state D(α=1)(|0|1)D(\alpha=1)(|0\rangle-|1\rangle), we first prepare |0|1|0\rangle-|1\rangle, followed by a displacement of α=1\alpha=1.

The real and positive coefficients xj+1x_{j+1} of the data states |dm|d_{m}\rangle, shown in Fig. 2b, are the square root of population distribution p(j)p(j), where p(j)=|dm|j|2p(j)=|\langle d_{m}|j\rangle|^{2}. The population distribution is determined from a Fourier transform of the time evolution while driving the red-sideband transition

Pe(τ)=j=1p(j)ejγτ(1cos(jΩrsbτ))/2P_{e}(\tau)=\sum\limits_{j=1}^{\infty}p(j)e^{-\sqrt{j}\gamma\tau}(1-\cos{(\sqrt{j}\Omega_{\textrm{rsb}}\tau}))/2 (3)

where PeP_{e} is the probability to detect the ion in the state |e|e\rangle, Ωrsb\Omega_{\textrm{rsb}} is the Rabi frequency of the red-sideband, and γ\gamma is the decoherence rate of motional states. To determine p(j)p(j) a fit constrained to be non-negative and j=06p(j)=1\sum_{j=0}^{6}p(j)=1 is applied to Eq. 3 for j=0j=0 to 66.

References

Supplementary Material: Experimental quantum-enhanced machine learning over infinite dimensions

I Delay time between state preparation and the SWAP test

The two steps required for operation of the bosonic learning machine are the state preparation and the overlap measurement using the SWAP test. However, the quantum state of a harmonic oscillator evolves in time as |Ψ=jcjeiωjt|j|\Psi\rangle=\sum_{j}c_{j}e^{-i\omega jt}|j\rangle where ω\omega is the motional frequency. If the frequencies of motional modes ωB\omega_{B} and ωC\omega_{C} are different, care must be taken to calibrate waiting time between preparation and measurement to ensure that intended states are passed to the SWAP test. We set the delay time as nT+offsetnT+\textrm{offset}. Otherwise, for example, the overlap of the two coherent states in modes BB and CC will oscillate as a function of the delay between the two steps, with a period of T=2π/|ωCωB|T=2\pi/|\omega_{C}-\omega_{B}|.

The trap frequency measurements done by scanning the motional sidebands are affected by the Stark shifts of the internal states. To obtain a frequency difference between the modes which is free from AC Stark shifts we measure the overlap |Ψ|Φ1|2|\langle\Psi|\Phi_{1}\rangle|^{2} as a function of the delay time τ\tau, where |Ψ=|Φ1=1/4(|0+|1+|2+|3)|\Psi\rangle=|\Phi_{1}\rangle=1/\sqrt{4}(|0\rangle+|1\rangle+|2\rangle+|3\rangle). Figure S1 shows the results of overlap measurement. The period TT is obtained from the time difference between two peaks in the |Ψ|Φ1|2|\langle\Psi|\Phi_{1}\rangle|^{2} overlap measurement. We estimate T8.2μT\sim 8.2\,\mus.

Refer to caption
Figure S1: Measurement of |Ψ|Φ1|2|\langle\Psi|\Phi_{1}\rangle|^{2} (blue circles) and |Ψ|Φ2|2|\langle\Psi|\Phi_{2}\rangle|^{2} (orange squares) as a function of waiting time τ\tau, where |Ψ=|Φ1=1/4(|0+|1+|2+|3)|\Psi\rangle=|\Phi_{1}\rangle=1/\sqrt{4}(|0\rangle+|1\rangle+|2\rangle+|3\rangle) and |Φ2=1/4(|0|1+|2|3)|\Phi_{2}\rangle=1/\sqrt{4}(|0\rangle-|1\rangle+|2\rangle-|3\rangle).

II Additional details on state preparation

The Fourier analysis of the time evolution while driving the red sideband can measure only the diagonal terms (phonon distribution) of the density matrix of the states. To verify that the universal embedding circuit can prepare states with desired off-diagonal terms, we carry out the following experiment. We prepare |Φ2=1/4(|0|1+|2|3)|\Phi_{2}\rangle=1/\sqrt{4}(|0\rangle-|1\rangle+|2\rangle-|3\rangle) and compare the two overlaps |Ψ|Φ1|2|\langle\Psi|\Phi_{1}\rangle|^{2} and |Ψ|Φ2|2|\langle\Psi|\Phi_{2}\rangle|^{2} as a function of waiting time τ\tau. Simulations predict that the second overlap |Ψ|Φ2|2|\langle\Psi|\Phi_{2}\rangle|^{2} is shifted in time, relative to |Ψ|Φ1|2|\langle\Psi|\Phi_{1}\rangle|^{2}, by T/2T/2 if the states with correct off-diagonal terms are prepared. The experimental results shown in Fig. S1 agree with calculations.

Refer to caption
Figure S2: a. Circuit diagram for measuring the AC Stark shift induced by the inserted rsb pulse UrsbU_{\textrm{rsb}}. R(π/2,ϕ)R(\pi/2,\phi): π/2\pi/2 rotation pulses with phase ϕ\phi of the internal states. b. Probability of detecting the internal state in |e|e\rangle as a function of the red-sideband pulse duration τ\tau with ϕ=0\phi=0 (blue circles) and ϕ=2π×5.9τ\phi=-2\pi\times 5.9\tau kHz (orange squares). The dashed line is the calculated probability when the AC Stark is compensated.

The red-sideband pulse Ursb(τl,Υl)U_{rsb}(\tau_{l},\Upsilon_{l}) induces an AC Stark shift ΔωAC\hbar\Delta\omega_{\textrm{AC}} that gives rise to a rotation U=eiΔωACτlσzU=e^{-i\Delta\omega_{\textrm{AC}}\tau_{l}\sigma_{z}} of the internal states. To compensate for this rotation, an additional phase υl+1=llΔωACτl\upsilon^{{}^{\prime}}_{l+1}=\sum_{l^{\prime}\leq l}\Delta\omega_{\textrm{AC}}\tau_{l^{\prime}} is included to the next carrier pulses Uc(tl,υl+υl)U_{c}(t_{l},\upsilon_{l}+\upsilon^{{}^{\prime}}_{l}). We determine ΔωAC\Delta\omega_{\textrm{AC}} using the Ramsey experiment with an inserted red-sideband pulse described in Figure S2a. The second π/2\pi/2 rotation pulse has a phase ϕ\phi. We vary the red-sideband pulse duration τ\tau while monitoring the probability of detecting the internal state in |e|e\rangle. When ϕ\phi is set to ΔωACτ-\Delta\omega_{\textrm{AC}}\tau and ΔωAC2π×5.9\Delta\omega_{\textrm{AC}}\sim 2\pi\times 5.9\,KHz, the measurement result (Fig. S2b) agrees with the expectation when the AC Stark shift is compensated.

III Extended Data

Refer to caption
Figure S3: Step-by-step cluster assignment of KK-mean algorithm visualized in scatter plot matrix of the centroids (crosses) and data states: sqz\mathcal{H}_{\textrm{sqz}} (circles), Fock\mathcal{H}_{\textrm{Fock}} (squares), and coh\mathcal{H}_{\textrm{coh}} (diamonds). The error bar denotes the one σ\sigma fit error of the state characterization.
Refer to caption
Figure S4: The overlap between trial states and all members in each cluster in the kk-nn experiment. The error bars correspond to statistical uncertainty and represent 95%95\% confidence intervals.
Refer to caption
Figure S5: Population distribution of the centroid states in the Fock basis. Blue sideband pulses are used to analyze centroid states of step 0 and red sideband pulses to analyze the rest of the centroid states. Insets show the probability to detect the internal state in |e|e\rangle as a function of the pulse duration. The red curves are the fits to the population using Eq. 3. The orange bars show the desired population distribution.