Approximate quantum amplitude coding model based on parameterized quantum circuits
Through an approximate quantum amplitude coding model based on a parametric quantum circuit, the amplitude-coded quantum state is converted into a fixed quantum state, and an approximate representation is generated through conjugate transpose transformation, the problem of excessive complexity of the existing amplitude coding circuit is solved, and quantum state coding with low complexity and high fidelity is realized.
Patent Information
- Application Number
- CN202510130630.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-06
- Publication Date
- 2025-04-18
- Estimated Expiration
- 2045-02-06
AI Technical Summary
Due to the high complexity of existing amplitude coding circuits, the circuit depth and quantum gate complexity of quantum state preparation circuits are too high, making it difficult to effectively implement in noise-based quantum devices.
The approximate quantum amplitude encoding model based on a parametric quantum circuit is adopted, and the pre-calculated amplitude-encoded quantum state is converted into a fixed quantum state by a simulated quantum circuit, and the fixed quantum state is encoded into an approximate representation of the amplitude-encoded quantum state by implementing the conjugate transposition transformation of the quantum circuit.
The circuit depth and quantum gate complexity of quantum state preparation circuits are significantly reduced, and the feasibility of realization in noise medium-scale quantum devices is improved, while maintaining high-fidelity coding effect.
Smart Images

Figure CN119578574B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of artificial intelligence technology, and in particular to an approximate quantum amplitude coding model based on a parameterized quantum circuit. Background Art
[0002] With the recent progress in quantum technology, noisy medium-scale quantum devices have become available, making quantum machine learning algorithms an important research focus in industry and academia. As a key tool in quantum machine learning, quantum neural networks aim to enhance the performance of classical neural networks by leveraging the properties of quantum computing, such as superposition, entanglement, and parallelism. Quantum neural networks have shown advantages in areas such as pattern recognition, natural language processing, and image analysis. In particular, quantum neural networks are constructed by parameterizing quantum circuits, which requires encoding input data into quantum states. Therefore, efficiently encoding classical data into quantum states is crucial for quantum neural networks to handle classical machine learning tasks.
[0003] At present, many methods have been developed to encode classical data into quantum states, including ground state coding, angle coding, amplitude coding, etc. Ground state coding represents classical data as a binary string and maps it to the computational ground state of the quantum system, with each input bit corresponding to a quantum bit; although this method is easy to implement, it requires a large number of quantum bits for high-dimensional data, limiting its practicality. Angle coding converts classical data into quantum states by applying the input features as the rotation angle of the quantum gate to each quantum bit; this method is more flexible than ground state coding and can provide richer feature representations, but it still faces scalability challenges as the input dimension increases. Amplitude coding embeds classical data into quantum states through amplitude vectors, so that a quantum state with A system of qubits can represent up to This method provides an efficient and compact solution for encoding high-dimensional data.
[0004] However, the implemented amplitude coding requires deep quantum circuits with an exponential number of quantum gates, and the circuit complexity grows rapidly as the number of quantum bits increases. Summary of the invention
[0005] The present invention provides an approximate quantum amplitude coding model based on a parameterized quantum circuit, so as to solve the defect of high complexity of the amplitude coding circuit in the prior art.
[0006] The present invention provides an approximate quantum amplitude coding model based on parameterized quantum circuits, including a simulated quantum circuit and a realized quantum circuit;
[0007] The simulated quantum circuit is composed of multiple layers, the number of which is limited by the number of quantum bits, and the simulated quantum circuit is represented by a unitary transformation, and the implementation quantum circuit is constructed based on the optimized unitary operator obtained in the simulated quantum circuit;
[0008] The analog quantum circuit is used to convert the pre-calculated amplitude-coded quantum state into a fixed quantum state with maximum fidelity;
[0009] The implemented quantum circuit is used to encode the fixed quantum state into an approximate representation of the amplitude-encoded quantum state through a conjugate transposition transformation of an optimized analog quantum circuit.
[0010] According to an approximate quantum amplitude coding model based on parameterized quantum circuits provided by the present invention, each layer in the analog quantum circuit combines unitary cells and CNOT gates.
[0011] According to an approximate quantum amplitude coding model based on a parameterized quantum circuit provided by the present invention, in each layer of the simulated quantum circuit, each quantum bit is applied with a unitary unit consisting of three single-qubit rotation gates; adjacent quantum bits are connected in sequence through CNOT gates to form a circuit block configuration; and then another unitary unit is applied to each quantum bit to complete the single-layer construction.
[0012] According to an approximate quantum amplitude coding model based on a parameterized quantum circuit provided by the present invention, the number of layers of the simulated quantum circuit is determined by the following method:
[0013] ;
[0014] in, represents the number of layers of the simulated quantum circuit, Represents the number of quantum bits.
[0015] According to an approximate quantum amplitude coding model based on a parameterized quantum circuit provided by the present invention, the simulated quantum circuit maximizes the similarity between the output state and the fixed state by optimizing the adjustable parameters in the parameterized quantum circuit.
[0016] According to an approximate quantum amplitude coding model based on a parameterized quantum circuit provided by the present invention, the similarity is determined by fidelity, as follows:
[0017] ;
[0018] in, represents the fidelity value, represents the input quantum state, Indicates the output state, express The conjugate transpose of represents the adjustable parameters of the parameterized quantum circuit. By transforming the fidelity, the loss function for training the approximate quantum amplitude coding model based on the parameterized quantum circuit can be obtained as follows:
[0019] ;
[0020] By optimizing the loss function, the optimal set of adjustable parameters is obtained. .
[0021] According to an approximate quantum amplitude coding model based on a parameterized quantum circuit provided by the present invention, the implemented quantum circuit is used to encode the quantum fixed state into an approximate representation of the amplitude coded quantum state through a conjugate transposition transformation, as follows:
[0022] ;
[0023] in, is an approximate representation of amplitude coding, for Conjugate transpose transformation, is the optimal set of adjustable parameters, is a fixed quantum state.
[0024] According to an approximate quantum amplitude coding model based on a parameterized quantum circuit provided by the present invention, the pre-calculated amplitude coding quantum state is obtained by:
[0025] ;
[0026] in, represents the amplitude-coded quantum state, Represents the number of quantum bits, used to represent dimensional input vector , make sure is a valid quantum state, Represents a real vector The elements.
[0027] According to the present invention, an approximate quantum amplitude coding model based on a parameterized quantum circuit further includes:
[0028] If the dimension of the input vector is not a power of 2, it is expanded to dimension.
[0029] According to an approximate quantum amplitude coding model based on a parameterized quantum circuit provided by the present invention, the amplitude coding encodes data into the probability amplitude of the quantum state, so that a The quantum bit system can store value.
[0030] The present invention provides an approximate quantum amplitude coding model based on a parameterized quantum circuit, including a simulation quantum circuit and an implementation quantum circuit; the simulation quantum circuit is composed of multiple layers, the number of which is limited by the number of quantum bits, and the simulation quantum circuit is represented by a unitary transformation, and the implementation quantum circuit is constructed based on the optimized unitary operator obtained in the simulation quantum circuit; the simulation quantum circuit is used to convert the pre-calculated amplitude-coded quantum state into a quantum fixed state with maximum fidelity; the implementation quantum circuit is used to encode the quantum fixed state into an approximate representation of the amplitude-coded quantum state through the conjugate transposition transformation of the optimized simulation quantum circuit. Through the approximate representation of the amplitude-coded quantum state, the approximate quantum amplitude coding model significantly reduces the circuit depth and quantum gate complexity of the quantum state preparation circuit, and improves its feasibility in medium-scale quantum devices with noise. BRIEF DESCRIPTION OF THE DRAWINGS
[0031] In order to more clearly illustrate the technical solutions in the present invention or the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0032] Figure 1 is a schematic structural diagram of an approximate quantum amplitude coding model based on a parameterized quantum circuit provided in this embodiment;
[0033] Figure 2 is a schematic diagram of the implementation process of the quantum neural network provided in this embodiment;
[0034] Figure 3 is a schematic diagram of the principle of the simulated quantum circuit provided in this embodiment;
[0035] Figure 4 is a schematic diagram of the change in training loss of samples randomly selected from the MNIST data set provided in this embodiment;
[0036] Figure 5 is a schematic diagram of the change in training loss of samples randomly selected from the Fashion-MNIST data set provided in this embodiment;
[0037] Figure 6 It is a schematic diagram of comparison between the original image corresponding to the sample selected from the MNIST data set provided in this embodiment and the approximate image generated by the model. DETAILED DESCRIPTION
[0038] In order to make the purpose, technical solution and advantages of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in conjunction with the drawings of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0039] Figure 1 It is a structural schematic diagram of an approximate quantum amplitude coding model based on a parameterized quantum circuit provided in this embodiment.
[0040] like Figure 1 As shown, the approximate quantum amplitude coding model based on parameterized quantum circuit provided by an embodiment of the present invention includes a simulation quantum circuit 1 and an implementation quantum circuit 2; the simulation quantum circuit 1 is composed of multiple layers, the number of the multiple layers is limited by the number of quantum bits, and the simulation quantum circuit 1 is represented by a unitary transformation, and the implementation quantum circuit 2 is constructed based on the optimized unitary operator obtained in the simulation quantum circuit 1; the simulation quantum circuit 1 is used to convert the pre-calculated amplitude coded quantum state into a fixed quantum state with maximum fidelity; the implementation quantum circuit 2 is used to encode the fixed quantum state into an approximate representation of the amplitude coded quantum state through the conjugate transpose transformation of the optimized simulation quantum circuit 1. represents the input of the simulated quantum circuit 1, Represents the input for implementing quantum circuit 2.
[0041] In a specific implementation, a qubit is the basic unit for storing and processing information in quantum computing. The state of a qubit is described by a vector in a two-dimensional Hilbert space, which consists of orthogonal ground states. and Zhang Cheng. According to the principle of quantum superposition, the state of a quantum bit can be expressed as a linear combination of these two base states:
[0042] Formula (1)
[0043] in, , and satisfies .
[0044] The quantum state of a multi-qubit system is in the form of a tensor product of the states of a single-qubit system:
[0045] Formula (2)
[0046] Similarly, any The quantum state of a qubit This can be expressed as a superposition of the calculated ground states:
[0047] Formula (3)
[0048] in, Corresponding integer The binary representation of the quantum state, , and full
[0049] Quantum gates are used to manipulate quantum states. Each quantum gate corresponds to a unitary operator in Hilbert space. ,satisfy = I The quantum gate transforms the superposition state as follows:
[0050] Formula (4)
[0051] Among them, the coefficient satisfy ,In parameterized quantum circuits, common quantum gates include single quantum bit rotation gate and ,controlled NOT gate (CNOT).
[0052] Quantum measurement is a key step in extracting classical data from quantum states. A common measurement method is projection measurement, in which the quantum observation operator is a Hermitian operator with spectral decomposition:
[0053] Formula (5)
[0054] in, is the eigenvalue corresponding to The projection operator on the eigenspace of When taking a measurement, the result is The probability is:
[0055] Formula (6)
[0056] like Figure 2 As shown in the figure, the implementation process of quantum neural network follows the following key steps: First, the classical input data Through quantum coding method Encoded as a quantum state The encoded quantum state is then input into the parameterized quantum circuit The latter generates the transformed quantum state through a series of quantum gate operations .right Take measurements and post-process them to obtain classical outputs from which predicted values can be derived The difference between the predicted value and the target value guides the parameters through the optimization method. This process is repeated until the model achieves the desired performance.
[0057] like Figure 1 As shown, the approximate quantum amplitude coding model based on parameterized quantum circuits in this embodiment includes a simulation quantum circuit 1 and an implementation quantum circuit 2, which encodes quantum states with a pre-calculated precise amplitude. as input.
[0058] Amplitude coding uses all probability amplitudes of quantum states to store data. It encodes data into the probability amplitude of quantum states so that a The quantum bit system can store values, which is very suitable for processing high-dimensional data. Dimensional vector , using the amplitude coding method, we can get its corresponding quantum state:
[0059] Formula (7)
[0060] in, represents the amplitude-coded quantum state, represents the number of quantum bits, dimensional input vector , make sure is a valid quantum state, Represents a real vector The elements.
[0061] For example, , corresponding to the quantum state of the 2-qubit system, can be expressed as:
[0062] Formula (8)
[0063] It should be noted that if the dimension of the input vector is not a power of 2, it needs to be expanded to 1 by zero padding before normalization. dimension.
[0064] like Figure 3 As shown, the simulation quantum circuit 1 is designed to encode the quantum state of the pre-calculated precise amplitude Transformed to a fixed quantum state with maximum fidelity Specifically, the simulated quantum circuit 1 consists of multiple layers, each of which combines unitary cells and CNOT gates to ensure expressiveness and entanglement. In each layer, each qubit is subjected to a rotation gate consisting of three single-qubit gates. The unitary unit composed of qubits can realize any unitary operation on a single qubit. Then, adjacent qubits are connected in sequence through CNOT gates to form a circuit block configuration to enhance the cyclic interaction between qubits. Finally, another unitary unit is applied to each qubit to complete the single-layer design.
[0065] To ensure operability, the number of layers is limited to ,in is the number of quantum bits, so that the circuit depth grows logarithmically with the system scale, avoiding exponential complexity.
[0066] The implementation of the simulated quantum circuit 1 can be expressed in mathematical language as follows: The simulated quantum circuit 1 is represented as a unitary transformation ,in represents the adjustable parameters of the parameterized quantum circuit, the goal is to achieve To achieve this goal, the simulated quantum circuit 1 is optimized To maximize the output state With fixed quantum state The similarity between . The similarity is quantified by the fidelity metric, such as:
[0067] Formula (9)
[0068] in, represents the fidelity value, represents the input quantum state, Indicates the output state, express The conjugate transpose of Represents the adjustable parameters of the parameterized quantum circuit. By transforming the fidelity, the loss function for training the approximate quantum amplitude coding model based on the parameterized quantum circuit can be obtained, such as:
[0069] Formula (10)
[0070] By optimizing the loss function, the best set of adjustable parameters can be obtained .
[0071] The implementation of quantum circuit 2 is based on the optimized unitary operator obtained from the simulation of quantum circuit 1. Specifically, the circuit applies the conjugate transpose transform , the initial state Encoded as Approximate representation of . This process can be formalized as:
[0072] Formula (11)
[0073] in, is an approximate representation of amplitude coding, for Conjugate transpose transformation, is the optimal set of adjustable parameters, is a fixed quantum state.
[0074] In this way, an approximate representation of amplitude-coded quantum states is achieved, which not only retains the compactness of amplitude coding, but also significantly reduces the circuit depth and quantum gate complexity of the quantum state preparation circuit, and improves its feasibility in noisy medium-scale quantum devices.
[0075] In order to verify the performance of the approximate quantum amplitude coding model based on parameterized quantum circuits in the present invention, it is evaluated on two datasets, MNIST and Fashion-MNIST, with a focus on data preprocessing and performance analysis.
[0076] A. Data Preprocessing
[0077] Both the MNIST and Fashion-MNIST datasets contain 60,000 images, each of which is 28×28 pixels in size and is divided into 10 categories. 100 images of each category are randomly selected from each dataset, for a total of 1,000 images. Each image is resized to 8×8 pixels and flattened into a 64-dimensional vector.
[0078] B. Performance Analysis
[0079] The performance of the proposed approximate quantum amplitude coding model based on parameterized quantum circuits is evaluated using the following metrics: fidelity, training loss, and visual comparison between the original and approximated images.
[0080] 1) Fidelity analysis
[0081] The fidelity of the approximate quantum amplitude coding model based on the parameterized quantum circuit is evaluated by measuring the similarity between the amplitude-encoded quantum state of each input sample and the quantum state obtained by implementing the quantum circuit. For each dataset, the fidelity values are averaged within each class and across all classes.
[0082] For all categories of both datasets, the fidelity values remain high. In addition, the "pants" category in the Fashion-MNIST dataset and the digit "1" category in the MNIST dataset have the highest average fidelity, mainly because the shapes of these images are relatively simple. It is worth noting that for The approximate quantum amplitude coding model based on parameterized quantum circuits with qubits requires at most quantum gates, where Corresponding to the number of single-qubit gates in each layer, Corresponding to the number of CNOT gates in each layer, is the number of layers. The maximum depth of a quantum circuit is These complexities are significantly lower than those described in existing methods. Complexity.
[0083] In summary, the approximate quantum amplitude coding model based on parameterized quantum circuits can efficiently approximate the encoding of quantum states with shallow circuit depth and reduced number of quantum gates, and exhibits good robustness on different data sets, making it suitable for processing multiple types of data.
[0084] 2) Training loss analysis
[0085] Figure 4 shows the variation of training loss for randomly selected samples from the MNIST dataset. Figure 5 The training loss changes of randomly selected samples from the Fashion-MNIST dataset are shown. It can be observed that the approximate quantum amplitude coding model based on parameterized quantum circuits exhibits fast convergence characteristics, with the loss decreasing rapidly at the beginning of training and then gradually stabilizing. This shows that the model can maintain the stability of the training process while adapting to the input data.
[0086] 3) Visual comparison of original image and approximated image
[0087] Figure 6 The comparison between the original image and the approximate image generated by the approximate quantum amplitude coding model based on parameterized quantum circuits is shown for samples selected from the MNIST dataset. The high visual similarity between the two shows that the model is able to efficiently encode and preserve the key information of the data.
[0088] The approximate quantum amplitude coding model based on parameterized quantum circuits provided by the present invention uses parameterized quantum circuits with shallow circuit depth and a small number of sub-gates to efficiently encode quantum states. The model is constructed through two quantum circuits: the simulation quantum circuit is trained to map the quantum state of precise amplitude coding to a fixed quantum state; after the training is completed, the optimized transformation is reversed in the implementation circuit to generate an approximate quantum state. The simulation results based on public data sets show that the model has high-fidelity coding, efficient learning ability and good robustness.
[0089] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative labor.
[0090] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.
[0091] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. An approximate quantum amplitude coding model based on parameterized quantum circuits, characterized in that: Including simulating quantum circuits and realizing quantum circuits; The simulated quantum circuit is composed of multiple layers, the number of which is limited by the number of quantum bits, and the simulated quantum circuit is represented by a unitary transformation, and the implementation quantum circuit is constructed based on the optimized unitary operator obtained in the simulated quantum circuit; Each layer in the simulated quantum circuit combines unitary units and CNOT gates; in each layer in the simulated quantum circuit, each qubit is applied with a unitary unit consisting of three single-qubit rotation gates; adjacent qubits are sequentially connected through CNOT gates to form a circuit block configuration; and another unitary unit is applied to each qubit to complete the single-layer construction; The number of layers of the simulated quantum circuit is determined by: ; in, represents the number of layers of the simulated quantum circuit, represents the number of quantum bits; The analog quantum circuit is used to convert the pre-calculated amplitude-coded quantum state into a fixed quantum state with maximum fidelity; The implemented quantum circuit is used to encode the fixed quantum state into an approximate representation of the amplitude-encoded quantum state through a conjugate transposition transformation of an optimized analog quantum circuit.
2. The approximate quantum amplitude coding model based on parameterized quantum circuit according to claim 1, characterized in that: The simulated quantum circuit maximizes the similarity between the output state and the fixed state by optimizing the adjustable parameters in the parameterized quantum circuit.
3. The approximate quantum amplitude coding model based on parameterized quantum circuit according to claim 2 is characterized in that: The similarity is determined by fidelity, as follows: ; in, represents the fidelity value, represents the input quantum state, Indicates the output state, express The conjugate transpose of represents the adjustable parameters of the parameterized quantum circuit. By transforming the fidelity, the loss function for training the approximate quantum amplitude coding model based on the parameterized quantum circuit can be obtained as follows: ; By optimizing the loss function, the optimal set of adjustable parameters is obtained. .
4. The approximate quantum amplitude coding model based on parameterized quantum circuit according to claim 3 is characterized in that: The implemented quantum circuit is used to encode the fixed quantum state into an approximate representation of the amplitude-encoded quantum state through the conjugate transposition transformation of the optimized simulated quantum circuit, as follows: ; in, is an approximate representation of amplitude coding, for Conjugate transpose transformation, is the optimal set of adjustable parameters, is a fixed quantum state.
5. The approximate quantum amplitude coding model based on parameterized quantum circuit according to any one of claims 1 to 4, characterized in that: The pre-calculated amplitude-encoded quantum state is obtained by: ; in, represents an amplitude-encoded quantum state; Represents the number of quantum bits, used to represent dimensional input vector = ; make sure is a valid quantum state, Represents a real vector The elements.
6. The approximate quantum amplitude coding model based on parameterized quantum circuit according to claim 5, characterized in that: Also includes: If the dimension of the input vector is not a power of 2, it is expanded to dimension.
7. The approximate quantum amplitude coding model based on parameterized quantum circuit according to claim 5, characterized in that: The amplitude coding encodes data into the probability amplitude of the quantum state, so that a The quantum bit system can store value.
Citation Information
Patent Citations
Quantum state information dimension reduction coding method and device
CN110705711A
Mode matching method based on quantum circuit
CN116702914A