Geometric optimization method and device of quantum neural network, storage medium and electronic equipment
By constructing quantum data manifolds and geodesic paths to optimize quantum neural network parameters, the instability and convergence difficulties caused by neglecting the geometric structure of quantum states in existing methods are solved, and a stable and efficient training process is achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- GUANGXI XINBAITE MICROELECTRONICS CO LTD
- Filing Date
- 2026-03-18
- Publication Date
- 2026-06-19
Smart Images

Figure CN122242809A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of quantum neural network technology, specifically to a method, apparatus, storage medium, and electronic device for geometric optimization of a quantum neural network. Background Technology
[0002] Quantum Neural Networks (QNNs), as a cutting-edge direction in quantum machine learning, have shown great application potential in recent years in areas such as quantum chemical simulation, quantum control systems, and quantum error correction. However, existing training methods for quantum neural networks are mostly directly adapted from classical deep learning algorithms, employing gradient descent based on Euclidean geometry or its variants for parameter optimization. These methods completely ignore the inherent non-Euclidean geometry of the quantum state space, leading to severe instability, the Barren Plateau phenomenon, and convergence difficulties during training. The Barren Plateau problem, in particular, causes the gradient of the loss function to vanish exponentially with the number of qubits, making large-scale quantum neural networks almost impossible to train effectively.
[0003] To address the aforementioned issues, several improvement schemes have been proposed, such as introducing gradient clipping, adaptive learning rate adjustment, or approximation methods based on classical manifold optimization. However, none of these schemes fundamentally resolve the mismatch between quantum state geometry and optimization methods. Summary of the Invention
[0004] This application provides a method, apparatus, storage medium, and electronic device for geometric optimization of quantum neural networks, which can fundamentally solve the mismatch problem between quantum state geometry and optimization methods.
[0005] In a first aspect, embodiments of this application provide a geometric optimization method for a quantum neural network, comprising: Obtain the parameters of the quantum training dataset and the quantum neural network; Based on the quantum training dataset, a quantum data manifold representing the geometric structure of quantum states is constructed, with the Fisher information matrix as the Riemannian metric. Obtain the geodesic equations on the quantum data manifold to determine the geodesic path for parameter updates; The parameters are updated using Riemann exponent mapping along the geodesic path, and the updated parameters are geometrically convergent to determine whether the convergence condition is met. If the condition is not met, the process returns to the step of calculating the natural gradient of the loss function on the quantum data manifold based on the geometry of the quantum data manifold, until the convergence condition is met; if it is met, the optimized quantum neural network is output.
[0006] In the geometric optimization method for quantum neural networks provided in this application embodiment, obtaining the geodesic equation on the quantum data manifold to determine the geodesic path for parameter updates includes: Calculate the natural gradient of the loss function on the quantum data manifold based on the geometry of the quantum data manifold; Based on the natural gradient, the geodesic equations on the quantum data manifold are solved to determine the geodesic path for parameter updates.
[0007] In the geometric optimization method for quantum neural networks provided in this application embodiment, the step of calculating the natural gradient of the loss function on the quantum data manifold based on the geometric structure of the quantum data manifold includes: Obtain the Fisher information matrix at the current parameter point; Calculate the Euclidean gradient of the loss function at the current parameter point; Multiply the inverse of the quantum Fisher information matrix at the current parameter point by the Euclidean gradient to obtain the natural gradient of the loss function on the quantum data manifold.
[0008] In the geometric optimization method for quantum neural networks provided in this application embodiment, the step of solving the geodesic equation on the quantum data manifold based on the natural gradient to determine the geodesic path for parameter updates includes: The initial direction of parameter update at the current parameter point is determined based on the natural gradient. Based on the Levi-Civita connection of the quantum data manifold, the geodesic equation is solved such that the covariant derivative of the tangent vector of the parameter trajectory along its own direction is zero, thereby obtaining the geodesic path extending from the current parameter point along the initial direction.
[0009] In the geometric optimization method for quantum neural networks provided in this application embodiment, the step of constructing a quantum data manifold representing the geometric structure of quantum states based on the quantum training dataset, wherein the quantum data manifold uses the Fisher information matrix as a Riemannian metric, includes: Quantum state tomography is performed on the quantum training dataset to reconstruct the density matrix of each quantum state and obtain an empirical distribution model of the quantum states; Based on the aforementioned empirical distribution model, the Fubini-Study metric tensor is calculated; The Fisher information matrix is constructed using the Fubini-Study metric tensor and serves as the Riemann metric of the quantum data manifold; The quantum states in the quantum training dataset are embedded into a low-dimensional manifold quantized by the Fisher information matrix to obtain a quantum data manifold characterizing the geometric structure of the quantum states.
[0010] In the geometric optimization method for quantum neural networks provided in this application embodiment, updating the parameters along the geodesic path using a Riemann exponent map includes: At the current parameter point, the initial update vector in the tangent space is determined according to the natural gradient direction of the loss function on the quantum data manifold; The initial update vector is multiplied by the preset learning rate to obtain the target update vector; The target update vector is mapped back onto the quantum data manifold using the Riemann index mapping to obtain the new parameter point after moving along the geodesic path.
[0011] In the geometric optimization method for quantum neural networks provided in this application embodiment, the parameters of the quantum neural network include at least one of the following: rotation angle parameters in the variable quantum circuit, entanglement parameters between qubits, basis vector setting parameters for adaptive measurement, and feature mapping parameters in the data encoding circuit.
[0012] Secondly, embodiments of this application provide a geometry optimization device for a quantum neural network, comprising: The acquisition unit is used to acquire the parameters of the quantum training dataset and the quantum neural network. A construction unit is used to construct a quantum data manifold representing the geometric structure of quantum states based on the quantum training dataset, wherein the quantum data manifold uses the Fisher information matrix as a Riemannian metric. A determining unit is used to obtain the geodesic equation on the quantum data manifold in order to determine the geodesic path for parameter updates; The update unit is used to update the parameters along the geodesic path using the Riemann exponent mapping, and to perform geometric convergence verification on the updated parameters to determine whether the convergence condition is met. If not, it returns to the step of calculating the natural gradient of the loss function on the quantum data manifold based on the geometric structure of the quantum data manifold, until the convergence condition is met. If the convergence condition is met, the optimized quantum neural network is output.
[0013] Thirdly, this application provides a storage medium storing a plurality of instructions adapted for loading by a processor to execute the geometric optimization method of the quantum neural network described in any of the preceding claims.
[0014] Fourthly, this application provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the geometric optimization method of the quantum neural network described in any of the preceding claims.
[0015] In summary, the geometric optimization method for a quantum neural network provided in this application includes: acquiring a quantum training dataset and parameters of the quantum neural network; constructing a quantum data manifold representing the geometric structure of quantum states based on the quantum training dataset, wherein the quantum data manifold uses the Fisher information matrix as a Riemannian metric; acquiring the geodesic equation on the quantum data manifold to determine the geodesic path for parameter updates; updating the parameters along the geodesic path using a Riemannian exponent mapping, and performing geometric convergence verification on the updated parameters to determine whether the convergence condition is met; if not, returning to the step of calculating the natural gradient of the loss function on the quantum data manifold based on the geometric structure of the quantum data manifold, until the convergence condition is met; if met, outputting the optimized quantum neural network. This application's embodiments construct a quantum data manifold with the Fisher information matrix as the Riemannian metric, realistically reflecting the intrinsic geometric structure of the quantum state space. By acquiring and updating parameters along geodesic paths, it ensures that the parameter optimization process strictly follows the shortest geometric path of the quantum state manifold. By using Riemann exponent mapping to update parameters, the update vector in the tangent space is precisely mapped back to the manifold, avoiding the problem of traditional Euclidean update methods deviating from the manifold's geometric structure. Through iterative optimization based on natural gradients, the parameter update direction always points to the steepest descent direction of the loss function on the manifold, fundamentally avoiding the barren plateau phenomenon. Through a geometric convergence verification mechanism, it provides provable convergence guarantees from multiple dimensions such as geometric convexity, convergence rate, critical point structure, and theoretical performance lower bounds, thereby fundamentally solving the mismatch problem between the quantum state geometry and the optimization method. Attached Figure Description
[0016] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0017] Figure 1 This is a schematic diagram illustrating an application scenario of the geometric optimization method for quantum neural networks provided in this application embodiment.
[0018] Figure 2 This is a flowchart illustrating the geometric optimization method for quantum neural networks provided in this application embodiment.
[0019] Figure 3 This is a schematic diagram of the structure of the geometric optimization device for the quantum neural network provided in the embodiments of this application.
[0020] Figure 4 This is a schematic diagram of the structure of the electronic device provided in the embodiments of this application. Detailed Implementation
[0021] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numbers in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this application. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this application as detailed in the appended claims.
[0022] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element. Furthermore, components, features, and elements with the same names in different embodiments of this application may have the same meaning or different meanings, the specific meaning of which must be determined by its interpretation in that specific embodiment or further in conjunction with the context of that specific embodiment.
[0023] It should be understood that the specific embodiments described herein are merely illustrative of this application and are not intended to limit this application.
[0024] In the following description, the use of suffixes such as "module," "part," or "unit" to denote elements is solely for the purpose of illustrative purposes and has no specific meaning in itself. Therefore, "module," "part," or "unit" may be used interchangeably.
[0025] In the description of this application, it should be noted that the terms "upper," "lower," "left," "right," "inner," and "outer," etc., indicate the orientation or positional relationship based on the orientation or positional relationship shown in the accompanying drawings. They are used only for the convenience of describing this application and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation. Therefore, they should not be construed as limitations on this application. In addition, terms such as "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance.
[0026] Current training methods for quantum neural networks are mostly adapted directly from classical deep learning algorithms, employing Euclidean geometry-based gradient descent or its variants for parameter optimization. These methods completely ignore the inherent non-Euclidean geometry of the quantum state space, leading to severe instability, the Barren Plateau phenomenon, and convergence difficulties during training. The Barren Plateau problem, in particular, causes the gradient of the loss function to vanish exponentially with increasing qubit count, making large-scale quantum neural networks almost impossible to train effectively.
[0027] To address the aforementioned issues, several improvement schemes have been proposed, such as introducing gradient clipping, adaptive learning rate adjustment, or approximation methods based on classical manifold optimization. However, none of these schemes fundamentally resolve the mismatch between quantum state geometry and optimization methods.
[0028] Based on this, embodiments of this application provide a method, apparatus, storage medium, and electronic device for geometric optimization of a quantum neural network. Specifically, the geometric optimization apparatus for the quantum neural network can be integrated into an electronic device, which can be a server or a terminal, etc. The terminal can include mobile phones, wearable smart devices, tablets, laptops, and personal computers (PCs), etc., as well as other computer and auxiliary devices. The server can be a single server or a server cluster composed of multiple servers, and can be a physical server or a virtual server.
[0029] For example, such as Figure 1 As shown, the electronic device can acquire the parameters of the quantum training dataset and the quantum neural network; based on the quantum training dataset, it constructs a quantum data manifold representing the geometric structure of the quantum state, with the Fisher information matrix as the Riemannian metric; it acquires the geodesic equation on the quantum data manifold to determine the geodesic path for parameter updates; along the geodesic path, it updates the parameters using the Riemann exponent mapping, and performs geometric convergence verification on the updated parameters to determine whether the convergence condition is met; if not, it returns to the step of calculating the natural gradient of the loss function on the quantum data manifold based on the geometric structure of the quantum data manifold, until the convergence condition is met; if the condition is met, it outputs the optimized quantum neural network.
[0030] The technical solutions shown in this application will be described in detail below through specific embodiments. It should be noted that the order of description of the following embodiments is not intended to limit the priority of the embodiments.
[0031] Please see Figure 2 , Figure 2This is a flowchart illustrating the geometry optimization method for a quantum neural network provided in this application. The specific flow of this geometry optimization method for a quantum neural network can be as follows: 101. Obtain the quantum training dataset and the parameters of the quantum neural network.
[0032] In the embodiments of this application, the quantum training dataset can be quantum state data collected from actual quantum systems, or it can be simulated data generated by a quantum simulator. For example, in quantum chemistry applications, the quantum training dataset can contain molecular ground states obtained through quantum computing simulation; in quantum classification tasks, the quantum training dataset can contain quantum states that encode classical data, such as quantum states generated after image data is mapped by quantum features.
[0033] The parameters of a quantum neural network refer to the adjustable free parameters in the network, which may include, but are not limited to, at least one of the following: rotation angle parameters in a variable quantum circuit, entanglement parameters between qubits, basis vector setting parameters for adaptive measurement, and feature mapping parameters in a data encoding circuit. The rotation angle parameter determines the magnitude of the rotation operation applied by the quantum gate to the quantum state; the entanglement parameter controls the strength of the entanglement between qubits; the basis vector setting parameters affect the probability distribution of the measurement results; and the feature mapping parameters determine the way classical data is encoded into the quantum state space.
[0034] 102. Based on the quantum training dataset, construct a quantum data manifold that represents the geometric structure of quantum states. The quantum data manifold uses the Fisher information matrix as the Riemannian metric.
[0035] In this embodiment, the core concept is to treat the quantum states in the quantum training dataset as points on a quantum data manifold, and to use the Fisher information matrix as a Riemannian metric describing the local geometry of the manifold. Specifically, this may include the following steps: 1021. Perform quantum state tomography on the quantum training dataset to reconstruct the density matrix of each quantum state and obtain the empirical distribution model of the quantum state.
[0036] Quantum state tomography is a technique that completely reconstructs an unknown quantum state through multiple measurements. Through tomography, the density matrix of the quantum state under the computational basis can be obtained, thereby obtaining an empirical distribution model of the quantum state.
[0037] 1022. Calculate the Fubini-Study metric tensor based on the empirical distribution model.
[0038] The Fubini-Study metric tensor is a natural metric on the quantum state space (i.e., complex projective Hilbert space), which characterizes the infinitesimal distance between quantum states caused by changes in their inner product.
[0039] The formula for calculating the Fubini-Study metric tensor can be as follows:
[0040] In the above formula, θ represents the quantum state in the quantum training dataset, where θ is the parametric coordinate of the quantum state (such as the rotation angle of the quantum gate). The partial derivative of the quantum state with respect to the i-th parameter represents the direction of the quantum state's change when the parameter changes slightly. It is the inner product between two partial derivative states, reflecting the degree of overlap between state changes caused by different parameter directions. It is the inner product of the partial derivative state and the original state. This term is used to eliminate the influence of the global phase of the quantum state, because physically observable properties are independent of the global phase. Re[·] denotes taking the real part of the complex number, because the metric tensor must be real and symmetric.
[0041] 1023. Construct the Fisher information matrix using the Fubini-Study metric tensor as a Riemannian metric for quantum data manifolds.
[0042] In classical information geometry, the Fisher information matrix is used to measure the geometric structure of the probability distribution space. In the quantum context, the quantum Fisher information matrix is given by the Fubini-Study metric tensor, which reflects the sensitivity of the quantum state to parameter changes.
[0043] 1024. Embed the quantum states in the quantum training dataset into a low-dimensional manifold measured by the Fisher information matrix to obtain a quantum data manifold that characterizes the geometric structure of the quantum states.
[0044] In some embodiments, the embedding process can be implemented by manifold learning algorithms such as isometric mapping or local linear embedding, with the aim of projecting quantum states in a high-dimensional Hilbert space onto a low-dimensional manifold structure that is easy to compute and optimize while preserving the inherent geometric relationship between quantum states (i.e., Fubini-Study distance).
[0045] In a practical application, suppose the quantum training dataset contains the electronic ground states of multiple molecules at different bond lengths, obtained through quantum chemical simulations. The quantum data manifold constructed using the above method can reveal the intrinsic geometric relationship between changes in molecular geometry and the evolution of electronic states. For example, when bond lengths change continuously, the corresponding quantum states will move along a smooth curve on the manifold. The length of this curve (i.e., the geodesic distance) reflects the actual degree of difference between quantum states, providing a physically consistent geometric framework for subsequent quantum neural network training.
[0046] 103. Obtain the geodesic equations on the quantum data manifold to determine the geodesic path for parameter updates.
[0047] It should be noted that a geodesic is the shortest path between two points on a manifold. In Riemannian metric, it corresponds to a curve with zero acceleration, that is, the covariant derivative of the tangent vector of the curve along its own direction is zero.
[0048] Specifically, step 103 may include the following steps: A. Calculate the natural gradient of the loss function on the quantum data manifold based on the geometric structure of the quantum data manifold.
[0049] The natural gradient is the gradient direction relative to the Riemannian metric on the manifold, pointing towards the steepest descent direction of the loss function on the manifold. Unlike the traditional Euclidean gradient, the natural gradient takes into account the curved geometry of the parameter space, guiding the optimization process down the steepest direction of the manifold itself, thus avoiding inefficient updates caused by geometric distortion.
[0050] Specifically, based on the geometry of the quantum data manifold, the natural gradient of the loss function on the quantum data manifold is calculated, including: First, obtain the Fisher information matrix at the current parameter point. The Fisher information matrix is the Riemannian metric of the quantum data manifold constructed in step 102, represented in matrix form G(θ), where θ is the current parameter point. The Fisher information matrix characterizes the sensitivity of the quantum state to parameter changes, and each matrix element... It is given by the Fubini-Study metric tensor.
[0051] Next, the Euclidean gradient of the loss function at the current parameter point is calculated. The loss function L(θ) measures the difference between the predicted output of the quantum neural network and the true label; for example, it could be mean squared error or cross-entropy loss. Euclidean gradient L(θ) is a vector composed of the partial derivatives of the loss function with respect to each parameter, representing the direction of the fastest rise of the loss function in a flat parameter space.
[0052] Next, the Euclidean gradient of the loss function at the current parameter point is calculated. In this embodiment, the loss function L(θ) measures the difference between the predicted output of the quantum neural network and the true label; for example, it could be mean squared error or cross-entropy loss. Euclidean gradient L(θ) is a vector composed of the partial derivatives of the loss function with respect to each parameter, representing the direction of the fastest rise of the loss function in a flat parameter space.
[0053] Then, the inverse of the quantum Fisher information matrix at the current parameter point is multiplied by the Euclidean gradient to obtain the natural gradient of the loss function on the quantum data manifold. This calculation process can be described as follows: =G 1 (θ) L(θ).
[0054] In the above equation, G(θ) is the quantum Fisher information matrix. 1 (θ) is the inverse of the Fisher information matrix. L(θ) is the ordinary Euclidean gradient of the loss function at the current parameter point, which is a vector composed of the partial derivatives of the loss function with respect to each parameter. This is the calculated natural gradient.
[0055] The geometric meaning of this formula lies in: the Euclidean gradient. L(θ) is defined in a flat parameter space, but on a curved manifold, the steepest descent direction is not the Euclidean gradient direction. Instead, it needs to be corrected by multiplying by the inverse matrix of the metric tensor to adapt the gradient direction to the curved structure of the manifold. Specifically, the Fisher information matrix G(θ) describes the local scaling and distortion properties of the parameter space, and its inverse matrix G... 1 (θ) is used to transform the Euclidean gradient to a natural gradient direction compatible with the manifold geometry. This transformation ensures that the optimization process always proceeds along the direction of the fastest descent of the loss function on the manifold, rather than simply along the negative gradient direction of the parametric coordinate axes.
[0056] B. Solve the geodesic equations on the quantum data manifold based on the natural gradient to determine the geodesic path for parameter updates.
[0057] Understandably, after obtaining the natural gradient, it is necessary to determine the geodesic path extending along the direction of the natural gradient from the current parameter point, so that the Riemann index mapping can be used to update the parameters later.
[0058] Specifically, the initial direction of parameter update at the current parameter point can be determined first based on the natural gradient.
[0059] Among them, natural gradient Located at the current parameter point θ t In the tangent space, it indicates the direction of the steepest descent of the loss function on the manifold. The opposite direction of the natural gradient... The initial direction for parameter updates is indicated by moving along the direction in which the loss function decreases.
[0060] Then, based on the Levi-Civita connection of the quantum data manifold, the geodesic equation is solved such that the covariant derivative of the tangent vector of the parameter trajectory along its own direction is zero, thereby obtaining the geodesic path extending from the current parameter point along the initial direction.
[0061] The mathematical form of the geodesic equation is: ; In this formula, Let denote the covariant derivative with respect to the Levi-Civita connection. The Levi-Civita connection is the only metric-compatible and tortuous connection on a Riemannian manifold that defines how vectors move parallel to each other on the manifold. Specifically, the Levi-Civita connection determines how a vector in one tangent space is compared with a vector in another tangent space when moving on the manifold. This is the derivative of the parameter with respect to time t, representing the parameter update rate, which lies in the tangent space of the current point. The equation states that when moving along a geodesic, the covariant derivative of the velocity vector is zero, meaning the velocity vector remains parallel to itself on the manifold and has no acceleration component. In other words, the geodesic is a "straight line" on the manifold, causing the parameter to move along a curved but shortest path.
[0062] Solving this geodesic equation can be done from the current parameter point θ. t Depart, along the initial direction - The extended geodesic curve γ(s) is given, where s is the arc length parameter. This geodesic curve lies entirely on the quantum data manifold, and its tangent vector remains parallel to the initial direction. In practical calculations, the geodesic equation is usually transformed into a set of second-order ordinary differential equations, which can be solved using numerical integration methods (such as the Runge-Kutta method), or, for some manifolds with analytical forms (such as constant curvature spaces), analytical expressions can be obtained directly.
[0063] In a practical application, consider a quantum classification task where a quantum neural network needs to learn to classify image data encoded as quantum states into different categories. On the constructed quantum data manifold, the natural gradient of the loss function (e.g., cross-entropy loss) with respect to the circuit parameters is first calculated. Assuming the Fisher information matrix at the current parameter point is G(θ), the Euclidean gradient is... L(θ), then the natural gradient is Then, based on the Levi-Civita connection, the geodesic equation is solved to obtain a geodesic path extending from the current parameter point in the opposite direction of the natural gradient. This path ensures that the parameter update process always follows the inherent curved structure of the quantum state space, avoiding the manifold deviation problem that may be caused by traditional Euclidean gradient updates. For example, when optimizing a variable quantum classifier, updating parameters along the geodesic allows the quantum state to evolve along the path with the fastest energy decrease on the manifold, thus converging to the optimal classification boundary more quickly.
[0064] 104. Update the parameters along the geodesic path using the Riemann exponent mapping, and verify the geometric convergence of the updated parameters to determine whether the convergence condition is met.
[0065] Specifically, at the current parameter point, the initial update vector in the tangent space can be determined based on the natural gradient direction of the loss function on the quantum data manifold; the initial update vector is multiplied by the preset learning rate to obtain the target update vector; the target update vector is mapped back to the quantum data manifold through the Riemann exponent mapping to obtain the new parameter point after moving along the geodesic path.
[0066] The mathematical expression for this update process can be: .
[0067] In this formula, θ t This indicates the current parameter point. It is the natural gradient calculated at the current parameter point, which lies in the tangent space of the current point. η is the preset learning rate, which controls the size of the update step. The target update vector is obtained by inverting the natural gradient and multiplying it by the learning rate, and it still lies in the tangent space. At point θ t The Riemann exponent map at θ can take a vector in the tangent space as input and output along θ. t A point on the manifold reached by a geodesic that originates from, travels in the same direction as, and has an arc length equal to the length of, the vector. θ t+1 This refers to the updated parameter points. The geometric significance of the Riemann index mapping lies in ensuring that parameter updates strictly follow the geodesic path, thus fully adhering to the inherent geometric structure of the manifold.
[0068] Next, the updated parameters are geometrically converged to determine whether the convergence conditions are met.
[0069] In practice, convergence verification can certify the training process from multiple geometric dimensions, ensuring that the optimization not only converges but also converges to the global optimum. Convergence verification can include at least one of the following: For example, we can verify the geometric convexity of the loss function along the geodesic path near the current parameter point to determine if a local minimum trap exists. Geometric convexity means that the loss function is convex along any geodesic on the manifold. Mathematically, this is equivalent to verifying that the Hessian matrix of the loss function along all geodesics satisfies the positive semi-definite condition: 2 L(γ(t)) 0, where γ(t) is the geodesic curve on the manifold. 2 L is the Hessian matrix (i.e., the second-order covariant derivative) of the loss function on the manifold. Positive semi-definiteness ( This means that all eigenvalues of the Hessian matrix are non-negative, thus ensuring that there are no local maxima or saddle points along the geodesic.
[0070] For example, the rate of decrease of the loss function value can be analyzed based on the Lojasiewicz inequality to determine whether the current parameter point meets the preset convergence rate condition.
[0071] For example, Morse theory can be used to analyze the critical point structure of the loss function on a quantum manifold to determine whether the current parameter point is the global optimum. Morse theory provides a topological tool for determining global optimum by studying the relationship between the indices (i.e., the number of negative eigenvalues of the Hessian matrix) of the critical points (points with zero gradients) of a function on a manifold and the manifold topology. Specifically, if the loss function is a Morse function (non-degenerate at all critical points) and the indices of the current critical point are zero (i.e., positive Hessian definite), then that point is a local minimum. Combining the connectivity of the manifold and the properties of the loss function, we can further verify whether this local minimum is the global optimum.
[0072] For example, the theoretical lower bound of the loss value can be determined based on the Cramér-Rao bound in quantum parameter estimation, allowing us to determine whether the current loss value is close to this theoretical lower bound. The quantum Cramér-Rao bound is a fundamental inequality in quantum estimation theory, providing a lower bound on the variance of the unbiased estimator. Extending it to quantum neural network training, we can derive a valid lower bound for the loss function value. If the current loss value is close to this theoretical lower bound, then the model performance can be considered to be approaching its physical limit.
[0073] In a practical application, consider a quantum classification task where a quantum neural network needs to learn to classify image data encoded as quantum states into different categories. After each parameter update, the system verifies whether the second derivative of the loss function in the geodesic direction is non-negative to determine if it has fallen into a local minimum. Simultaneously, it estimates how many more iterations are needed to reach the preset accuracy using the Lojasiewicz inequality. If the loss value is close to the theoretical lower bound determined by the Cramér-Rao bound, training can be terminated early to avoid unnecessary waste of computational resources.
[0074] 105. If not satisfied, return to the step of calculating the natural gradient of the loss function on the quantum data manifold based on the geometry of the quantum data manifold, until the convergence condition is met; if satisfied, output the optimized quantum neural network.
[0075] In this embodiment, the judgment can be made based on the geometric convergence verification result of step 104. If the verification result shows that the convergence condition is not met (e.g., geometric convexity is not fully established, the convergence rate is lower than expected, the critical point structure shows a non-global optimum, or the loss value is not close to the theoretical lower bound), then step 103 is returned to continue the next round of iterative optimization. This cyclic process continues until all convergence conditions are met. If the verification result shows that the convergence condition has been met, then the optimization process is terminated, and the optimized quantum neural network is output. At this time, the output model has a provable convergence guarantee and optimal performance boundary, and can be reliably applied to practical tasks.
[0076] In one application embodiment, after multiple rounds of geometric optimization, the classification accuracy of the quantum neural network on the test set reaches the theoretically expected upper limit, and the verification results show that the loss function is geodesically convex on the manifold, the current critical point index is zero, and the loss value is close to the theoretical lower bound determined by the Cramér-Rao bound. At this point, the system outputs the trained quantum neural network. This model can be deployed to a quantum computing cloud platform or embedded in a quantum control system for tasks such as real-time quantum state recognition or quantum error-correcting code decoding.
[0077] In summary, the geometric optimization method for quantum neural networks provided in this application includes: acquiring a quantum training dataset and parameters of the quantum neural network; constructing a quantum data manifold representing the geometric structure of quantum states based on the quantum training dataset, with the Fisher information matrix as the Riemannian metric of the quantum data manifold; acquiring the geodesic equation on the quantum data manifold to determine the geodesic path for parameter updates; updating the parameters along the geodesic path using the Riemannian exponent mapping, and performing geometric convergence verification on the updated parameters to determine whether the convergence condition is met; if not, returning to the step of calculating the natural gradient of the loss function on the quantum data manifold based on the geometric structure of the quantum data manifold, until the convergence condition is met; if met, outputting the optimized quantum neural network. This application's embodiments construct a quantum data manifold with the Fisher information matrix as the Riemannian metric, realistically reflecting the intrinsic geometric structure of the quantum state space. By acquiring and updating parameters along geodesic paths, it ensures that the parameter optimization process strictly follows the shortest geometric path of the quantum state manifold. By using Riemann exponent mapping to update parameters, the update vector in the tangent space is precisely mapped back to the manifold, avoiding the problem of traditional Euclidean update methods deviating from the manifold's geometric structure. Through iterative optimization based on natural gradients, the parameter update direction always points to the steepest descent direction of the loss function on the manifold, fundamentally avoiding the barren plateau phenomenon. Through a geometric convergence verification mechanism, provable convergence guarantees are provided from multiple dimensions such as geometric convexity, convergence rate, critical point structure, and theoretical performance lower bounds, thereby fundamentally solving the mismatch problem between the quantum state geometry and the optimization method. This achieves stable convergence and global optimality guarantees for quantum neural network training, providing a theoretical foundation and technical support for the reliable application of quantum machine learning in practical tasks.
[0078] To facilitate better implementation of the quantum neural network geometry optimization method provided in this application, this application also provides a quantum neural network geometry optimization device. The meanings of the terms used are the same as in the above-described quantum neural network geometry optimization method, and specific implementation details can be found in the descriptions within the method embodiments.
[0079] Please see Figure 3 , Figure 3 This is a schematic diagram of the structure of a geometry optimization device for a quantum neural network provided in an embodiment of this application. The geometry optimization device for the quantum neural network may include an acquisition unit 201, a construction unit 202, a determination unit 203, and an update unit 204. Acquisition unit 201 is used to acquire the parameters of the quantum training dataset and the quantum neural network; Building unit 202 constructs a quantum data manifold representing the geometric structure of quantum states based on a quantum training dataset. The quantum data manifold uses the Fisher information matrix as a Riemannian metric. The determination unit 203 is used to obtain the geodesic equation on the quantum data manifold in order to determine the geodesic path for parameter updates; Update unit 204 is used to update parameters along the geodesic path using the Riemann exponent map, and to perform geometric convergence verification on the updated parameters to determine whether the convergence condition is met. If not, it returns to the step of calculating the natural gradient of the loss function on the quantum data manifold based on the geometric structure of the quantum data manifold, until the convergence condition is met. If the convergence condition is met, the optimized quantum neural network is output.
[0080] For specific implementation methods of each of the above units, please refer to the embodiments of the geometric optimization method of quantum neural networks described above, which will not be repeated here.
[0081] In summary, the geometric optimization apparatus for a quantum neural network provided in this application can acquire the quantum training dataset and the parameters of the quantum neural network through the acquisition unit 201; the construction unit 202 constructs a quantum data manifold representing the geometric structure of the quantum state based on the quantum training dataset, with the Fisher information matrix as the Riemannian metric of the quantum data manifold; the determination unit 203 acquires the geodesic equation on the quantum data manifold to determine the geodesic path for parameter updating; the update unit 204 updates the parameters along the geodesic path using the Riemann exponent mapping, and performs geometric convergence verification on the updated parameters to determine whether the convergence condition is met; if not, the process returns to the step of calculating the natural gradient of the loss function on the quantum data manifold based on the geometric structure of the quantum data manifold, until the convergence condition is met; if the condition is met, the optimized quantum neural network is output. This application's embodiments construct a quantum data manifold with the Fisher information matrix as the Riemannian metric, realistically reflecting the intrinsic geometric structure of the quantum state space. By acquiring and updating parameters along geodesic paths, it ensures that the parameter optimization process strictly follows the shortest geometric path of the quantum state manifold. By using Riemann exponent mapping to update parameters, the update vector in the tangent space is precisely mapped back to the manifold, avoiding the problem of traditional Euclidean update methods deviating from the manifold's geometric structure. Through iterative optimization based on natural gradients, the parameter update direction always points to the steepest descent direction of the loss function on the manifold, fundamentally avoiding the barren plateau phenomenon. Through a geometric convergence verification mechanism, provable convergence guarantees are provided from multiple dimensions such as geometric convexity, convergence rate, critical point structure, and theoretical performance lower bounds, thereby fundamentally solving the mismatch problem between the quantum state geometry and the optimization method. This achieves stable convergence and global optimality guarantees for quantum neural network training, providing a theoretical foundation and technical support for the reliable application of quantum machine learning in practical tasks.
[0082] This application also provides an electronic device in which a geometric optimization device for the quantum neural network of this application can be integrated, such as... Figure 4 As shown, it illustrates a structural schematic diagram of the electronic device involved in the embodiments of this application, specifically: The electronic device may include components such as a processor 301 with one or more processing cores and a memory 302 with one or more computer-readable storage media. Those skilled in the art will understand that... Figure 4 The electronic device structure shown does not constitute a limitation on the electronic device and may include more or fewer components than shown, or combine certain components, or have different component arrangements. Wherein: The processor 301 is the control center of the electronic device. It connects various parts of the electronic device via various interfaces and lines. By running or executing software programs stored in the memory 302 and / or this application, and by calling data stored in the memory 302, it performs various functions and processes data, thereby providing overall monitoring of the electronic device. Optionally, the processor 301 may include one or more processing cores; preferably, the processor 301 may integrate an application processor and a modem processor, wherein the application processor mainly handles the operation of the storage medium, user interface, and application programs, while the modem processor mainly handles wireless communication. It is understood that the modem processor may not be integrated into the processor 301.
[0083] The memory 302 can be used to store software programs and this application. The processor 301 executes various functional applications and data processing by running the software programs and this application stored in the memory 302. The memory 302 may mainly include a program storage area and a data storage area. The program storage area may store applications required for operating the storage medium and at least one function; the data storage area may store data created based on the use of the electronic device. In addition, the memory 302 may include high-speed random access memory and may also include non-volatile memory, such as at least one disk storage device, flash memory device, or other volatile solid-state storage device. Accordingly, the memory 302 may also include a memory controller to provide the processor 301 with access to the memory 302.
[0084] Although not shown, the electronic device may also include a display unit, an input unit, and a power supply, etc., which will not be described in detail here. Specifically, in this embodiment, the processor 301 in the electronic device loads the executable files corresponding to the processes of one or more application programs into the memory 302 according to the following instructions, and the processor 301 runs the application programs stored in the memory 302 to realize various functions, as follows: Obtain the parameters of the quantum training dataset and the quantum neural network; Based on the quantum training dataset, a quantum data manifold representing the geometric structure of quantum states is constructed, with the Fisher information matrix as the Riemannian metric for the quantum data manifold. Obtain the geodesic equations on the quantum data manifold to determine the geodesic path for parameter updates; Along the geodesic path, the parameters are updated using the Riemann exponent mapping, and the updated parameters are geometrically converged to determine whether the convergence condition is met. If the condition is not met, return to the step of calculating the natural gradient of the loss function on the quantum data manifold based on the geometry of the quantum data manifold, until the convergence condition is met; if it is met, output the optimized quantum neural network.
[0085] Those skilled in the art will understand that all or part of the steps in the various methods of the above embodiments can be performed by instructions, or by instructions controlling related hardware. These instructions can be stored in a computer-readable storage medium and loaded and executed by a processor.
[0086] Therefore, embodiments of this application provide a storage medium storing a plurality of instructions that can be loaded by a processor to execute steps in any of the methods provided in embodiments of this application. For example, the instructions can execute the following steps: Obtain the parameters of the quantum training dataset and the quantum neural network; Based on the quantum training dataset, a quantum data manifold representing the geometric structure of quantum states is constructed, with the Fisher information matrix as the Riemannian metric for the quantum data manifold. Obtain the geodesic equations on the quantum data manifold to determine the geodesic path for parameter updates; Along the geodesic path, the parameters are updated using the Riemann exponent mapping, and the updated parameters are geometrically converged to determine whether the convergence condition is met. If the condition is not met, return to the step of calculating the natural gradient of the loss function on the quantum data manifold based on the geometry of the quantum data manifold, until the convergence condition is met; if it is met, output the optimized quantum neural network.
[0087] For details on the implementation of each of the above operations, please refer to the previous examples, which will not be repeated here.
[0088] The storage medium may include: read-only memory (ROM), random access memory (RAM), disk or optical disk, etc.
[0089] Since the instructions stored in the storage medium can execute the steps of any method provided in the embodiments of this application, the beneficial effects that any method provided in the embodiments of this application can achieve can be realized. For details, please refer to the previous embodiments, which will not be repeated here.
[0090] The foregoing has provided a detailed description of the geometric optimization method, apparatus, storage medium, and electronic device for quantum neural networks provided in this application. Specific examples have been used to illustrate the principles and implementation methods of this application. The descriptions of the above embodiments are only for the purpose of helping to understand the core ideas of this application. At the same time, those skilled in the art will recognize that there will be changes in the specific implementation methods and application scope based on the ideas of this application. Therefore, the content of this specification should not be construed as a limitation of this application.
Claims
1. A geometric optimization method for quantum neural networks, characterized in that, include: Obtain the parameters of the quantum training dataset and the quantum neural network; Based on the quantum training dataset, a quantum data manifold representing the geometric structure of quantum states is constructed, with the Fisher information matrix as the Riemannian metric. Obtain the geodesic equations on the quantum data manifold to determine the geodesic path for parameter updates; The parameters are updated using Riemann exponent mapping along the geodesic path, and the updated parameters are geometrically convergent to determine whether the convergence condition is met. If the condition is not met, the process returns to the step of calculating the natural gradient of the loss function on the quantum data manifold based on the geometry of the quantum data manifold, until the convergence condition is met; if it is met, the optimized quantum neural network is output.
2. The geometric optimization method for quantum neural networks as described in claim 1, characterized in that, The step of obtaining the geodesic equations on the quantum data manifold to determine the geodesic path for parameter updates includes: Calculate the natural gradient of the loss function on the quantum data manifold based on the geometry of the quantum data manifold; Based on the natural gradient, the geodesic equations on the quantum data manifold are solved to determine the geodesic path for parameter updates.
3. The geometric optimization method for quantum neural networks as described in claim 2, characterized in that, The step of calculating the natural gradient of the loss function on the quantum data manifold based on the geometric structure of the quantum data manifold includes: Obtain the Fisher information matrix at the current parameter point; Calculate the Euclidean gradient of the loss function at the current parameter point; Multiply the inverse of the quantum Fisher information matrix at the current parameter point by the Euclidean gradient to obtain the natural gradient of the loss function on the quantum data manifold.
4. The geometric optimization method for quantum neural networks as described in claim 2, characterized in that, The step of solving the geodesic equations on the quantum data manifold based on the natural gradient to determine the geodesic path for parameter updates includes: The initial direction of parameter update at the current parameter point is determined based on the natural gradient. Based on the Levi-Civita connection of the quantum data manifold, the geodesic equation is solved such that the covariant derivative of the tangent vector of the parameter trajectory along its own direction is zero, thereby obtaining the geodesic path extending from the current parameter point along the initial direction.
5. The geometric optimization method for quantum neural networks as described in claim 2, characterized in that, Based on the quantum training dataset, a quantum data manifold characterizing the geometric structure of quantum states is constructed. This quantum data manifold uses the Fisher information matrix as a Riemannian metric and includes: Quantum state tomography is performed on the quantum training dataset to reconstruct the density matrix of each quantum state and obtain an empirical distribution model of the quantum states; Based on the aforementioned empirical distribution model, the Fubini-Study metric tensor is calculated; The Fisher information matrix is constructed using the Fubini-Study metric tensor and serves as the Riemann metric of the quantum data manifold; The quantum states in the quantum training dataset are embedded into a low-dimensional manifold quantized by the Fisher information matrix to obtain a quantum data manifold characterizing the geometric structure of the quantum states.
6. The geometric optimization method for quantum neural networks as described in claim 2, characterized in that, Updating the parameters along the geodesic path using a Riemann index mapping includes: At the current parameter point, the initial update vector in the tangent space is determined according to the natural gradient direction of the loss function on the quantum data manifold; The initial update vector is multiplied by the preset learning rate to obtain the target update vector; The target update vector is mapped back onto the quantum data manifold using the Riemann index mapping to obtain the new parameter point after moving along the geodesic path.
7. The geometric optimization method for quantum neural networks as described in any one of claims 1-6, characterized in that, The parameters of the quantum neural network include at least one of the following: rotation angle parameters in the variable quantum circuit, entanglement parameters between qubits, basis vector setting parameters for adaptive measurement, and feature mapping parameters in the data encoding circuit.
8. A geometric optimization device for a quantum neural network, characterized in that, include: The acquisition unit is used to acquire the parameters of the quantum training dataset and the quantum neural network. A construction unit is used to construct a quantum data manifold representing the geometric structure of quantum states based on the quantum training dataset, wherein the quantum data manifold uses the Fisher information matrix as a Riemannian metric. A determining unit is used to obtain the geodesic equation on the quantum data manifold in order to determine the geodesic path for parameter updates; The update unit is used to update the parameters along the geodesic path using the Riemann exponent mapping, and to perform geometric convergence verification on the updated parameters to determine whether the convergence condition is met. If not, it returns to the step of calculating the natural gradient of the loss function on the quantum data manifold based on the geometric structure of the quantum data manifold, until the convergence condition is met. If the convergence condition is met, the optimized quantum neural network is output.
9. A storage medium, characterized in that, The storage medium stores a plurality of instructions adapted for loading by a processor to execute the geometric optimization method of the quantum neural network according to any one of claims 1-7.
10. An electronic device, characterized in that, It includes a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor, when executing the computer program, implements the geometric optimization method for a quantum neural network as described in any one of claims 1-7.