A method for preparing a multi-quantum state
By constructing a multi-layered tunable variable quantum circuit and combining classical optimizers with quantum-classical resource co-optimization, the problem of low quantum state preparation efficiency in NISQ devices is solved, achieving efficient and accurate multi-state preparation, which is suitable for quantum state embedding representation of high-dimensional data.
Patent Information
- Application Number
- CN202511565050.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-10-30
- Publication Date
- 2026-03-20
- Estimated Expiration
- 2045-10-30
AI Technical Summary
Existing NISQ devices are limited by the number of qubits, severe noise interference, and excessive circuit depth and gate count, resulting in low efficiency and low accuracy in quantum state preparation, making it difficult to effectively approximate the preparation of arbitrary target quantum states.
A multi-layered tunable variational quantum circuit (VQC) is constructed. Through a linear preprocessing layer, an input feature encoding module, a parameter layer, and an output measurement module, combined with a classical optimizer, the target quantum state is learned and approximately prepared. The Adam optimizer is used to update the circuit parameters, thereby achieving synergistic optimization of quantum and classical resources.
It improves the efficiency and accuracy of quantum state preparation, enhances resource utilization, is suitable for quantum state embedding representation tasks with high-dimensional input data vectors, breaks through the circuit depth and width limitations of traditional methods, and achieves high fidelity and hardware compatibility in multistate preparation.
Smart Images

Figure CN121031809B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of quantum state preparation, and particularly relates to a multi-quantum state preparation method. BACKGROUND
[0002] Quantum computing is a new computing paradigm based on the principles of quantum mechanics, which is fundamentally different from traditional classical computing systems in basic units, running mechanisms and computing potential. Traditional computing uses classical bits as information carriers, and each bit is in a definite 0 or 1 state; while quantum computing uses quantum bits as basic units, and uses their unique physical properties such as superposition and entanglement for computation. Since quantum bits can be in a superposition of multiple states, a system containing n quantum bits can represent 2n classical states simultaneously, thus exhibiting natural parallel computing ability. This exponential growth of state space makes quantum computing have potential computing advantages over traditional computers in certain specific problems, such as combinatorial optimization, quantum simulation, etc., and provides a new problem-solving paradigm for many disciplines such as high-energy physics, quantum chemistry, materials science, artificial intelligence, cryptography and cosmology.
[0003] Although current research is committed to building fault-tolerant quantum computers with a scale of up to millions of quantum bits, early experimental results show that it is much more challenging to actually build and control quantum bits than theoretically expected. Preliminary prototype devices have exposed serious environmental noise problems, which make accurate simulation of large-scale quantum systems a difficult problem under current computing power. Under this background, quantum simulators, as a simulation platform running on classical hardware, have become an important tool for researching quantum algorithms and verifying quantum computing architecture. Researchers can use quantum simulators to model and simulate the evolution process of a specific quantum system to explore the evolution mechanism of quantum states and the performance of quantum algorithms.
[0004] At the mathematical level, the quantum state of a qubit is formally described as a unit complex vector in a Hilbert space, which is the basic object used to represent the state of a system in quantum mechanics. Quantum state preparation, as a key initial step in quantum computing process, aims to transform the quantum system from the default ground state to the desired target state. Since the exact preparation of an arbitrary target state often faces the challenge of circuit depth and operation complexity, researchers have proposed a quantum state approximation strategy, i.e. constructing a quantum state as close as possible to the target state through an approximation algorithm. The current widely studied NISQ (Noisy Intermediate-Scale Quantum) devices are limited by factors such as limited number of bits, low gate fidelity, short coherence time, and insufficient connectivity, making the development of efficient and low-depth state preparation methods one of the key issues in the implementation of quantum algorithm research. SUMMARY
[0005] The purpose of the present application is to provide a multi-quantum state preparation method, which learns and approximates to prepare an arbitrary target quantum state by constructing a quantum neural network structure with expression ability.
[0006] To achieve the above-mentioned purpose, the present application provides the following scheme:
[0007] A multi-quantum state preparation method, comprising:
[0008] S1, randomly initializing an Ansatz circuit parameter;
[0009] S2, inputting an initial quantum state into a variational quantum circuit under the current circuit parameter configuration to obtain a corresponding output state density matrix;
[0010] S3, calculating a loss value between the output state density matrix and a target state according to the output state density matrix, and feeding back the loss value to a classical optimizer to update the Ansatz circuit parameter, returning to S2 until a preset condition is reached to obtain a trained variational quantum circuit;
[0011] S4, using the trained variational quantum circuit to realize the preparation of multiple groups of target quantum states.
[0012] Optionally, the variational quantum circuit comprises a linear preprocessing layer, an input feature encoding module, a parameter layer, and an output measurement module.
[0013] The linear preprocessing layer is configured to perform linear transformation on the initial quantum state.
[0014] The input feature encoding module is configured to map the initial quantum state after linear transformation to a rotation angle, and apply the rotation angle to a rotation gate of a plurality of qubits to obtain quantum encoding.
[0015] The parameter layer is used to introduce multi-bit correlation to the quantum encoding, and obtain a globally entangled quantum state;
[0016] The output measurement module is used to transform the globally entangled quantum state, and output a corresponding output state density matrix.
[0017] Optionally, the loss value between the target state and the quantum state includes:
[0018] ;
[0019] wherein, ρ is a density matrix, is a target state, is a fidelity loss function between the output state density matrix and the target state, is 1, indicating that the density matrix and the target state are completely the same, is 0, indicating that the density matrix and the target state are completely orthogonal.
[0020] Optionally, updating the Ansatz circuit parameter includes: using an Adam optimizer to update the Ansatz circuit parameter.
[0021] Optionally, the scale of the circuit parameter is: |θ|=C×L×W×3.
[0022] Wherein, θ is a circuit parameter, C represents a number of mixed layers, L represents a number of parameter blocks per layer, and W represents a circuit width.
[0023] The present application has the beneficial effects that: the present application proposes a multi-quantum state preparation method, aiming to solve the technical bottlenecks of the current quantum state preparation process, such as the limited number of quantum bits of NISQ equipment, serious noise interference, excessive circuit depth and gate number, and improve the efficiency, accuracy and resource utilization rate of quantum state preparation. The core of the technical scheme is to construct a hardware-friendly, multi-layer adjustable variational quantum circuit (VQC) for approximately preparing multiple target quantum states, which is especially suitable for high-dimensional input data vector embedding representation tasks in quantum state space. BRIEF DESCRIPTION OF DRAWINGS
[0024] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the drawings needed in the embodiments will be briefly introduced below. Obviously, the drawings in the following description are only some embodiments of the present application, and for those skilled in the art, other drawings can also be obtained without creative labor on the basis of these drawings.
[0025] Figure 1 is a model training flowchart of the embodiments of the present application;
[0026] Figure 2 A comparison chart of the method for preparing multi-quantum states of the embodiment of the present application and the traditional FF-QRAM preparation method;
[0027] Figure 3 A quantum state preparation fidelity heat map of the embodiment of the present application;
[0028] Figure 4 A model size and compression rate schematic diagram of the embodiment of the present application;
[0029] Figure 5 A model structure diagram of the embodiment of the present application;
[0030] Figure 6 A model reconstructed image evaluation score schematic diagram of the embodiment of the present application;
[0031] Figure 7 A real color image and a model reconstructed image of the embodiment of the present application. DETAILED DESCRIPTION
[0032] The technical solutions in the embodiments of the present application will be described clearly and completely below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative labor fall within the scope of protection of the present application.
[0033] In order to make the above-mentioned purposes, features and advantages of the present application more obvious and easy to understand, the present application will be further described in detail below with reference to the drawings and specific embodiments.
[0034] In recent years, Quantum Neural Networks (QNN) as a model system that combines quantum computing and artificial neural network concepts has increasingly become an important research direction in the field of quantum machine learning. The core idea is to construct flexible Variational Quantum Circuits (VQC) to approximately realize the preparation of target quantum states or function mapping by taking advantage of the training mechanism and structural advantages of neural networks. Although there are significant differences in mathematical structure between variational quantum circuits and traditional neural networks, they have high similarity in modular construction, parameter training and optimization objectives.
[0035] The embodiment provides a multi-quantum state preparation method, comprising:
[0036] S1, randomly initializing an Ansatz circuit parameter;
[0037] S2, input the initial quantum state into the variational quantum circuit under the current circuit parameter configuration, and obtain the corresponding output state density matrix;
[0038] S3, calculate the loss value between the output state density matrix and the target state according to the output state density matrix, and feed the loss value back to the classical optimizer to update the Ansatz circuit parameters, return to S2 until the preset condition is reached, and obtain the trained variational quantum circuit;
[0039] S4, use the trained variational quantum circuit to realize the preparation of multiple groups of target quantum states.
[0040] Specifically, by inputting parameters such as coordinates or parameterized angles of quantum bits, the network outputs the corresponding quantum state through quantum circuit evolution. This way does not directly store or explicitly write the entire quantum state, but encodes and generates the target state “implicitly” through the neural network structure. And the proposed multi-layer spectral structure (i.e. a hybrid layer stacked by linear layer + encoding layer + parameter layer) + multi-layer quantum circuit constitutes the core of the implicit neural network. The multi-layer spectral structure plays a parameterized control role, which is equivalent to the activation function or weight mapping in the classical neural network, while the quantum circuit is responsible for generating the corresponding quantum state. The quantum state / function is implicitly stored and expressed, avoiding explicit representation of complex states, thereby realizing efficient quantum state approximation and generation.
[0041] The multi-level hybrid structure of “linear preprocessing layer + encoding layer + parameter layer” is adopted in the embodiment, which evolves the initial quantum state by applying quantum gates to generate a density matrix ρ as an output state, and the goal is to minimize the fidelity loss function between ρ and the target state . The multi-level hybrid structure of “linear preprocessing layer + encoding layer + parameter layer” in the embodiment is essentially a variational quantum circuit. The linear layer is responsible for feature transformation, the encoding layer maps the classical input S(D(K,T)) to a quantum state, and the parameter layer adjusts through the parameterized Ansatz circuit, thereby realizing the approximation of the target quantum state. represents the quantum state generated by the encoding layer and the parameterized circuit, which corresponds to the quantum representation of the sample D(K,T). D(K,T) represents a classical dataset containing K samples, each sample having T features. In order to enable the designed variational quantum circuit (Ansatz) to effectively approximate the target quantum state prepared by the FF-QRAM (Flip-Flop Quantum Random Access Memory) circuit traditionally used to embed classical data into quantum states, the embodiment adopts a typical quantum-classical alternating optimization process for model training. The target The core objective of training is to gradually adjust the circuit parameters by minimizing the fidelity loss function between the output state and the target state, so that the output quantum state is as close as possible to the established reference state.
[0042] The entire training process is based on a cycle of quantum-classical alternating optimization: quantum circuit generates quantum state → calculate fidelity loss → classical optimizer updates parameters θ, and the training end conditions mainly have two: 1, reach the maximum iteration number: the upper limit set in this embodiment is 300 steps of iteration, which can basically cover the convergence requirements of most tasks. 2, loss function converges: that is, when the fidelity loss function is very small and tends to be stable, it can also be considered as the end of training. As shown in Figure 1 , first, the circuit parameters θ are randomly initialized, and then in each iteration, the variational quantum circuit under the current parameter configuration is executed to obtain the corresponding output state density matrix. Based on the measured density matrix, the loss value between the loss function and the target state is calculated, and the loss is fed back to the classical optimizer to update the circuit parameters to further improve the fidelity. The quantum circuit is responsible for completing the state evolution and measurement, and the classical optimizer is responsible for searching the optimal parameter space, so as to realize the collaborative optimization of quantum-classical resources. In the training implementation, in order to balance the optimization efficiency and hardware compatibility, the Adam optimizer is mainly used for parameter update. This optimizer can still maintain strong robustness without gradient information, and is especially suitable for quantum circuit training in a noisy environment.
[0043] Further, the variational quantum circuit includes: a linear preprocessing layer, an input feature encoding module, a parameter layer, and an output measurement module.
[0044] The linear preprocessing layer is configured to perform linear transformation on an initial quantum state.
[0045] The input feature encoding module is configured to map the initial quantum state after linear transformation to a rotation angle, apply the rotation angle to a rotation gate of a plurality of quantum bits, and obtain quantum encoding.
[0046] The parameter layer is configured to introduce multi-bit correlation to the quantum encoding, and obtain a globally entangled quantum state.
[0047] The output measurement module is configured to transform the globally entangled quantum state to output a corresponding output state density matrix.
[0048] Specifically, as shown in Figure 5 , the model mainly includes the following parts:
[0049] The linear preprocessing layer is a trainable classical computing module, which is equivalent to the preprocessing part of the data. It realizes the purposes of data dimension reduction, feature optimization and training stability improvement by linearly transforming the input data.
[0050] The input feature encoding module (RZ) maps the classical input vector to a rotation angle after linear transformation and dimensionality increase, and applies it to the rotation gate RZ of multiple qubits to realize quantum encoding of features.
[0051] The parameter layer introduces multi-bit correlation on the basis of single-bit rotation to improve the expression ability of the circuit. The output is a globally entangled quantum state, which contains the nonlinear relationship between the input features, serving as the input for the next parameterized optimization.
[0052] The output measurement module acts on the final quantum state after passing through all the parameterized quantum circuits (encoding + parameterization + entanglement) to measure it. The measurement process will cause the quantum state to collapse into a classical probability distribution, converting the quantum information of the quantum state into a classical signal that can be used for training feedback. After multiple layers of spectral structure evolution, the quantum circuit finally outputs the density matrix of the quantum bit, which is used to fit the target quantum state. The "spectral structure" is a hybrid layer including linear layer, encoding layer and parameter layer for multi-layer superposition.
[0053] Circuit parameter scale: | θ | = C × L × W × 3.
[0054] Where C represents the number of mixed layers (equivalent to the number of spectral layers), L represents the number of parameter blocks per layer (parameterized rotation + entanglement), and W represents the circuit width (number of quantum bits). The parameter scale is also an important indicator for evaluating quantum neural networks, representing resource consumption, and fewer parameters save more resources.
[0055] The model of the embodiment adopts a hierarchical design of linear preprocessing layer + encoding layer + parameter layer, while traditional quantum neural networks (such as QCL, QNN) mostly use parameterized circuits directly and do not necessarily contain a special linear preprocessing layer. The embodiment emphasizes the flexibility of adapting to different input distributions, and improves the approximation ability of the quantum circuit by changing the input feature distribution in the preprocessing stage, which is an extension of the existing QNN architecture. Traditional quantum neural networks are mainly used for classification, regression or discrimination tasks, and are designed for specific tasks without updating the parameters of the quantum circuit through learning. The model of the embodiment is more universal.
[0056] Further, the loss value between the calculation and the target state includes:
[0057] ;
[0058] Where ρ is the density matrix, is the target state, Fidelity loss function between output density matrix and target state, 1 means the density matrix and the target state are exactly the same, 0 means the density matrix and the target state are exactly orthogonal.
[0059] The embodiment proposes a "implicit" neural network architecture for approximating multiple quantum states, as shown in Figure 2 As shown, the method breaks through the limitation of "one state at a time" in the traditional FF-QRAM preparation method, realizes compression of circuit depth and width, improves fidelity under the same quantum resource, and adapts to multi-state preparation. The method uses normalized and linear dimension reduction to process high-dimensional classical data, solves the scalability problem of traditional methods in processing image tasks, can be embedded in image quantum representation tasks, uses SSIM (Structural Similarity Index) structural similarity index, image similarity measurement standard, and PSNR (Peak Signal-to-Noise Ratio) peak signal-to-noise ratio, image reconstruction quality index to verify the image reconstruction ability of the model, and has practical application and promotion value. Without changing the basic principles of quantum mechanics, the method realizes the multiple balance of "compression-precision-robustness" in state preparation tasks.
[0060] To verify the performance of the method in the quantum state approximation task, a series of experiments based on state vector simulators are introduced to investigate the average fidelity performance under different model sizes (input dimension M, hidden bit number N, mixed layer number C, and circuit width W). The experimental results are shown in Figure 3 The lighter the color, the higher the fidelity of the prepared quantum state and the target state.
[0061] When the model is set to a small size (such as M=4, N=1, W=2), only one layer of spectral structure can achieve an average fidelity of 100%. Even in a medium complexity (such as M=8, N=4, W=3), the method can stably achieve a fidelity greater than 99% at C=2 or C=3 layers. In some large-scale scenarios (such as M=16, N=1 or N=2), only 1-2 layers are needed to achieve a fidelity of more than 96%. From Figure 3 It can be clearly observed that as the number of layers C increases, the model fidelity significantly increases, indicating that the spectral layer structure designed in the embodiment has a significant technical advantage in improving preparation accuracy.
[0062] The experiment verifies the reliability of the model on a more abundant data set and increases the number of quantum bits.
[0063] From Figure 4A clear trend can be observed from the results: as the dataset size increases, the compression capability of the model on FF-QRAM circuits is further enhanced. This trend can be attributed to the reliance of the FF-QRAM method on a large number of controlled RY rotation gates, which are jointly controlled by multiple control qubits. Since the number of control qubits typically grows proportionally with the dataset size (M x N), the circuit depth and width of the FF-QRAM circuit also linearly increase when it is translated into native quantum gates.
[0064] To further verify the expressive power of the spectral-layer quantum neural network-based model proposed in this embodiment in general function fitting and real-world application scenarios, the model is extended to image representation tasks, and attempts are made to use the quantum structure to achieve implicit reconstruction of low-resolution color images.
[0065] In this task, a two-dimensional image is modeled as a function mapping problem from image coordinates to RGB values, i.e., (x, y)→(R, G, B);
[0066] The two-dimensional coordinates are mapped to a three-dimensional color space. For the input, , represents the normalized image coordinates; for the output, , can represent the normalized color values (originally 0-255, usually divided by 255 for normalization).
[0067] Each input is a two-dimensional pixel coordinate (x, y), and the corresponding output is an RGB value of three channels. In the experiment, two typical test images, "coffee" and "astronaut", are selected and down-sampled to 32x32 resolution, resulting in 1024 two-dimensional coordinate points and corresponding RGB channel values. The RGB values are normalized to the interval [0, 1] to serve as the target output for quantum neural network training.
[0068] During the training process, the model receives normalized coordinates as input and generates three-channel output as color values of the reconstructed image through the spectral structure-driven quantum neural network.
[0069] To comprehensively evaluate the performance of the model in the image reconstruction task, two classical image quality evaluation indicators are used in the experiment:
[0070] Peak signal-to-noise ratio (PSNR): measures pixel-level accuracy;
[0071] Structural similarity index (SSIM): measures image structure and perceptual consistency.
[0072] As Figure 6As shown, the model achieves PSNR = 30.7601, SSIM = 0.9998 on the "coffee cup" image and reaches PSNR = 27.408, SSIM = 0.9998 on the "astronaut" image, indicating that the proposed model can achieve high-quality reconstruction even in the case of limited pixel quantity and controlled parameter quantity (much smaller than traditional neural networks).
[0073] In addition, as Figure 7 From the subjective perception of the reconstructed image, the model can maintain good consistency in the image edge structure and color transition area, and the overall perceived quality of the image is high, further verifying the strong expressiveness and practical feasibility of the model in the general regression task.
[0074] The embodiment focuses on the most basic and key problem in quantum computing - quantum state preparation, aiming to learn and approximate the preparation of any target quantum state by constructing a quantum neural network structure with expression ability. The experimental part is based on the quantum simulator platform to verify the effectiveness and feasibility of the proposed network structure in the quantum state preparation task, and further explore the potential ability of quantum neural network in representation learning. The embodiment also tries to expand the application range of quantum neural network, through the approximate generation experiment of color image, verifies the preliminary feasibility of the method in the field of image representation and generation, and provides theoretical reference and technical support for the practical application of quantum computing in high-dimensional data modeling field.
[0075] The above-described embodiments are only descriptions of the preferred modes of the present application and do not limit the scope of the present application. Without departing from the design spirit of the present application, various modifications and improvements to the technical solutions of the present application made by those skilled in the art shall fall within the protection scope determined by the claims of the present application.
Claims
1. A method for preparing multiple quantum states, characterized in that, include: S1. Randomly initialize the Ansatz circuit parameters; S2. Input the initial quantum state into the variable quantum circuit under the current circuit parameter configuration, and obtain the corresponding output state density matrix; S3. Calculate the loss value between the output state density matrix and the target state, and feed the loss value back to the classical optimizer to update the Ansatz circuit parameters. Return to S2 until the preset condition is reached to obtain the trained variable quantum circuit. S4. Using the trained variable quantum circuit, prepare multiple sets of target quantum states; The variable quantum circuit includes: a linear preprocessing layer, an input feature encoding module, a parameter layer, and an output measurement module; The linear preprocessing layer is used to perform a linear transformation on the initial quantum state; The input feature encoding module is used to map the initial quantum state after linear transformation and dimensionality increase into a rotation angle, and apply the rotation angle to a rotation gate of several qubits to obtain quantum encoding; The parameter layer is used to introduce multi-bit correlations into the quantum encoding to obtain a globally entangled quantum state; The output measurement module is used to transform the globally entangled quantum state and output the corresponding output state density matrix.
2. The method for preparing multiple quantum states according to claim 1, characterized in that, The calculation of the loss value between the target state and the target state includes: ; Where ρ is the density matrix. For the target state, Let be the fidelity loss function between the output density of states matrix and the target state. A value of 1 indicates that the density matrix is exactly the same as the target state. A value of 0 indicates that the density matrix and the target state are completely orthogonal.
3. The method for preparing multiple quantum states according to claim 1, characterized in that, Updating the Ansatz circuit parameters includes updating the Ansatz circuit parameters using the Adam optimizer.
4. The method for preparing multiple quantum states according to claim 1, characterized in that, The scale of the circuit parameters is: |θ|=C×L×W×3; Where θ represents the circuit parameters, C represents the number of hybrid layers, L represents the number of parameter blocks per layer, and W represents the circuit width.