A method and related apparatus for solving the expectation value of the Hamiltonian of a proposed quantum circuit.

By dividing the state space of the Dicke-state-simulated quantum circuit into a non-overlapping subspace, and calculating and fitting its minimum expectation value, the barren plateau problem in the variational quantum algorithm is solved, and the trainability and computational efficiency of the algorithm are improved.

CN118504697BActive Publication Date: 2026-11-17ORIGIN QUANTUM COMPUTING TECH (HEFEI) CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202410692991.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-05-31
Publication Date
2026-11-17
Estimated Expiration
2044-05-31

AI Technical Summary

Technical Problem

In variational quantum algorithms, as the problem size increases, the number of qubits required to construct the quantum circuit increases, leading to the plateau problem, which makes it difficult to optimize variational parameters and reduces the trainability of the algorithm.

Method used

The proposed state space of the Dicke-state proposed quantum circuit is divided into multiple non-overlapping subspaces. The initial parameters of the proposed quantum circuit are determined by calculating the minimum expected value and fitting relationship in the subspace, so as to minimize the expected value of the Hamiltonian.

Benefits of technology

It effectively alleviates the problem of barren plateaus, improves the trainability of variable quantum algorithms, reduces computational complexity, and enables efficient solutions to large-scale problems.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118504697B_ABST
    Figure CN118504697B_ABST
Patent Text Reader

Abstract

This invention discloses a method and related apparatus for solving the expected value of the Hamiltonian of a proposed quantum circuit, belonging to the field of quantum computing technology. The method includes: dividing the proposed state space of a proposed quantum circuit containing n qubits (Dicke states) into multiple non-overlapping subspaces, each subspace being obtained by the direct product of two sub-Dicke states, with the sum of the number of qubits used to encode the two sub-Dicke states being n; calculating the minimum expected value of the Hamiltonian of the problem to be solved in a predetermined number of subspaces, and determining the fitting relationship between each minimum expected value and the corresponding subspace number, the subspace number being determined based on the difference between the combinations of the two sub-Dicke states; determining the initial proposed parameters of the proposed quantum circuit based on the subspaces indicated by the fitting relationship, and minimizing the expected value of the Hamiltonian in the proposed state space as the expected value of the Hamiltonian of the proposed quantum circuit. This effectively alleviates the plateau problem of variable quantum algorithms and improves the trainability of the algorithm.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of quantum computing technology, and in particular to a method and related apparatus for solving the expectation value of the Hamiltonian of a proposed quantum circuit. Background Technology

[0002] A quantum computer is a physical device that performs high-speed mathematical and logical operations, stores and processes quantum information according to the laws of quantum mechanics. When a device processes and computes quantum information and runs quantum algorithms, it is a quantum computer. Due to its ability to process mathematical problems more efficiently than conventional computers, quantum computers have become a key technology under research. Quantum computers can be used to accelerate the solution of complex discrete optimization, constraint satisfaction, combinatorial optimization, and simulation problems—problems that are difficult for traditional computers to solve.

[0003] In recent years, various quantum computing methods have been developed, aiming to leverage the potential of quantum computers to solve computational problems in various systems. Among them, Variational Quantum Algorithms (VQA) are a class of hybrid classical-quantum algorithms that utilize quantum computers to solve complex optimization problems. VQA combines the powerful computational capabilities of quantum computing with the optimization techniques of classical computing to solve problems such as quantum chemistry, quantum machine learning, and combinatorial optimization.

[0004] However, as the scale of problems handled by the variational quantum algorithm increases, the number of qubits required for the proposed quantum circuits also increases, leading to the Barren Plateau (BP) problem in the cost function landscape of the variational quantum algorithm. At this point, the optimization algorithm struggles to find the correct direction to update the variational parameters, and the trainability of the variational quantum algorithm is greatly reduced. Therefore, solving large-scale problems using the variational quantum algorithm remains very difficult at present. Summary of the Invention

[0005] The purpose of this invention is to provide a method and related apparatus for solving the expectation value of the Hamiltonian of a simulated quantum circuit, aiming to solve the plateau problem in the variational quantum algorithm based on a large number of simulated qubits, thereby improving the trainability of the variational quantum algorithm.

[0006] One embodiment of the present invention provides a method for solving the Hamiltonian expectation value of a proposed quantum circuit, the method comprising:

[0007] The simulated state space of the simulated quantum circuit output by the Dicke state containing n qubits is divided into multiple non-overlapping subspaces; wherein each subspace is obtained by the direct product of two sub-Dicke states, and the sum of the number of qubits used to encode the two sub-Dicke states is n.

[0008] Calculate the minimum expected value of the Hamiltonian of the problem to be solved in a predetermined number of subspaces, and determine the fitting relationship between each minimum expected value and the corresponding subspace number; wherein, the subspace number is determined based on the difference between the two sub-Dicke state combinations;

[0009] The initial proposed parameters of the proposed quantum circuit are determined based on the subspace indicated by the fitting relationship, and the expected value of the Hamiltonian in the proposed state space is minimized as the expected value of the Hamiltonian of the proposed quantum circuit.

[0010] Optionally, the problem to be solved is a combinatorial optimization problem, and the Dicke state prepared by the proposed quantum circuit is... The method represents a linear combination of binary strings with n qubits and k excited states |1>, used to simulate various combination schemes for the combinatorial optimization problem. The method further includes:

[0011] The optimal combinatorial solution for the combinatorial optimization problem is determined based on the expected value of the Hamiltonian of the proposed quantum circuit.

[0012] The fitting relationship is a convex curve obtained by interpolation based on each minimum expected value and its corresponding subspace number. Determining the initial parameters of the proposed quantum circuit based on the subspace indicated by the fitting relationship includes:

[0013] The subspace indicated by the minimum value of the convex curve is determined as the target subspace;

[0014] Based on the output probability distribution of the proposed quantum circuit and the basis vectors included in the target subspace, the initial proposed parameters of the proposed quantum circuit are determined.

[0015] Optionally, determining the initial design parameters of the proposed quantum circuit based on the output probability distribution of the proposed quantum circuit and the basis vectors included in the target subspace includes:

[0016] For each preset proposed parameter, the output probability distribution of the proposed quantum circuit under that preset proposed parameter is determined respectively;

[0017] The output probability distribution with the highest similarity to the distribution of basis vectors included in the target subspace is determined, and the preset simulation parameters corresponding to the output probability distribution are used as the initial simulation parameters of the simulation quantum circuit.

[0018] Optionally, the numbering of the qubit i satisfies 0 ≤ i ≤ n-1, when At that time, the proposed quantum circuit includes a first coding layer and nk first parametric layers, wherein:

[0019] The first coding layer includes k X gates that operate on the odd-numbered qubits in the first 2k qubits;

[0020] Each of the first parametric layering includes multiple parametric sub-modules that act sequentially on adjacent qubits.

[0021] Optional, when At that time, the proposed quantum circuit includes a second coding layer, k second parameter-variable layers, and a third coding layer, wherein:

[0022] The second coding layer includes nk X gates that operate on the odd-numbered qubits in the first 2 (nk) qubits respectively;

[0023] Each of the second parametric layering includes multiple parametric sub-modules that act sequentially on adjacent qubits;

[0024] The third coding layer includes n X gates that act on each qubit.

[0025] Optionally, the parametric variational module includes a CNOT gate, a controlled RY gate, and a CNOT gate cascaded in sequence; wherein, the control bit of the CNOT gate is the high-order bit among the adjacent qubits, and the target bit is the low-order bit among the adjacent qubits; the control bit of the controlled RY gate is the low-order bit, and the target bit is the high-order bit.

[0026] Optionally, the combinatorial optimization problem is a binary integer combinatorial optimization problem, and the Hamiltonian is constructed based on the following model:

[0027] min x qx T Ax-μ T x

[0028] stξ=Π T x

[0029] Where x = (x1, x2, ..., x...) n ) T Choose a vector for the target, x j A value of 0 indicates that the j-th target is not selected, and a value of 1 indicates that the j-th target is selected. n represents the number of targets to be selected; q∈(0,∞) is the preference coefficient; μ is the reward vector obtained by ranking the expected rewards of the n targets; A is the covariance matrix among the n targets; in the constraint term st, ξ represents the total selection cost, and Π is the cost vector of the n targets.

[0030] Another embodiment of the present invention provides a device for solving the Hamiltonian expectation value of a proposed quantum circuit, the device comprising:

[0031] A subspace module is used to divide the simulated state space of the simulated quantum circuit output containing n qubits into multiple non-overlapping subspaces; wherein each subspace is obtained by the direct product of two sub-Dicke states, and the sum of the number of qubits used to encode the two sub-Dicke states is n.

[0032] The fitting module is used to calculate the minimum expected value of the Hamiltonian of the problem to be solved in a preset number of subspaces, and to determine the fitting relationship between each minimum expected value and the corresponding subspace number; wherein the subspace number is determined based on the difference between the two sub-Dicke state combinations;

[0033] The solution module is used to determine the initial proposed parameters of the proposed quantum circuit based on the subspace indicated by the fitting relationship, and to minimize the expected value of the Hamiltonian in the proposed state space as the expected value of the Hamiltonian of the proposed quantum circuit.

[0034] Another embodiment of the present invention provides a storage medium storing a computer program, wherein the computer program is configured to execute the method described in any of the above embodiments when running.

[0035] Another embodiment of the present invention provides an electronic device including a memory and a processor, wherein the memory stores a computer program and the processor is configured to run the computer program to perform the methods described in any of the above embodiments.

[0036] Compared with the prior art, the present invention provides a method and related apparatus for solving the expected value of Hamiltonian of a proposed quantum circuit. The method includes: dividing the proposed state space of the proposed quantum circuit output by the Dicke state containing n qubits into multiple non-overlapping subspaces; calculating the minimum expected value of Hamiltonian of the problem to be solved in a preset number of subspaces in each subspace; and determining the fitting relationship between each minimum expected value and the corresponding subspace number; then determining the initial proposed parameters of the proposed quantum circuit based on the subspace indicated by the fitting relationship; and minimizing the expected value of Hamiltonian in the proposed state space as the expected value of Hamiltonian of the proposed quantum circuit.

[0037] In this scheme, the proposed quantum circuit comprises n qubits, and each subspace is obtained by the direct product of two sub-Dicke states. The sum of the number of qubits used to encode the two sub-Dicke states is n. These subspaces do not overlap, therefore the proposed state space output by the proposed quantum circuit can be represented as a linear combination of these subspaces. Thus, solving for the Hamiltonian expectation of the proposed state space can be transformed into solving for the Hamiltonian expectation of each subspace. Furthermore, each subspace is numbered based on the difference between the two sub-Dicke state combinations. The subspace containing fewer basis vectors can be selected, its minimum expectation value can be calculated, and the fitting relationship between the minimum expectation value and the subspace number can be obtained. This fitting relationship can indicate the subspace where the basis vector is located when the Hamiltonian expectation value of the proposed quantum circuit is minimized. By reasonably setting the initial parameters of the proposed quantum circuit to cover the basis vectors included in the subspace, the problem of barren plateau can be effectively alleviated, the trainability of the variational quantum algorithm can be improved, and since this scheme does not need to solve all subspaces, the computational complexity can be reduced by fitting. Attached Figure Description

[0038] Figure 1 A network block diagram of a system for solving the expectation value of a proposed quantum circuit is provided in an embodiment of the present invention.

[0039] Figure 2 A flowchart illustrating a method for solving the expected value of the Hamiltonian of a proposed quantum circuit, provided in an embodiment of the present invention;

[0040] Figure 3(A) is a detailed structural diagram of a proposed quantum circuit provided in an embodiment of the present invention;

[0041] Figure 3(B) is a specific structural diagram of another proposed quantum circuit provided in an embodiment of the present invention;

[0042] Figure 3(C) is a detailed structural diagram of another proposed quantum circuit provided in an embodiment of the present invention;

[0043] Figure 4 This is a structural diagram of a proposed quantum circuit corresponding to another proposed method provided in an embodiment of the present invention;

[0044] Figure 5 A schematic diagram of a fitting curve provided for an embodiment of the present invention;

[0045] Figure 6 A schematic diagram of the output probability distribution of a proposed quantum circuit is provided for an embodiment of the present invention;

[0046] Figure 7 A schematic diagram illustrating the style transformation of a fitting curve provided in an embodiment of the present invention;

[0047] Figure 8 A Hamiltonian expectation value decrease curve is provided for an embodiment of the present invention;

[0048] Figure 9 This is a schematic diagram of a proposed quantum circuit sampling result provided in an embodiment of the present invention;

[0049] Figure 10 A comparison chart of cumulative returns from portfolio optimization backtesting is provided as an embodiment of the present invention.

[0050] Figure 11 A structural diagram of a device for solving the expectation value of a proposed quantum circuit is provided in an embodiment of the present invention.

[0051] Figure 12 This is a schematic diagram of the structure of a computer device provided in an embodiment of the present invention. Detailed Implementation

[0052] The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present invention, and should not be construed as limiting the present invention.

[0053] Figure 1 This is a network block diagram of a system for solving the expectation value of a proposed quantum circuit, provided in an embodiment of the present invention. The system for solving the expectation value of a proposed quantum circuit may include a network 110, a server 120, a wireless device 130, a client 140, storage 150, a classical computing unit 160, a quantum computing unit 170, and may also include additional memory, a classical processor, a quantum processor, and other devices (not shown).

[0054] Network 110 is a medium used to provide communication links between various devices and computers connected together within a system for solving the expectation value of the Hamiltonian of a proposed quantum circuit. This includes, but is not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof. The connection method can be wired, wireless communication links, or fiber optic cables.

[0055] Server 120, wireless device 130, and client 140 are conventional data processing systems that may contain data and application programs or software tools that perform conventional computational processes. Client 140 may be a personal computer or a network computer, so the data may also be provided by server 120. Wireless device 130 may be a smartphone, tablet, laptop, smart wearable device, etc. Storage unit 150 may include database 151, which can be configured to store data such as qubit parameters, quantum logic gate parameters, quantum circuits, and quantum programs.

[0056] The classical computing unit 160 (quantum computing unit 170) may include a classical processor 161 (quantum processor 171) for processing classical data (quantum data) and a memory 162 (memory 172) for storing classical data (quantum data). The classical data (quantum data) may be a boot file, an operating system image, and an application program 163 (application program 173). The application program 163 (application program 173) may be used to implement a quantum algorithm compiled by the method for solving the expected value of the Hamiltonian of the proposed quantum circuit provided in the embodiments of the present invention.

[0057] Any data or information stored or generated in the classical computing unit 160 (quantum computing unit 170) can also be configured to be stored or generated in another classical (quantum) processing system in a similar manner, and any application executed therein can also be configured to be executed in another classical (quantum) processing system in a similar manner.

[0058] It should be noted that a true quantum computer has a hybrid structure, which includes at least... Figure 1 The system consists of two main parts: the classical computing unit 160, which is responsible for performing classical calculations and control; and the quantum computing unit 170, which is responsible for running quantum programs to achieve quantum computing.

[0059] The aforementioned classical computing unit 160 and quantum computing unit 170 can be integrated into a single device or distributed across two different devices. For example, a first device including the classical computing unit 160 runs a classical computer operating system, providing quantum application development tools and services, as well as the storage and network services required for quantum applications. Users develop quantum programs using the quantum application development tools and services on the second device, and send these quantum programs to a second device including the quantum computing unit 170 via the network services. The second device runs a quantum computer operating system, which parses and compiles the quantum program's code into instructions that the quantum processor 170 can recognize and execute. The quantum processor 170 then implements the quantum algorithm corresponding to the quantum program based on these instructions.

[0060] The computing units of the classic processor 161 within the classic computing unit 160 are based on CMOS transistors on a silicon chip. These computing units are not limited by time or coherence; that is, they are available at any time without time constraints. Furthermore, the number of such computing units in a silicon chip is sufficient; currently, a single classic processor 161 contains tens of thousands of computing units. Given this sufficient number and the fixed selectable computing logic of the CMOS transistors (e.g., AND logic), computational performance is achieved by combining a large number of CMOS transistors with a limited set of logic functions during operation.

[0061] In the quantum computing unit 170, the basic computing unit of the quantum processor 171 is the qubit. The input of a qubit is limited by coherence and coherence time; that is, a qubit is limited by its available usage time and is not always readily available. Making full use of qubits within their available usage time is a key challenge in quantum computing. Furthermore, the number of qubits in a quantum computer is one of the representative indicators of its performance. Each qubit performs computational functions through on-demand configured logical functions. Given the limited number of qubits and the diverse logical functions available in quantum computing, such as Hadamard gates (H gates), Pauli-X gates (X gates), Pauli-Y gates (Y gates), Pauli-Z gates (Z gates), X gates, RY gates, RZ gates, CNOT gates, CR gates, iSWAP gates, Tofoli gates, etc., quantum computing requires combining a limited number of qubits with diverse logical function combinations to achieve computational effects.

[0062] Based on these differences, the design of classical logic functions applied to CMOS transistors and the design of quantum logic functions applied to qubits are significantly and fundamentally different. The design of classical logic functions applied to CMOS transistors does not need to consider the individuality of CMOS transistors. For example, the representation of a CMOS transistor in a silicon chip is its individual identifier, location, and usable time of each CMOS transistor. Therefore, classical algorithms composed of classical logic functions only express the operational relationship of the algorithm, not the algorithm's dependence on individual CMOS transistors.

[0063] Quantum logic functions applied to qubits need to consider the individuality of each qubit, such as its position within the quantum chip, its relationship with surrounding qubits, and the duration of its usable time. Therefore, quantum algorithms composed of quantum logic functions not only express the computational relationships within the algorithm but also its dependence on the individual qubits.

[0064] A quantum chip can include qubits and channels for controlling them. Quantum logic gates are implemented using analog signals. Different combinations of analog signals are applied to the qubits through these channels, thereby creating quantum circuits with different functions to process data. Therefore, the design of quantum logic functions in the qubits (including the design of whether qubits are used and the design of the efficiency of each qubit) is crucial for improving the computational performance of quantum computers and requires special design. This is the unique characteristic of quantum algorithms based on quantum logic functions, and it is fundamentally and significantly different from classical algorithms based on classical logic functions. The aforementioned design considerations for qubits are technical problems that ordinary computing devices do not need to consider or address.

[0065] In the field of quantum computing, the Hamiltonian is a physical quantity in quantum mechanics that describes the energy of a system. It is the total energy operator of the system, including its kinetic and potential energy. The eigenvalues ​​of the Hamiltonian represent the possible values ​​of the system's energy, while the eigenstates represent the possible energy states of the system. By solving the Hamiltonian's eigenvalue problem, we can obtain the system's energy levels and the probabilities of transitions between them, thus revealing the system's energy structure and energy variation patterns. Therefore, the Hamiltonian is a very important physical quantity in quantum mechanics, describing the fundamental properties and behavior of quantum systems.

[0066] The expectation value of the Hamiltonian plays a crucial role in quantum algorithms. For example, in combinatorial optimization problems, the Hamiltonian transforms the problem into a quantum mechanical problem, allowing quantum computers to find the optimal solution by minimizing the Hamiltonian expectation. When running variational quantum algorithms to find optimal solutions to combinatorial optimization problems, the Hamiltonian expectation <ψ|H|ψ> is a key indicator for evaluating the energy level of the current quantum state |ψ> prepared by the proposed quantum circuit. During optimization, the expectation directly reflects the quality of the current solution; the optimization objective is to minimize this expectation, thereby finding the quantum state (i.e., the ground state energy) corresponding to the optimal solution. In summary, the expectation value of the Hamiltonian is an important computational method for determining the optimal solution to combinatorial optimization problems.

[0067] Specifically, the calculation of the expectation value of the Hamiltonian can include the following quantum computation steps:

[0068] First, a proposed quantum circuit is used to evolve the qubit in the ground state |0> to the excited state |ψ(θ)>;

[0069] Then, the Hamiltonian operator is applied to the qubit in the excited state |ψ(θ)>, causing the qubit to evolve to state;

[0070] Finally, for those in The expected value of the Hamiltonian is obtained by measuring the state of the qubit:

[0071]

[0072] Where E represents the average energy of the quantum system corresponding to the Hamiltonian. <h>This represents the expected value of the Hamiltonian. Let denot Hamiltonian operator, ψ(θ) denote the proposed quantum circuit, and θ denote the variational parameter of the proposed quantum circuit.

[0073] In related technologies, when solving for the expectation value of the Hamiltonian using the aforementioned method, it is necessary to construct a cost function for the expectation value of the Hamiltonian, and then determine the optimization direction of the variational parameters of the proposed quantum circuit by calculating the gradient of the cost function. However, as the problem scale processed by the variational quantum algorithm increases, the number of proposed qubits required for the proposed quantum circuit also increases, leading to the backpropagation (BP) problem in the cost function landscape of the variational quantum algorithm. That is, only the gradient in the region with a small exponential difference relative to the number of qubits does not decrease exponentially with the number of qubits, making it difficult to find the correct direction to update the variational parameters. The emergence of the BP problem indicates that more effort is needed to extend the effectiveness of the variational quantum algorithm to the solution of large-scale problems.

[0074] Therefore, a more efficient solution for calculating the expectation value of the Hamiltonian of a simulated quantum circuit is needed to address the plateau problem in variational quantum algorithms based on a large number of simulated qubits, thereby improving the trainability of variational quantum algorithms. Based on this, this invention proposes a method and related apparatus for calculating the expectation value of the Hamiltonian of a simulated quantum circuit.

[0075] See Figure 2 , Figure 2 A method for solving the expectation value of a proposed quantum circuit is provided in this embodiment of the invention. The method includes the following steps:

[0076] Step 201: Divide the simulated state space of the Dicke state simulated quantum circuit output containing n qubits into multiple non-overlapping subspaces.

[0077] Each of the subspaces is obtained by the direct product of two sub-Dicke states, and the sum of the number of qubits used to encode the two sub-Dicke states is n.

[0078] Specifically, for a system containing n qubits, the Dicke state is a quantum state with a fixed number of excitations (i.e., a fixed number of |1>). That is, a Dicke state with k excitations can be represented as a symmetric superposition of all quantum states containing k |1> and nk |0>. Further, in the scheme provided by the embodiments of the present invention, the simulated state space output by the simulated quantum circuit of the Dicke state can be denoted as the simulated state space. Let $\mathbf{n}$ represent a linear combination of binary strings with $n$ qubits and $k$ excited states $|1>$, where each basis vector in the hypothetical state space is represented as a binary string. By adjusting the hypothetical parameters in the hypothetical quantum circuit, the amplitude of each basis vector can be changed, thereby adjusting its position in the hypothetical state space. The probability distribution in.

[0079] Utilizing the above properties, in one specific implementation, each basis vector can be used to simulate a combinatorial optimization problem, thereby leveraging Dicke states. We use this to represent all possible combinations and calculate the minimum expected value of the Hamiltonian for this combinatorial optimization problem, thereby selecting the optimal combination from the entire hypothetical state space.

[0080] To reduce the complexity of solving for the Hamiltonian expectation value of this hypothetical quantum circuit, the idea of ​​circuit decomposition can be used to decompose the hypothetical state space of the Dicke state hypothetical quantum circuit output. The process involves dividing the circuit into multiple non-overlapping subspaces. Specifically, the decomposition of the Dicke-state-based quantum circuit can be referenced by the following formula:

[0081]

[0082] Based on the above equation, a Dicke-state hypothetical quantum circuit can be divided into j+1 or k+1 sub-circuits, each sub-circuit comprising two segments; the first segment is used to prepare the second segment. The first sub-circuit contains j qubits, and the second segment contains nj qubits; that is, the sum of the qubits used to encode the two sub-Dicke states is n. Therefore, each sub-circuit can output the original hypothetical state space. A subspace, the original hypothetical space That is, a linear combination of multiple subspaces, and each subspace can be obtained by the direct product of the sub-Dicke states prepared by the two segments mentioned above.

[0083] Because the Dicke-state-based quantum circuit has a low double-gate depth and a weak quadratic order of parameters, its circuitry is simpler and its search space is more accurate compared to commonly used methods. Furthermore, each sub-circuit's two segments are prepared independently, and the smaller Dicke sub-states do not require entanglement. Therefore, compared to commonly used circuit splitting techniques, the sampling complexity of this scheme can be reduced exponentially.

[0084] In one embodiment of the present invention, the numbering of the qubit i satisfies 0 ≤ i ≤ n-1, when At that time, the proposed quantum circuit includes a first coding layer and nk first parametric layers, wherein:

[0085] The first coding layer includes k X gates that operate on the odd-numbered qubits in the first 2k qubits;

[0086] Each of the first parametric layering includes multiple parametric sub-modules that act sequentially on adjacent qubits.

[0087] Specifically, as shown in Figure 3(A), the proposed Dicke state quantum circuit contains 6 qubits, correspondingly numbered as qubits [0, 1, 2, 3, 4, 5], which can be denoted as q[0], q[1], q[2], q[3], q[4], and q[5] from least significant to most significant. This proposed Dicke state quantum circuit is used to prepare the Dicke state. Among them, one X gate acting on the second quantum bit q[1] constitutes the first coding layer, and the five parametric variational modules executed after the X gate constitute (6-1) first parametric variational layers, each parametric variational layer including one parametric variational module.

[0088] In one specific implementation, the parametric variational module may include a CNOT gate, a controlled RY gate, and a CNOT gate cascaded in sequence; wherein, the control bit of the CNOT gate is the high-order bit among the adjacent qubits, and the target bit is the low-order bit among the adjacent qubits; the control bit of the controlled RY gate is the low-order bit, and the target bit is the high-order bit.

[0089] Specifically, the variational parameters of the multiple parametric variational modules in this embodiment of the invention are consistent, and can be adjusted to the same parameters simultaneously during the iterative operation of the variational quantum algorithm. Due to the trigonometric function distribution relationship between the amplitudes of the Dicke state basis vectors, the output probability distribution of the proposed quantum circuit can be changed by changing the rotation parameters of the controlled RY gates. For example, in the proposed quantum circuit in Figure 3(A), when the rotation angle of the controlled RY gates of the five parametric variational modules is 0, its output quantum state is |010000>. As the rotation angle increases from 0 to π, the types of quantum states output by the proposed quantum circuit first gradually increase and then gradually decrease, and its principal components also continuously shift to the right, with the output quantum state eventually approaching |000010>.

[0090] For example, for preparing Dicke state The proposed quantum circuit structure can be shown in Figure 3(B), including X gates acting on qubits q[1] and q[3] and four parameterized layers. According to the execution timing of the quantum logic gates in the proposed quantum circuit, the parameterized modules acting on q[0] and q[1], q[2] and q[3] constitute the first parameterized layer; the parameterized modules acting on q[1] and q[2], q[3] and q[4] constitute the second parameterized layer; the parameterized modules acting on q[2] and q[3], q[4] and q[5] constitute the third parameterized layer; and the parameterized modules acting on q[3] and q[4] constitute the fourth parameterized layer.

[0091] For example, it is used to prepare Dicke states. The proposed quantum circuit structure can be shown in Figure 3(C), including X gates acting on qubits q[1], q[3] and q[5] and three parametric layers. The division of the parametric layers is used to prepare Dicke states. The proposed quantum circuit is similar. Similarly, all that satisfy... The proposed quantum circuits for preparing Dicke states can all be selected with similar circuit structures, which will not be elaborated here.

[0092] Correspondingly, when At that time, the proposed quantum circuit includes a second coding layer, k second parameter-variable layers, and a third coding layer, wherein:

[0093] The second coding layer includes nk X gates that operate on the odd-numbered qubits in the first 2 (nk) qubits respectively;

[0094] Each of the second parametric layering includes multiple parametric sub-modules that act sequentially on adjacent qubits;

[0095] The third coding layer includes n X gates that act on each qubit.

[0096] Specifically, such as Figure 4 As shown, when At this time, it exists Therefore, the preparation scheme can be understood as first preparing the Dicke state. Then, an X-gate is applied to each of the proposed qubits to flip the quantum state of each qubit, thereby preparing the Dicke state. For example, Figure 4 The proposed quantum circuit is used to prepare Dicke states. Therefore, the quantum circuit structure before the dashed line is similar to the one used in the previous embodiment for preparing the Dicke state. The proposed quantum circuit structure is exactly the same; only one X gate is applied to each of the six proposed qubits to prepare the Dicke state. Similarly, when At that time, it was used to prepare the Dicke state. The quantum circuit structure is similar to the above scheme, and will not be explained in detail here.

[0097] Step 202: Calculate the minimum expected value of the Hamiltonian of the problem to be solved in a preset number of subspaces, and determine the fitting relationship between each minimum expected value and the corresponding subspace number.

[0098] The subspace number is determined based on the difference between the two sub-Dicke state combinations.

[0099] Specifically, the subspaces can first be sorted and numbered based on the differences between the combinations of the two direct products of the sub-Dicke states corresponding to each subspace. In one specific implementation, based on the above-mentioned idea of ​​splitting quantum circuits using Dicke states, the number of qubits included in the two segments of each sub-circuit obtained by the splitting can be set to be the same, i.e., 260 qubits. Then, in the original hypothetical state space In the process of partitioning the basis vectors in the matrix into multiple non-overlapping subspaces, it can be done according to the previous... (or after) The number of excited states (i.e., the number of X gates) prepared from qubits is used to sort and number the subspace.

[0100] For example, the preparation of Dicke state is shown in Figure 3(C). The proposed quantum circuit can be numbered based on the number of X gates in the first three qubits of the sub-circuit (0, 1, 2, and 3 respectively). Then, the subspaces prepared by each sub-circuit are numbered accordingly. Subspace 0 contains only one type of basis vector, |000111>; subspace 1 contains multiple types of basis vectors, including |001011>, |001101>, ..., |100110>; subspace 2 contains multiple types of basis vectors, which will not be elaborated here; and subspace 3 contains only one type of basis vector, |111000>.

[0101] It can be seen that the Hamming distances between the binary strings corresponding to the basis vectors in different subspaces are different. For example, the Hamming distance between the basis vectors in subspace 0 and subspace 1 is 2, the Hamming distance between the basis vectors in subspace 0 and subspace 2 is 4, and the Hamming distance between the basis vectors in subspace 0 and subspace 3 is 6.

[0102] On the other hand, the Hamiltonian of the problem to be solved can be constructed according to the specific characteristics of the problem. For example, for the binary integer portfolio optimization problem, its mathematical model can be:

[0103] min x qx T Ax-μ T x

[0104] stξ=Π T x

[0105] Where x = (x1, x2, ..., x...) n ) T Select a vector for the asset, x i A value of 0 indicates that the i-th asset is not selected, and a value of 1 indicates that the i-th asset is selected. n represents the number of assets in the asset pool; q∈(0,∞) is the preset investment risk coefficient; μ is the historical expected return vector of the n assets, and A is the covariance matrix among the n assets; in the constraint term st, ξ represents the investment budget, and Π is the purchase price vector of the n assets. Without loss of generality, the price of each asset to be selected can be set to 1.

[0106] Specifically, this problem requires selecting a certain number of assets from n assets for investment in order to maximize returns under a given investment risk. The preset investment risk coefficient can be divided into conservative, balanced, and aggressive types based on the investor's risk preference, and the corresponding q values ​​can be 1.5, 1.0, and 0.5.

[0107] Therefore, the constraint term st of this model can be transformed into the penalty term ξ-Π. T x) 2 And incorporate it into the cost function term min x Therefore, the problem is transformed into a quadratic unconstrained binary optimization (QUBO) problem for solution. Furthermore, by setting the relation z = 1 - 2x, x can be further optimized. i ∈{0,1} and z i Connecting ∈{+1, -1}, the QUBO model is transformed into the following Ising model:

[0108] min z q′z T A′z-μ′ T z+{β(ξ′-Π T z) 2 } soft

[0109] Here, β is the penalty term coefficient. This problem can be solved using variational quantum algorithms such as the Variational Quantum Eigensolver (VQE) and the Quantum Approximate Optimization Algorithm (QAOA). In this scheme, the aforementioned variational quantum algorithm based on Dicke-state-based quantum circuits is selected to solve for the Hamiltonian expectation value by replacing z with the Pauli operator σ. Z The penalty term is then constrained into the hypothetical quantum circuit of the Dicke state, and the Ising model can be simplified to:

[0110] min z q′z T A′z-μ′ T z

[0111] Finally, by minimizing the expectation of the Hamiltonian H of the Ising model in the Dicke-state hypothesized quantum circuit output quantum state |ψ(θ)>, we can achieve the desired result. θ By using <ψ(θ)|H|ψ(θ)>, we can estimate the optimal portfolio composition.

[0112] Having obtained the Hamiltonian of the problem to be solved and multiple non-overlapping subspaces obtained by partitioning the proposed state space, to further reduce the computational complexity of this scheme, a predetermined number of subspaces containing a small number of basis vectors can be selected. For example, the subspaces with the smallest and largest subspace numbers can be removed first, because these two subspaces each contain only one type of basis vector and are not suitable for establishing a fitting relationship. Then, four subspaces containing the fewest basis vectors, excluding the two subspaces mentioned above, can be selected, and the minimum expected value of the Hamiltonian in each subspace can be calculated. A fitting relationship can then be established between each minimum expected value and the corresponding subspace number. In one implementation, this fitting relationship can be a functional relationship, which can be represented as a convex curve obtained based on interpolation.

[0113] Step 203: Determine the initial proposed parameters of the proposed quantum circuit based on the subspace indicated by the fitting relationship, and minimize the expected value of the Hamiltonian in the proposed state space as the expected value of the Hamiltonian of the proposed quantum circuit.

[0114] Specifically, since the aforementioned fitting relationship represents the minimum expected value corresponding to the optimal solution of each subspace, based on this fitting relationship, the approximate location of the optimal solution of the scheme in the entire proposed state space can be obtained. This location indicates a specific subspace. Furthermore, by reasonably setting the initial proposed parameters of the proposed quantum circuit to cover the basis vectors included in this subspace, the quantum state output by the proposed quantum circuit corresponding to the initial proposed parameters can be made close to the aforementioned optimal solution, thereby effectively alleviating the barren plateau problem. Finally, by minimizing the expected value of this Hamiltonian in the proposed state space, the expected value of the Hamiltonian of the proposed quantum circuit can be obtained.

[0115] As one embodiment of the present invention, the problem to be solved can be a combinatorial optimization problem, and the Dicke state prepared by the proposed quantum circuit... The method represents a linear combination of binary strings with n qubits and k excited states |1>, used to simulate various combination schemes for the combinatorial optimization problem. The method further includes:

[0116] The optimal combinatorial solution for the combinatorial optimization problem is determined based on the expected value of the Hamiltonian of the proposed quantum circuit.

[0117] Specifically, the problem to be solved can be a combinatorial optimization problem, such as shortest path selection, power grid optimization, and financial product selection. For example, in the financial investment field, the goal is to select k assets from n alternatives to invest in, aiming to maximize returns while controlling risk, or to achieve the desired returns while minimizing investment risk. The total number of possible combinations is [number missing]. At this point, Dicke states can be prepared using a proposed quantum circuit. A linear combination of binary strings with n qubits and k excited states (|1) can be used to simulate the portfolio optimization problem. There are several possible combinations. After minimizing the expected value of the Hamiltonian in the Dicke hypothetical state space for this portfolio optimization problem, and using this as the expected value of the Hamiltonian for the hypothetical quantum circuit, the quantum state corresponding to this expected value of the Hamiltonian can be determined. The binary string represented by this quantum state can then be extracted. In the binary string, a "1" at index i indicates that the i-th candidate asset should be selected, and a "0" indicates that the candidate asset should not be selected. Thus, the optimal combination scheme for this portfolio optimization problem can be obtained.

[0118] As can be seen, in the scheme provided by the embodiments of the present invention, the proposed quantum circuit includes n qubits, and each subspace is obtained by the direct product of two sub-Dicke states. The sum of the number of qubits used to encode the two sub-Dicke states is n. These multiple subspaces do not overlap, so the proposed state space output by the proposed quantum circuit can be represented as a linear combination of these multiple subspaces. Thus, the solution for the Hamiltonian expectation value of the proposed state space can be transformed into the solution for the Hamiltonian expectation value of each subspace. Furthermore, each subspace is numbered based on the difference between the two sub-Dicke state combinations. The subspace containing fewer basis vectors can be selected, its minimum expectation value can be calculated, and the fitting relationship between the minimum expectation value and the subspace number can be obtained. This fitting relationship can indicate the subspace where the basis vector is located when the Hamiltonian expectation value of the proposed quantum circuit is minimized. By reasonably setting the initial parameters of the proposed quantum circuit to cover the basis vectors included in the subspace, the problem of barren plateau can be effectively alleviated, the trainability of the variational quantum algorithm can be improved, and since this scheme does not need to solve all subspaces, the computational complexity can be reduced by fitting.

[0119] As one embodiment of the present invention, the fitting relationship can be a convex curve obtained by interpolation processing based on each minimum expected value and the corresponding subspace number. The determination of the initial design parameters of the proposed quantum circuit based on the subspace indicated by the fitting relationship can specifically include the following steps:

[0120] Step 501: Determine the subspace indicated by the minimum value of the convex curve as the target subspace.

[0121] Specifically, the fitting curves corresponding to the above fitting relationships can be as follows: Figure 5 As shown, the fitted curve is a convex curve obtained based on interpolation. The horizontal axis represents the subspace number, and the vertical axis represents the minimum expected value. By calculating the coordinates of at least two fitting points on each side, the convex curve can be fitted. The subspace indicated by the minimum point of the convex curve is the subspace where the optimal solution of the entire scheme is located, and this subspace can be defined as the target subspace. Specifically... Figure 5 The proposed curve shown corresponds to the target subspace numbered 5.

[0122] Step 502: Determine the initial design parameters of the proposed quantum circuit based on the output probability distribution of the proposed quantum circuit and the basis vectors included in the target subspace.

[0123] In one specific implementation, step 502, which determines the initial design parameters of the proposed quantum circuit based on the output probability distribution of the proposed quantum circuit and the basis vectors included in the target subspace, may specifically include the following steps:

[0124] Step 5021: For each preset proposed parameter, determine the output probability distribution of the proposed quantum circuit under the preset proposed parameter.

[0125] Step 5022: Determine the output probability distribution that has the highest similarity to the distribution of basis vectors included in the target subspace, and use the preset simulation parameters corresponding to the output probability distribution as the initial simulation parameters of the simulation quantum circuit.

[0126] Specifically, the output probability distribution of the Dicke-state pseudo-quantum circuit can be as follows: Figure 6 As shown, the preset parameters are the rotation angles of the controlled RY gate, which are 0, 0.25π, 0.4π, 0.6π, 0.75π, and π, respectively. Due to the trigonometric function distribution relationship between the amplitudes of the Dicke state basis vectors, it can be seen that as the rotation angle of the controlled RY gate increases from 0 to π, the types of quantum states output by the proposed quantum circuit first gradually increase and then gradually decrease, while its principal components also continuously shift to the right.

[0127] Still with Figure 5 Taking the target subspace numbered 5 as an example, the distribution of the basis vectors included in this target subspace is as follows: Figure 6 As shown by the broken line in (d), when the initial fitting parameter is 0.6π, the output probability distribution of this Dicke-state fitted quantum circuit can cover the distribution of the basis vectors included in the target subspace, and the similarity between the two is also the highest. Furthermore, when the initial fitting parameter is... When the time interval is between these parameters, the output probability of the proposed quantum circuit is smoother and more reliable. Therefore, the preset parameter 0.6π can be used as the initial parameter of the proposed quantum circuit.

[0128] In one specific implementation, the combinatorial optimization problem can be a binary integer combinatorial optimization problem, and the Hamiltonian can be constructed based on the following model:

[0129] min x qx T Ax-μ T x

[0130] stξ=Π T x

[0131] Where x = (x1, x2, ..., x...) n ) T Choose a vector for the target, x j A value of 0 indicates that the j-th target is not selected, and a value of 1 indicates that the j-th target is selected. n represents the number of targets to be selected; q∈(0,∞) is the preference coefficient; μ is the reward vector obtained by ranking the expected rewards of the n targets; A is the covariance matrix among the n targets; in the constraint term st, ξ represents the total selection cost, and Π is the cost vector of the n targets.

[0132] Specifically, since the dimensions of each subspace are different, meaning the number of basis vectors included in each subspace is different, and the overall distribution of the dimension number resembles a Gaussian distribution, the outer subspaces contain relatively fewer basis vectors, making them easier to solve. Based on practical experience in combinatorial optimization problems, it has been found that the fitting relationship between the minimum expected value and the corresponding subspace number can be altered by changing the sorting method of the selected objectives in the combinatorial optimization problem.

[0133] like Figure 7 As shown, by changing the sorting method of the selected objectives in the combinatorial optimization problem, the selected objectives are sorted according to the average expected return to obtain the return vector μ. Based on the sorted return vector μ, the covariance matrix A among the n objectives is determined, and the cost function is constructed, thereby obtaining the Hamiltonian of the binary integer combinatorial optimization problem. Finally, the position of the minimum value of the fitted curve is changed, making it more biased towards the outer subspace.

[0134] For example, in portfolio optimization problems, changing the asset ranking can alter the shape of the convex curve, thereby changing the distribution of the optimal solution. Based on this idea, we need to find an efficient asset ranking method that can stably transfer the optimal solution to the outer subspace. By verifying different ranking methods, we can determine that ranking according to the expected return of the selected assets achieves a more regular cost function landscape, and the optimal solution is distributed more to the right subspace, which is also more conducive to a smoother initialization of the proposed quantum circuit.

[0135] The solutions in these embodiments can be applied to examples in certain fields, such as portfolio optimization problems, where four assets can be selected from eight for investment. Such examples may include the following:

[0136] The stock names of the assets to be selected are: [Espressif Systems, Anheng Information, QuantumCTek, Aibo Medical, Kingsoft Office, Roborock Technology, CanSino Biologics Inc., BC Electronics].

[0137] The corresponding stock codes are: [688018, 688023, 688027, 688050, 688111, 688169, 688185, 688188]

[0138] Time range: May 31, 2021 – August 31, 2021, a total of 66 trading days.

[0139] Investor risk preference: Balanced, risk coefficient q = 1.0

[0140] (1) First, according to the set time range, extract the stock price information of the above 8 assets at the close of trading each day. Based on this information, calculate the average return vector μ of each asset and the covariance matrix between the assets. According to the average return of the assets (in ascending order), reorder the return vector μ. The reordered return vector is: μ = [-0.00522616, -0.00260969, -0.00112997, 0.00357325, 0.00360605, 0.00447746, 0.00469101, 0.00594948]. Then, based on the reordered return vector μ, construct the covariance matrix A and the cost function, and construct the Hamiltonian of this portfolio optimization problem.

[0141] (2) The pseudo-state space of the pseudo-quantum circuit output by the Dicke state containing 8 qubits. The system is divided into multiple non-overlapping subspaces, and the minimum value of the four outer subspaces is estimated. Based on the above scheme, a convex curve is fitted to estimate the location of the optimal solution. Then, according to the estimated location, the angle value of the corresponding position in the interval [0.5pi,pi] is taken as the initial value of the proposed parameter according to the proportion of that position in the right subspace. In the current example, the estimated optimal solution is in subspace 3, and the initial proposed parameter is set to 0.75pi.

[0142] (3) Figure 8 As shown, minimizing the above Hamiltonian in the hypothetical state space The expected value in the algorithm, after a certain number of iterations, converges to near the optimal solution. For example... Figure 9 As shown, based on the optimal solution sampled after the program converges, the optimal solution at this time is 00011110, which means that the optimal investment portfolio is determined to be [Aibo Medical, Kingsoft Office, Roborock Technology, CanSino Biologics-U].

[0143] (4) Finally, based on the obtained optimal asset allocation [Aibo Medical, Kingsoft Office, Roborock Technology, CanSino Biologics-U], the cumulative returns of the four assets' stocks over the 90 days following August 31, 2021, were verified; such as Figure 10 As shown, compared with the equal-weighted investment approach, the portfolio optimization method provided by the embodiment of the present invention can consistently achieve higher returns.

[0144] See Figure 11 , Figure 11 An apparatus for solving the expectation value of a proposed quantum circuit, provided in an embodiment of the present invention, may include:

[0145] Subspace module 1101 is used to divide the simulated state space of the Dicke state simulated quantum circuit output containing n qubits into multiple non-overlapping subspaces.

[0146] Each of the subspaces is obtained by the direct product of two sub-Dicke states, and the sum of the number of qubits used to encode the two sub-Dicke states is n.

[0147] The fitting module 1102 is used to calculate the minimum expected value of the Hamiltonian of the problem to be solved in a preset number of subspaces, and to determine the fitting relationship between each minimum expected value and the corresponding subspace number.

[0148] The subspace number is determined based on the difference between the two sub-Dicke state combinations.

[0149] The solver module 1103 is used to determine the initial proposed parameters of the proposed quantum circuit based on the subspace indicated by the fitting relationship, and to minimize the expected value of the Hamiltonian in the proposed state space as the expected value of the Hamiltonian of the proposed quantum circuit.

[0150] The specific functions and effects of the proposed quantum circuit Hamiltonian expectation value solving device can be explained by referring to other embodiments in this specification, and will not be repeated here. Each module in the proposed quantum circuit Hamiltonian expectation value solving device can be implemented entirely or partially through software, hardware, or a combination thereof. Each module can be embedded in or independent of the processor in a computer device in hardware form, or stored in the memory of a computer device in software form, so that the processor can call and execute the operations corresponding to each module.

[0151] Please see Figure 12 This specification also provides a computer device, including a memory and a processor. The memory stores a computer program, and the processor executes the computer program to implement the method for solving the expected value of the Hamiltonian of the proposed quantum circuit in any of the above embodiments. Please refer to [link to documentation]. Figure 12 The computer device can be a classical computer or a quantum computer.

[0152] This specification also provides a computer-readable storage medium storing a computer program thereon, which, when executed by a computer, causes the computer to perform the method for solving the expected value of the Hamiltonian of the proposed quantum circuit in any of the above embodiments.

[0153] This specification also provides a computer program product containing instructions that, when executed by a computer, cause the computer to perform the method for solving the expected value of the Hamiltonian of the proposed quantum circuit in any of the above embodiments.

[0154] It is understood that the specific examples in this specification are only intended to help those skilled in the art better understand the implementation methods described herein, and are not intended to limit the scope of the invention.

[0155] It is understood that in the various embodiments of this specification, the sequence number of each process does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not limit the implementation process of the embodiments of this specification in any way.

[0156] It is understood that the various implementation methods described in this specification can be implemented individually or in combination, and the implementation methods in this specification are not limited in this respect.

[0157] Unless otherwise stated, all technical and scientific terms used in the embodiments of this specification have the same meaning as commonly understood by one of ordinary skill in the art. The terminology used in this specification is for the purpose of describing particular embodiments only and is not intended to limit the scope of this specification. The term "and / or" as used in this specification includes any and all combinations of one or more of the associated listed items. The singular forms "a," "the," and "the" as used in the embodiments of this specification and the appended claims are also intended to include the plural forms unless the context clearly indicates otherwise.

[0158] It is understood that the processor in the embodiments of this specification can be an integrated circuit chip with signal processing capabilities. In implementation, each step of the above method embodiments can be completed by integrated logic circuits in the processor's hardware or by instructions in software form. The processor can be a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. It can implement or execute the methods, steps, and logic block diagrams disclosed in the embodiments of this specification. The general-purpose processor can be a microprocessor or any conventional processor. The steps of the methods disclosed in the embodiments of this specification can be directly implemented by a hardware decoding processor, or by a combination of hardware and software modules in the decoding processor. The software modules can reside in random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, registers, or other mature storage media in the art. This storage medium is located in memory; the processor reads information from the memory and, in conjunction with its hardware, completes the steps of the above methods.

[0159] It is understood that the memory in the embodiments of this specification may be volatile memory or non-volatile memory, or may include both volatile and non-volatile memory. Non-volatile memory may be read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), or flash memory. Volatile memory may be random access memory (RAM). It should be noted that the memory in the systems and methods described herein is intended to include, but is not limited to, these and any other suitable types of memory.

[0160] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this specification.

[0161] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the systems, devices, and units described above can be referred to the corresponding processes in the aforementioned method implementations, and will not be repeated here.

[0162] In the several embodiments provided in this specification, it should be understood that the disclosed systems, apparatuses, and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between devices or units may be electrical, mechanical, or other forms.

[0163] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment, depending on actual needs.

[0164] In addition, the functional units in the various embodiments of this specification can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.

[0165] If the aforementioned functions are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solutions of this specification, in essence, or the parts that contribute to the prior art, or parts of the technical solutions, can be embodied in the form of software products. These computer software products are stored in a storage medium and include several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this specification. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0166] The above description is merely a specific embodiment of this specification, but the scope of protection of this invention is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this specification should be included within the scope of protection of this specification. Therefore, the scope of protection of this invention should be determined by the scope of the claims.< / h>

Claims

1. A method for solving the expectation value of the Hamiltonian of a hypothetical quantum circuit, characterized in that, The method includes: Will include The simulated state space of the simulated quantum circuit output by a given number of Dicke states is divided into multiple non-overlapping subspaces; each subspace is obtained by the direct product of two sub-Dicke states, and the sum of the number of qubits used to encode the two sub-Dicke states is... ; From the subspaces excluding the subspaces with the smallest and largest subspace numbers, a predetermined number of subspaces with the fewest basis vectors are selected. The minimum expected value of the Hamiltonian of the problem to be solved in each selected subspace is calculated, and the fitting relationship between each minimum expected value and the corresponding subspace number is determined. The subspace number is determined based on the difference between the two sub-Dicke state combinations, and the fitting relationship is a convex curve obtained by interpolation processing based on each minimum expected value and the corresponding subspace number. The subspace indicated by the minimum value of the convex curve is determined as the target subspace; For each preset proposed parameter, the output probability distribution of the proposed quantum circuit under that preset proposed parameter is determined respectively; The output probability distribution with the highest similarity to the distribution of basis vectors included in the target subspace is determined. The preset simulation parameters corresponding to the output probability distribution are used as the initial simulation parameters of the simulated quantum circuit. The expected value of the Hamiltonian in the simulated state space is minimized and used as the expected value of the Hamiltonian of the simulated quantum circuit.

2. The method as described in claim 1, characterized in that, The problem to be solved is a combinatorial optimization problem, and the Dicke state prepared by the proposed quantum circuit is... The number of qubits is And excited state The quantity is Linear combinations of binary strings are used to simulate various combinatorial schemes for the combinatorial optimization problem. The method further includes: The optimal combinatorial solution for the combinatorial optimization problem is determined based on the expected value of the Hamiltonian of the proposed quantum circuit.

3. The method as described in claim 2, characterized in that, The numbering of the qubits satisfy ,when At that time, the proposed quantum circuit includes a first coding layer and The first parameterized layer, wherein: The first coding layer includes layers that act on the front Of the qubits, the qubits numbered odd-numbered... One X gate; Each of the first parametric layering includes multiple parametric sub-modules that act sequentially on adjacent qubits.

4. The method as described in claim 3, characterized in that, when At that time, the proposed quantum circuit includes a second coding layer, A second parametric layer and a third coding layer, wherein: The second coding layer includes layers that act on the front. Of the qubits, the qubits numbered odd-numbered... One X gate; Each of the second parametric layering includes multiple parametric sub-modules that act sequentially on adjacent qubits; The third coding layer includes operations on each qubit. A door of X.

5. The method as described in claim 3 or 4, characterized in that, The parametric variational module includes a CNOT gate, a controlled RY gate, and a CNOT gate cascaded in sequence; wherein, the control bit of the CNOT gate is the high-order bit among the adjacent qubits, and the target bit is the low-order bit among the adjacent qubits; the control bit of the controlled RY gate is the low-order bit, and the target bit is the high-order bit.

6. The method as described in claim 2, characterized in that, The combinatorial optimization problem is a binary integer combinatorial optimization problem, and the Hamiltonian is constructed based on the following model: in, Select a vector for the target. A value of 0 indicates that the first option is not selected. The target is selected when the value is 1. One goal, Indicates the number of targets to be selected; This is the preference coefficient; Based on the The return vector obtained by sorting the expected returns of each objective. For the The covariance matrix between the objectives; under the constraint terms middle, This represents the total selection cost. For the The cost vector of each objective.

7. A device for solving the expectation value of a proposed quantum circuit's Hamiltonian, characterized in that, The device includes: Subspace modules are used to contain The simulated state space of the simulated quantum circuit output by a given number of Dicke states is divided into multiple non-overlapping subspaces; each subspace is obtained by the direct product of two sub-Dicke states, and the sum of the number of qubits used to encode the two sub-Dicke states is... ; The fitting module is used to select a preset number of subspaces containing the fewest basis vectors from the subspaces other than the subspaces with the smallest and largest subspace numbers, calculate the minimum expected value of the Hamiltonian of the problem to be solved in the selected subspaces, and determine the fitting relationship between each minimum expected value and the corresponding subspace number; wherein, the subspace number is determined based on the difference between the two sub-Dicke state combinations, and the fitting relationship is a convex curve obtained by interpolation processing based on each minimum expected value and the corresponding subspace number; The solution module is used to determine the subspace indicated by the minimum value of the convex curve as the target subspace; for each preset simulation parameter, it determines the output probability distribution of the proposed quantum circuit under the preset simulation parameter; it determines the output probability distribution with the highest similarity to the distribution of the basis vectors included in the target subspace, uses the preset simulation parameter corresponding to the output probability distribution as the initial simulation parameter of the proposed quantum circuit, and minimizes the expected value of the Hamiltonian in the simulation state space as the expected value of the Hamiltonian of the proposed quantum circuit.

8. A storage medium, characterized in that, The storage medium stores a computer program, wherein the computer program is configured to execute the method described in any one of claims 1-6 when it is run.

9. An electronic device comprising a memory and a processor, characterized in that, The memory stores a computer program, and the processor is configured to run the computer program to perform the method described in any one of claims 1-6.

Citation Information

Patent Citations

  • Quantum computing method and related device

    CN115545210A

  • Method for measuring Hamiltonian expected value of physical system and related device

    CN117634622A