The present disclosure generally relates to a method of performing computation in a quantum computing system that includes trapped ions, and more specifically, to a method of efficiently loading data that can be used in a quantum machine learning.
Quantum machine learning is emerging as a promising avenue for the application of near-term quantum computers. Recent work has shown that quantum algorithms offer advantages in expressivity and efficiency for certain machine learning tasks, and thus have the potential to outperform their classical counterparts in specific domains.
Images, as one of the most prevalent forms of data, have been extensively studied in classical machine learning. Quantum machine learning proposes new paradigms to accelerate image processing tasks. Experimental demonstrations of image-based learning with quantum computers include the training of a quantum-enhanced generative adversarial network that generates images from the MNIST dataset using 8 trapped-ion qubits, a quantum nearest centroid algorithm on the MNIST dataset on up to 8 trapped-ion qubits, and classification of medical images on up to 6 superconducting qubits.
In any quantum algorithm that processes classical data, the step of representing that data as a quantum state is a crucial one. Efficient data loading is imperative for overall algorithmic performance, and in the context of quantum machine learning, it can affect whether and how much quantum advantage can be practically achieved. Near-term quantum machine learning is usually formulated as a parametrized quantum circuit that is optimized according to a given learning task. In this framework, each data point is uploaded to a quantum state one at a time before the parametrized quantum circuit acts on it. In the case of images, each data point by itself can have a large amount of information, proportional to the number of pixels in the image. This poses a problem for near-term quantum computers because their gate fidelity is limited, with two-qubit gate fidelities typically an order of magnitude less than single-qubit gate fidelities. Overall, the number of gates in a quantum data loading circuits proposed so far scales with the size of the data. The number of two-qubit gates in particular is typically proportional to the ‘density’ of the data storage, which can be defined as the ratio between the size of the classical data and the size of the Hilbert space.
Therefore, near-term quantum image processing algorithms often aim to represent data ‘sparsely’, i.e. the number of qubits required scales linearly in the number of pixels. Examples of this are the unary amplitude encoding in which the number of two-qubit gates and number of qubits is proportional to the data size, and product state encoding in which there may be no two-qubit gates involved in the encoding at all. However, since the number of qubits is also limited in near-term quantum computers, using these techniques means that images need to be compressed before loading using techniques like principal component analysis, variational auto-encoders, or simple spatial averaging over image patches. In this process, one may lose information that is critical to the learning task, especially since none of these techniques is particularly sensitive to image-specific features like the presence of edges, which may make it hard to do more complex image processing tasks such as object detection.
Ideally, therefore, there would exist an efficient method that can create a quantum state that ‘densely’ stores the image data, i.e. the size of the Hilbert space is proportional to the number of pixels, and does not require many additional qubits during the state preparation procedure. In this context, the most recent proposal has been the QPIXL framework in which the number of gates scales linearly in the number of pixels. The authors also propose a compression technique which involves setting small angles to 0 during the state preparation procedure and show that some images can be stored with high quality while significantly reducing the number of gates required. However, due to the linear dependence on number of pixels, this technique may still be out of bounds for near-term quantum computers because of the large size and detailed nature of images present in real-world use cases.
Embodiments of the present disclosure provide a method for data loading of an image in quantum machine learning. The method includes encoding, in N qubits, an input (pxy, x, y) of a grayscale image having Nx pixels on the x-axis and Ny pixels on the y-axis in a matrix product state using a plurality of tensors, wherein N=log2(NxNy), 1≤x≤Nx, 1≤y≤Ny, 0<pxy≤1, and x, y∈, and applying, on the N qubits, quantum circuits implementing the plurality of tensors, each of the quantum circuit comprising CNOT gates.
Embodiments of the present disclosure also provide a system for data loading of an image in quantum machine learning. The system includes a quantum processor comprising N qubits, each of the N qubits comprising a trapped ion having two hyperfine states, and a system controller configured to apply quantum circuits implementing a plurality of tensors to the N qubits in the quantum processor, by controlling control one or more lasers configured to emit a laser beam to the N qubits in the quantum processor, wherein an input (pxy, x, y) of a grayscale image having Nx pixels on the x-axis and Ny pixels on the y-axis is encoded in the N qubits in a matrix product state using the plurality of tensors, and N=log2(NxNy), 1≤x≤Nx, 1≤y≤Ny, 0<pxy≤1, and x, y∈.
So that the manner in which the above-recited features of the present disclosure can be understood in detail, a more particular description of the disclosure, briefly summarized above, may be had by reference to embodiments, some of which are illustrated in the appended drawings. It is to be noted, however, that the appended drawings illustrate only typical embodiments of this disclosure and are therefore not to be considered limiting of its scope, for the disclosure may admit to other equally effective embodiments.
To facilitate understanding, identical reference numerals have been used, where possible, to designate identical elements that are common to the figures. In the figures and the following description, an orthogonal coordinate system including an X-axis, a Y-axis, and a Z-axis is used. The directions represented by the arrows in the drawing are assumed to be positive directions for convenience. It is contemplated that elements disclosed in some embodiments may be beneficially utilized on other implementations without specific recitation.
Image-based data is a popular arena for testing quantum machine learning algorithms. A crucial factor in realizing quantum advantage for these applications is the ability to efficiently represent images as quantum states. The embodiments described herein provide a novel method for creating quantum states that approximately encode images as amplitudes, based on recently proposed techniques that convert matrix product states to quantum circuits. The numbers of gates and qubits in the method according to the embodiments described herein scale logarithmically in the number of pixels given a desired accuracy, which make it suitable for near term quantum computers. Finally, experimentally demonstration of the technique according to the embodiments described herein on 8 qubits of a trapped ion quantum computer for complex images of road scenes is shown to make this the first large instance of full amplitude encoding of an image in a quantum state.
To address the above issues, the embodiments described herein provide an approach for dense approximate amplitude encoding of images as quantum states using a number of gates and qubits that are logarithmic in the number of pixels. This technique is based on converting a matrix product state representation of an image into a quantum circuit. A related application of this technique has been used for loading probability distributions to quantum states in the art. It is noted that tensor network methods have found applications in a wide range of quantum information problems and quantum machine learning, but not been used in the context of loading classical data to quantum states in the art. The method described herein provides quantifiable control of the accuracy, which means that the fidelity of the encoded image can be systematically improved as quantum computers advance without changing the underlying encoding scheme.
An imaging objective 108, such as an objective lens with a numerical aperture (NA), for example, of 0.37, collects fluorescence along the Y-axis from the ions and maps each ion onto a multi-channel photo-multiplier tube (PMT) 110 for measurement of individual ions. Non-copropagating Raman laser beams from a laser 112, which are provided along the X-axis, perform operations on the ions. A diffractive beam splitter 114 creates an array of static Raman beams 116 that are individually switched using a multi-channel acousto-optic modulator (AOM) 118 and is configured to selectively act on individual ions. A global Raman laser beam 120 illuminates all ions at once. The system controller (also referred to as a “RF controller”) 104 controls the AOM 118 and thus controls laser pulses to be applied to trapped ions in the ion chain 106. The system controller 104 includes a central processing unit (CPU) 122, a read-only memory (ROM) 124, a random access memory (RAM) 126, a storage unit 128, and the like. The CPU 122 is a processor of the system controller 104. The ROM 124 stores various programs and the RAM 126 is the working memory for various programs and data. The storage unit 128 includes a nonvolatile memory, such as a hard disk drive (HDD) or a flash memory, and stores various programs even if power is turned off. The CPU 122, the ROM 124, the RAM 126, and the storage unit 128 are interconnected via a bus 130. The system controller 104 executes a control program which is stored in the ROM 124 or the storage unit 128 and uses the RAM 126 as a working area. The control program will include software applications that include program code that may be executed by processor in order to perform various functionalities associated with receiving and analyzing data and controlling any and all aspects of the methods and hardware used to create the ion trap quantum computer system 100 discussed herein.
and |1
(|i
(i∈Z)
, where the hyperfine ground state (i.e., the lower energy state of the 2S1/2 hyperfine states) is chosen to represent |0
. Hereinafter, the terms “hyperfine states,” “internal hyperfine states,” and “qubit states” may be interchangeably used to represent computational basis states |0
and |1
(|i
(i∈Z)
. Each ion may be cooled (i.e., kinetic energy of the ion may be reduced) to near the motional ground state |0
m for any motional mode m with no phonon excitation (i.e., nph=0k) by known laser cooling methods, such as Doppler cooling or resolved sideband cooling, and then the qubit state prepared in the hyperfine ground state |0
by optical pumping. Here, |0
represents the individual qubit state of a trapped ion whereas |0
m with the subscript m denotes the motional ground state for a motional mode m of the ion chain 106.
An individual qubit state of each trapped ion may be manipulated by, for example, a mode-locked laser at 355 nanometers (nm) via the excited 2P1/2 level (denoted as |e. As shown in
and |e
, as illustrated in
and |1
. When the one-photon transition detuning frequency Δ is much larger than a two-photon transition detuning frequency (also referred to simply as “detuning frequency”) δ=ω1-ω2-ω01 (hereinafter denoted as ±μ, μ being a positive value), single-photon Rabi frequencies Ω0e(t) and Ω1e(t) (which are time-dependent, and are determined by amplitudes and phases of the first and second laser beams), at which Rabi flopping between states |0
and |e
and between states |1
and |e
respectively occur, and a spontaneous emission rate from the excited state |e
, Rabi flopping between the two hyperfine states |0
and |1
(referred to as a “carrier transition”) is induced at the two-photon Rabi frequency Ω(t). The two-photon Rabi frequency Ω(t) has an intensity (i.e., absolute value of amplitude) that is proportional to Ω0eΩ1e/2Δ, where Ω0e and Ω1e are the single-photon Rabi frequencies due to the first and second laser beams, respectively. Hereinafter, this set of non-copropagating laser beams in the Raman configuration to manipulate internal hyperfine states of qubits (qubit states) may be referred to as a “composite pulse” or simply as a “pulse,” and the resulting time-dependent pattern of the two-photon Rabi frequency Ω(t) may be referred to as an “amplitude” of a pulse or simply as a “pulse,” which are illustrated and further described below. The detuning frequency δ=ω1-ω2-ω01 may be referred to as detuning frequency of the composite pulse or detuning frequency of the pulse. The amplitude of the two-photon Rabi frequency Ω(t), which is determined by amplitudes of the first and second laser beams, may be referred to as an “amplitude” of the composite pulse.
It should be noted that the particular atomic species used in the discussion provided herein is just one example of atomic species which has stable and well-defined two-level energy structures when ionized and an excited state that is optically accessible, and thus is not intended to limit the possible configurations, specifications, or the like of an ion trap quantum computer according to the present disclosure. For example, other ion species include alkaline earth metal ions (Be+, Ca+, Sr+, Mg+, and Ba+) or transition metal ions (Zn+, Hg+, Cd+).
M having frequency ωm according to one embodiment. As illustrated in
and |1
(carrier transition) occurs. When the detuning frequency of the composite pulse is positive (i.e., the frequency difference between the first and second laser beams is tuned higher than the carrier frequency, δ=ω1-ω2-ω01=μ>0, referred to as a blue sideband), Rabi flopping between combined qubit-motional states |0
|nph
m and |1
|nph+1
m occurs (i.e., a transition from the m-th motional mode with n-phonon excitations denoted by |nph
m to the m-th motional mode with (nph+1)-phonon excitations denoted by |nph+1
m occurs when the qubit state |0
flips to |1
). When the detuning frequency of the composite pulse is negative (i.e., the frequency difference between the first and second laser beams is tuned lower than the carrier frequency by the frequency ωm of the motional mode |nph
m, δ=ω1-ω2-ω01=−μ<0, referred to as a red sideband), Rabi flopping between combined qubit-motional states |0
|nph
m and |1
|nph−1
m occurs (i.e., a transition from the motional mode |nph
m to the motional mode |nph−1
m with one less phonon excitations occurs when the qubit state |0
flips to |1
). A π/2-pulse on the blue sideband applied to a qubit transforms the combined qubit-motional state |0
|nph
m into a superposition of |0
|nph
m and |1
|nph+1
m. A π/2-pulse on the red sideband applied to a qubit transforms the combined qubit-motional |0
|nph
m into a superposition of |0
|nph
m and |1
|nph−1
m. When the two-photon Rabi frequency Ω(t) is smaller as compared to the detuning frequency δ=ω1-ω2-ω01=±μ, the blue sideband transition or the red sideband transition may be selectively driven. Thus, qubit states of a qubit can be entangled with a desired motional mode by applying the right type of pulse, such as a π/2-pulse, which can be subsequently entangled with another qubit, leading to an entanglement between the two qubits that is needed to perform an XX-gate operation in an ion trap quantum computer.
First, the amplitude encoding of images are defined and how it can be used in a quantum machine learning algorithm is described. Suppose a grayscale image with Nx pixels on the x-axis and Ny pixels on the y-axis is to be encoded. Let the image to be encoded be given by (pxy, x, y) with 1≤x≤Nx and 1≤y≤Ny and 0≤pxy≤1 and x, y∈. This image can be encoded using N=log2(NxNy) qubits defined as
A quantum machine learning model maps an input (pxy, x, y) to a value c using a parametrized operator Ĉ which can then be used for further classification. If the model uses a single copy of Ψ,
The image loading technique according to the embodiments described herein is now explained by giving a brief introduction to matrix product states. A matrix product state (MPS) is a wave function of the form
It has been shown that smooth differentiable functions which are encoded in the amplitude of a quantum state using a big-endian binary encoding scheme have low entanglement, due to the vanishing additional entanglement cost of adding extra qubits of decreasing significance. This property was exploited in the art to show that smooth 1D probability distributions can be efficiently loaded using MPS states, which leads to an efficient state preparation method for these distributions on a quantum computer. While originally developed as efficient representations of 1D quantum states, matrix product states have since found rich applications when applied to 2D and quasi-2D quantum systems.
In the embodiments described herein, it is demonstrated how these techniques also allow for an efficient representation of amplitude encoded 2D images by tensor networks, and therefore dramatically improve the prospects of encoding 2D images in quantum states. The amplitude encoded 2D image can be viewed as a quantum system on a 2-leg ladder, with the most significant digit of the x and y coordinate of the pixel location represented by the rung of the ladder, as in
The image loading procedure according to the embodiments described herein is now described. State preparation of an arbitrary quantum state on N qubits requires a circuit with (2N) CNOT gates. A grayscale image with L2(=Nx×Ny) pixels can be efficiently represented using an amplitude encoded quantum state with only N=2log2(L)(=log2(Nx×Ny)) qubits, however, exactly performing the state preparation procedure would require L2(=Nx×Ny) quantum gates. Instead, consider that if the indices αi−1ε[1, m], αiε[1, n] and σε[1, d], then Mα
Each of these isometries, Mα(dmn) CNOT gates. When applied in series, as in the example for χ=2 shown in
(log(L)dχ2)˜
(Nχ2) CNOT gates. For small values of the bond dimension χ, this represents a large compression in the circuit required for quantum state preparation.
For images, it has been found that a constant bond dimension χ is sufficient to represent an image to a given fidelity |Ψ|{tilde over (Ψ)}
|, independent of the image resolution. This is seen in
Ψ|{tilde over (Ψ)}
| plateaus as a function of image size at fixed bond dimension χ. This implies that a circuit with a fixed depth and only
(log(L)χ2) CNOT gates can load arbitrarily high-resolution images.
In this case, it has been found b=1.645(18), although it is expected that this exponent may depend on the specific properties of the image being encoded. Therefore, for high resolution images there is always a large compression which can be achieved using the MPS representation of the image, and the desired fidelity can always be increased by increasing the bond dimension χ. Note, also, that as χ→L, the infidelity deceases more rapidly with the bond dimension χ.
However, for near-term application, this MPS state preparation procedure still results in a large number of 2-qubit gates, which may render it impractical. For this reason, a number of approximation methods have been developed for directly constructing a high bond dimension MPS state using a small number of one and two qubit gates. A χ=2 MPS can be simply prepared with a single layer quantum circuit of the form shown in
This circuit approximation method is used to generate low-depth quantum circuits which approximately prepare the quantum states in Eq. 1. Throughout the optimization procedure, the bond dimension of the target MPS is limited to χ≤32. The results of this procedure as a function of circuit depth and image resolution are shown in
In
Finally, this state preparation procedure has been experimentally implemented on a trapped-ion quantum processing unit (QPU). As shown in
It can be seen that the state preparation method according to the embodiments described herein is able to maintain the large scale structure of the complex road scene images despite the noise on the hardware. To see this more clearly, in the bottom row, curves that show the intensity as a function of pixel number are plotted, effectively ‘flattening’ the image. It can be seen that the QPU output closely follows the trend of the simulator output despite the noisy execution. The results are even more visually impressive when applied to the simpler MNIST image shown in the far right column of
The embodiments described herein provide a technique for encoding images into quantum states that makes efficient use of the qubits as well as scales logarithmically in the number of pixels. It has been shown through numerical testing that the technique has favorable scaling properties in terms of the circuits depths required to reach desired fidelities. Being suitable for near-term quantum computers, the technique allows for the design and testing of quantum learning models that are based on amplitudes of computational basis states. Since the data loading time is logarithmic in the number of pixels, it is no longer the leading order factor in the execution time of a typical quantum learning algorithm, and it allows for the realization of quantum advantage based on parameterized quantum circuits with the appropriate expressivity.
It is expected that future work will improve the optimization procedures that are involved in creating the circuit. The exploration of higher-dimensional tensor network methods is also expected to make improvements to loading image fidelity while keeping the circuit depth the same. The method according to the embodiments described herein will likely also generalize to other data types, such as video or three-dimensional data. Finally, it is anticipated that an end-to-end demonstration of a quantum machine learning algorithm that utilizes this data loading scheme will lead to a future milestone in the field of quantum machine learning.
This application claims priority to U.S. Provisional Application Ser. No. 63/542,418, filed Oct. 4, 2023, which is herein incorporated by reference in its entirety.
| Number | Date | Country | |
|---|---|---|---|
| 63542418 | Oct 2023 | US |