Parameter adjustment method and device of quantum circuit, equipment and medium

By constructing a gradient acquisition circuit and utilizing the specified mapping relationship between two proposed sub-circuits, the number of qubit measurements is reduced, the measurement efficiency of quantum circuit parameter adjustment is improved, and the problem of low measurement efficiency in existing technologies is solved.

CN116894492BActive Publication Date: 2026-01-06ORIGIN QUANTUM COMPUTING TECH (HEFEI) CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310875805.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-07-17
Publication Date
2026-01-06
Estimated Expiration
2043-07-17

AI Technical Summary

Technical Problem

In existing technologies, adjusting the parameters of quantum circuits requires measuring a large number of qubits, resulting in low measurement efficiency.

Method used

Two proposed sub-circuits with identical circuit structures and specified parameter mapping relationships are used. By constructing gradients to obtain the circuit, the parameters are adjusted using the measurement results of a smaller number of qubits, thereby reducing the number of qubits to be measured.

Benefits of technology

The measurement efficiency of quantum circuit parameter adjustment has been improved, the number of qubits to be measured has been reduced, and the measurement method has been improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116894492B_ABST
    Figure CN116894492B_ABST
Patent Text Reader

Abstract

The present specification embodiment provides a parameter adjustment method, device, equipment and medium of a quantum circuit. The quantum circuit comprises two hypothetical sub-circuits with the same circuit structure, and the parameters of the two hypothetical sub-circuits have a specified mapping relationship; the method comprises: for any hypothetical sub-circuit, constructing a gradient obtaining circuit; wherein the gradient obtaining circuit is used to obtain the gradient of a specified probability according to the parameters of the hypothetical sub-circuit; the specified probability is used to represent the probability that the states of the quantum bits regulated by the two hypothetical sub-circuits are the same; adjusting the parameters of the two hypothetical sub-circuits according to the measurement result of the gradient obtaining circuit; wherein the number of quantum bits measured to obtain the measurement result of the gradient obtaining circuit is less than the number of quantum bits measured to obtain the measurement result of any hypothetical sub-circuit. Through the present specification embodiment, the number of quantum bits required to be measured for adjusting the parameters of the hypothetical sub-circuit is reduced, and the measurement efficiency is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments described in this specification relate to the field of quantum computing, specifically to a method, apparatus, device, and medium for adjusting the parameters of a quantum circuit. Background Technology

[0002] With the continuous development of quantum computing technology, more and more quantum computing tasks can be achieved through parametric quantum circuits with known circuit structures. Specifically, parametric quantum circuits can be trained so that the states of multiple qubits after the trained parametric quantum circuit is controlled can characterize the target data of the quantum computing task.

[0003] The key to training parametric quantum circuits lies in adjusting the circuit's parameters, which is primarily based on the difference between the parametric quantum circuit's output and the target data of the quantum computing task. In related technologies, to obtain the output of a parametric quantum circuit, it is necessary to measure all the qubits controlled by the circuit, obtaining a direct measurement result, which is then used as the circuit's output.

[0004] Therefore, the related technologies suffer from the problem that adjusting the parameters of quantum circuits requires measuring a large number of qubits, resulting in low measurement efficiency. Summary of the Invention

[0005] In view of this, various embodiments of this specification aim to provide a method, apparatus, device, and medium for adjusting the parameters of a quantum circuit, so as to improve the efficiency of measurements performed for adjusting the parameters of a quantum circuit.

[0006] One embodiment of this specification provides a method for adjusting the parameters of a quantum circuit, the method being applied to a quantum computing system; the quantum circuit includes two proposed sub-circuits with identical circuit structures, and the parameters of the two proposed sub-circuits have a specified mapping relationship; the method includes: constructing a gradient acquisition circuit for any of the proposed sub-circuits; wherein the gradient acquisition circuit is used to acquire a gradient of a specified probability based on the parameters of the proposed sub-circuit; the specified probability is used to represent the probability that the qubits operated by the two proposed sub-circuits are in the same state; adjusting the parameters of the two proposed sub-circuits based on the measurement results of the gradient acquisition circuit; wherein the number of qubits measured to obtain the measurement results of the gradient acquisition circuit is less than the number of qubits measured to obtain the measurement results of any of the proposed sub-circuits.

[0007] One embodiment of this specification provides a method for adjusting the parameters of a quantum circuit, the method being applied to a basic computing unit in a quantum computing system; the quantum circuit includes two proposed sub-circuits with identical circuit structures, and the parameters of the two proposed sub-circuits have a specified mapping relationship; the method includes: for any of the proposed sub-circuits, generating a gradient acquisition quantum program for constructing a gradient acquisition circuit; wherein the gradient acquisition circuit is used to acquire a gradient with a specified probability based on the parameters of the proposed sub-circuit; the specified probability is used to represent the probability that the qubits operated by the two proposed sub-circuits are in the same state; sending the gradient acquisition quantum program to a quantum computing unit belonging to the same quantum computing system; adjusting the parameters of the two proposed sub-circuits based on the measurement results of the gradient acquisition circuit fed back by the quantum computing unit; and sending the adjusted parameters of the proposed sub-circuit to the quantum computing unit; wherein the number of qubits measured to obtain the measurement results of the gradient acquisition circuit is less than the number of qubits measured to obtain the measurement results of any of the proposed sub-circuits.

[0008] One embodiment of this specification provides a method for adjusting the parameters of a quantum circuit, the method being applied to a quantum computing unit in a quantum computing system; the quantum circuit includes two proposed sub-circuits with identical circuit structures, and the parameters of the two proposed sub-circuits have a specified mapping relationship; the method includes: receiving a gradient acquisition quantum program sent by a basic computing unit belonging to the same quantum computing system for constructing a gradient acquisition circuit; wherein the gradient acquisition circuit is used to acquire a gradient with a specified probability according to the parameters of the proposed sub-circuit; the specified probability is used to represent the probability that the qubits operated by the two proposed sub-circuits are in the same state; constructing a gradient acquisition circuit according to the gradient acquisition quantum program for any proposed sub-circuit; measuring the gradient acquisition circuit to obtain a measurement result of the gradient acquisition circuit; and feeding back the measurement result of the gradient acquisition circuit to the basic computing unit for the basic computing unit to adjust the parameters of the two proposed sub-circuits according to the measurement result of the gradient acquisition circuit; wherein the number of qubits measured to obtain the measurement result of the gradient acquisition circuit is less than the number of qubits measured to obtain the measurement result of any proposed sub-circuit.

[0009] One embodiment of this specification provides a parameter adjustment device for a quantum circuit, the device being applied to a quantum computing system; the quantum circuit includes two proposed sub-circuits with identical circuit structures, and the parameters of the two proposed sub-circuits have a specified mapping relationship; the device includes: a construction module, configured to construct a gradient acquisition circuit for any of the proposed sub-circuits; wherein the gradient acquisition circuit is used to acquire a gradient with a specified probability based on the parameters of the proposed sub-circuit; the specified probability is used to represent the probability that the qubits operated by the two proposed sub-circuits are in the same state; an adjustment module, configured to adjust the parameters of the two proposed sub-circuits based on the measurement results of the gradient acquisition circuit; wherein the number of qubits measured to obtain the measurement results of the gradient acquisition circuit is less than the number of qubits measured to obtain the measurement results of any of the proposed sub-circuits.

[0010] This specification 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 methods described in the above embodiments.

[0011] This specification provides a computer-readable storage medium storing computer program instructions that, when executed by a processor, implement the methods described in the above embodiments.

[0012] In several embodiments provided in this specification, a gradient acquisition circuit is first constructed for one of two proposed sub-circuits with identical circuit structures and specified parameter mapping relationships among the two proposed sub-circuits included in the quantum circuit. Then, the parameters of the two proposed sub-circuits are adjusted based on the measurement results of the gradient acquisition circuit. Since the number of qubits measured to obtain the measurement results of the gradient acquisition circuit is less than the number of qubits measured to obtain the measurement results of any proposed sub-circuit, it is possible to adjust the parameters of the proposed sub-circuit based on the measurement results of a smaller number of qubits. This reduces the number of qubits that need to be measured to adjust the parameters of the proposed sub-circuit, improves the measurement method for adjusting quantum circuit parameters, and improves the measurement efficiency to a certain extent. Attached Figure Description

[0013] To more clearly illustrate the technical solutions in the embodiments of the present invention, 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 the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0014] Figure 1 A schematic diagram of a quantum computing system provided for one embodiment of this specification.

[0015] Figure 2This is a flowchart illustrating a method for adjusting the parameters of a quantum circuit according to one embodiment of this specification.

[0016] Figure 3 A schematic diagram of the overall quantum circuit for implementing a method for adjusting the parameters of a quantum circuit, as provided in one embodiment of this specification.

[0017] Figure 4 This is a flowchart illustrating a method for constructing a quantum circuit according to one embodiment of this specification.

[0018] Figure 5 This is a flowchart illustrating a method for adjusting the parameters of a quantum circuit, provided as another embodiment of this specification.

[0019] Figure 6 This is a flowchart illustrating a method for adjusting the parameters of a quantum circuit, provided as another embodiment of this specification.

[0020] Figure 7 A schematic diagram of a parameter adjustment device for a quantum circuit provided in one embodiment of this specification.

[0021] Figure 8 A schematic diagram of a quantum circuit construction apparatus provided for one embodiment of this specification.

[0022] Figure 9 A schematic diagram of a computer device provided for one embodiment of this specification. Detailed Implementation

[0023] Parametric quantum circuits can alter the state of qubits by changing the parameters of the quantum logic gates within the circuit, without changing the circuit structure itself. Therefore, an initial parametric quantum circuit with a known structure can be used as a circuit model, and the target data of the quantum computing task can be used as the target output of the circuit. The circuit model can be trained by iteratively adjusting its parameters based on the difference between the initial parametric quantum circuit's output and the target output, so that the model's output approximates the target output.

[0024] In related technologies, to obtain the output of the circuit model, it is necessary to measure all the qubits controlled by the circuit model. The measurement results of all the qubits controlled by the circuit model are then used as the direct measurement results of the circuit model, and these direct measurement results are used as the output of the circuit model. For more complex quantum computing tasks, the number of qubits that the circuit model needs to control may be large. Measuring all the qubits controlled by the circuit model takes a long time, consumes a lot of resources, and has low measurement efficiency.

[0025] Therefore, it is necessary to provide a method for adjusting the parameters of a quantum circuit. This method involves first constructing a gradient acquisition circuit for any one of two proposed sub-circuits with identical circuit structures and specified parameter mapping relationships. Then, the parameters of the two proposed sub-circuits are adjusted based on the measurement results from this gradient acquisition circuit. Since the number of qubits measured to obtain the measurement results from the gradient acquisition circuit is less than the number of qubits measured to obtain the measurement results from any one proposed sub-circuit, it is possible to adjust the parameters of the proposed sub-circuit based on the measurement results of a smaller number of qubits. This reduces the number of qubits that need to be measured to adjust the parameters of the proposed sub-circuit, improves the measurement method for adjusting quantum circuit parameters, and to some extent increases measurement efficiency.

[0026] One embodiment of this specification provides an example application scenario of a method for adjusting the parameters of a quantum circuit. This method can be implemented using a quantum computing system. The quantum computing system may include basic computing units and quantum computing units. In this example scenario, a user may wish to adjust the parameters of a quantum circuit used to perform a specified quantum computing task based on measurements of a small number of qubits.

[0027] Taking the example of performing matrix diagonalization on a self-conjugate matrix for a specific quantum computing task, we know from the properties of self-conjugate matrices that the transpose of the matrix is ​​equal to itself. Please refer to Equation 1. The matrix diagonalization operation can be performed on a self-conjugate matrix according to the following formula:

[0028] H = VDV + Formula 1

[0029] Where H represents the self-conjugate matrix, V represents the orthogonal matrix formed by arranging the eigenvectors of the self-conjugate matrix in rows, and D represents the diagonal matrix whose diagonal elements are the eigenvalues ​​of the self-conjugate matrix. + Let V denote the transpose and conjugate of an orthogonal matrix V.

[0030] The quantum circuit used to perform this quantum computing task may include a data loading unit and two proposed sub-circuits with known and identical circuit structures. The data loading unit is used to excite multiple qubits in their ground state to a specified state, such that the multiple qubits in the specified state can represent the self-conjugate matrix H. The quantum logic gate parameters included in the data loading unit are immutable. The two proposed sub-circuits are used to represent V and V0, respectively. + Each proposed sub-circuit includes multiple rotating Pauli gates and an entanglement unit. The number of rotating Pauli gates in each proposed sub-circuit is determined by the task precision of the quantum computing task. The parameters of the multiple rotating Pauli gates are variable, and the parameters of the two proposed sub-circuits have a specified mapping relationship, so that the parameters of the two proposed sub-circuits can be adjusted synchronously.

[0031] The number of qubits controlled by this quantum circuit can be determined by the order of the self-conjugation matrix. Taking a self-conjugation matrix whose order is a positive integer power of 2 as an example, in this case, an even number of entangled qubits can be used to represent the self-conjugation matrix. Specifically, the basic computing unit in the quantum computing system can receive an N-order self-conjugation matrix (N is a positive integer power of 2) input by the user, perform quantum state encoding on the matrix elements of this even-order self-conjugation matrix according to the amplitude encoding rule, obtain quantum state data representing the specified state, and send this quantum state data to the quantum computing unit of the quantum computing system. After receiving the quantum state data sent by the basic computing unit, the quantum computing unit can operate on 2n independent qubits in the ground state through the quantum logic gates included in the data loading unit, making the 2n qubits entangled and in the specified state represented by the quantum state data. Please refer to Equation 2. After the operation by the data loading unit, the 2n entangled qubits are in the following states:

[0032]

[0033] in, Let represent all possible states of 2n mutually entangled qubits, N represent the order of the self-conjugate matrix, |i> represent each possible state of the 2n mutually entangled qubits, and α i Let |α| represent the amplitude corresponding to each state, where |α| i | 2 It can represent the probability corresponding to each state, or it can be used as the value of the i-th element in the self-conjugate matrix. Please refer to Equation 3. The relationship between N and n is as follows:

[0034] n = log₂N (Formula 3)

[0035] Next, the quantum computing unit can manipulate 2n qubits in a specified state through two hypothetical sub-circuits, where any one hypothetical sub-circuit manipulates n qubits. Please refer to Equation 4. The states of the 2n qubits after manipulation by the two hypothetical sub-circuits are as follows:

[0036]

[0037] Among them, U(θ) and U * (θ) represents a proposed sub-circuit in matrix form. Denotes the Kronecker product of two matrices. This represents all possible states that 2n entangled qubits in a specified state can be in after being controlled by two hypothetical subcircuits, where N still represents the order of the self-conjugate matrix, f i (θ1,…,θ m )and Let each of the following be a proposed sub-circuit in functional form, where m represents the number of rotating Pauli gates in the proposed sub-circuit, and θ1,…,θ m Let |i> and |j> represent the parameters of each rotating Pauli gate, where |i> and |j> represent the possible states of n entangled qubits in a specified state after being controlled by a hypothetical subcircuit. This represents the amplitude corresponding to each state.

[0038] From Equations 3 and 4, it can be seen that the 2n mutually entangled qubits after being controlled by the two proposed sub-circuits may be in N states. 2 There are n states, and the probability corresponding to each state can be represented by a matrix element in a diagonal matrix D, with the sum of the probabilities of each state equal to 1. The goal of adjusting the parameters of this quantum circuit is to adjust the parameters of two proposed sub-circuits so that the 2n qubits controlled by the two proposed sub-circuits can represent the diagonal matrix D. However, since all elements in the diagonal matrix D except for the diagonal elements are 0, the goal of adjusting the parameters of this quantum circuit can be transformed into adjusting the parameters of the two proposed sub-circuits so that the aforementioned N... 2 The sum of the probabilities of the diagonal elements representing D in the probabilities corresponding to each state tends to 1, while the probabilities of the remaining elements tend to 0.

[0039] The probability representing the diagonal elements of D can be the probability corresponding to the quantum state where the n qubits are in the same state after being controlled by two proposed sub-circuits, i.e., the specified probability. In this case, we can let i = j in the terms on the right-hand side of Equation 4. Please refer to Equation 5. When the n qubits are in the same state after being controlled by two proposed sub-circuits, the states of the 2n qubits after being controlled by the two proposed sub-circuits are as follows:

[0040]

[0041] The meaning of each symbol in Formula 5 is the same as the meaning of the same symbol in Formula 4.

[0042] At this point, the parameters of the proposed sub-circuit of the quantum circuit can be adjusted using the parameter adjustment method of the quantum circuit. Specifically, the basic computing unit can generate a gradient acquisition quantum program for constructing a gradient acquisition circuit for any proposed sub-circuit and send the gradient acquisition quantum program to the quantum computing unit. The gradient acquisition quantum program is used to acquire gradients with a specified probability, and can be a package consisting of multiple gradient component acquisition quantum programs for constructing gradient component acquisition circuits. After receiving the gradient acquisition quantum program, the quantum computing unit can first determine the proposed sub-circuit targeted by the quantum program, and then construct gradient component acquisition circuits for each of the multiple rotating Pauli gates included in the proposed sub-circuit based on the gradient acquisition quantum program, and measure the auxiliary qubits in the gradient component acquisition circuits. Please refer to Equations 6 to 8.

[0043]

[0044] Among them, f i (θ1,…,θ k +π,…,θ m Let θ represent a proposed sub-circuit in functional form. k This represents the parameter of the k-th rotating Pauli gate in the proposed sub-circuit.

[0045]

[0046] Where p represents a specified probability, p′ k Indicates p at θ k The gradient component in the direction.

[0047]

[0048] Where p(|1>) represents the probability that the auxiliary qubit in the gradient component acquisition line is in the state of |1>, f i f i (θ1,…,θ m (abbreviation) for abbreviation, for abbreviation, f i * f i * (θ1,…,θ m abbreviation of ) f i * (θ k +π) is f i * (θ1,…,θ k +π,…,θm (abbreviation of ).

[0049] As shown in Equations 6 to 8, based on the measurement result of the probability that the auxiliary qubit of any gradient component acquisition circuit is in the |1> state, the gradient component in the direction of the gate parameter of the rotating Pauli gate corresponding to that gradient component acquisition circuit with a specified probability can be obtained. After completing the construction and measurement of all gradient component acquisition circuits, the quantum computing unit can feed back the measurement results of all gradient component acquisition circuits to the basic computing unit.

[0050] After receiving the measurement results of all gradient components, the basic computing unit can process these results. First, it performs a numerical transformation on the measurement results of each gradient component according to Formula 8 above to obtain multiple gradient components. Then, it obtains a gradient with a specified probability based on these multiple gradient components. Next, the basic computing unit can simultaneously change at least some parameters of the two proposed sub-circuits according to a specified step size to obtain the adjusted parameters of the two proposed sub-circuits, and then send the adjusted parameters of the two proposed sub-circuits to the quantum computing unit.

[0051] In this scenario example, by measuring the gradient components to obtain the auxiliary qubits in the circuit, the gradient components with a specified probability in the direction of the gate parameter of the rotating Pauli gate corresponding to the gradient component acquisition circuit are obtained. The gradient with a specified probability is obtained based on multiple gradient components, and the parameters of the proposed sub-circuit are adjusted based on the gradient. This allows the quantum circuit parameters to be adjusted based on the measurement results of a small number of qubits, thus improving the measurement method for adjusting quantum circuit parameters and increasing the efficiency of the measurement performed for adjusting quantum circuit parameters.

[0052] The above description is merely a scenario example provided in this specification and is not intended to limit the present invention. Any modifications, equivalent substitutions, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.

[0053] Please see Figure 1 One embodiment of this specification provides a parameter adjustment system for a quantum circuit. This system can be implemented using a quantum computing system. The quantum computing system may include basic computing units and quantum computing units.

[0054] A basic computing unit can be an electronic device with a certain level of computing and display capabilities. Specifically, for example, a basic computing unit can include desktop computers, tablets, laptops, smartphones, smart TVs, and smart wearable devices equipped with displays. A basic computing unit may include a network communication module, a processor, and memory.

[0055] In some implementations, the basic computing unit can act as a client. Alternatively, the basic computing unit can be deployed with client software. The basic computing unit can send specified data or data computation tasks to the quantum computing unit for computation, receive the quantum computation results from the quantum computing unit, and process and display the quantum computation results from the quantum computing unit.

[0056] Based on existing computer architecture, the basic computing unit may also include servers or workstations. The server can be a distributed server, or a system with multiple processors, memory, network communication modules, etc., operating collaboratively. Alternatively, the server can be a server cluster formed by several servers. The basic computing unit can process the quantum computation results fed back by the quantum computing unit through the server or workstation, and then send the processing results to the client for display.

[0057] A quantum computing unit can be a device that utilizes the properties of quantum mechanics to achieve quantum computing. Specifically, a quantum computing unit can use the quantum states of qubits as data carriers, and drive the evolution of qubits based on the principle of linear superposition of quantum states to achieve a specified computation process. For example, a quantum computing unit can be a superconducting qubit control circuit based on ultra-low temperature technology. Alternatively, a quantum computing unit can be a qubit control circuit built using quantum well technology. Of course, a quantum computing unit can also be an integrated optical quantum chip, etc.

[0058] The basic computing unit and the quantum computing unit can communicate with each other. For example, they can communicate via a wired connection. Alternatively, they can communicate wirelessly via a network communication module.

[0059] Please see Figure 2 One embodiment of this specification provides a method for adjusting the parameters of a quantum circuit, applied to a quantum computing system; the quantum circuit includes two proposed sub-circuits with identical circuit structures, and the parameters of the two proposed sub-circuits have a specified mapping relationship. The method for adjusting the parameters of the quantum circuit may include the following steps.

[0060] Step 110: For any of the proposed sub-circuits, construct a gradient acquisition circuit; wherein, the gradient acquisition circuit is used to acquire a gradient with a specified probability according to the parameters of the proposed sub-circuit; the specified probability is used to represent the probability that the qubits controlled by the two proposed sub-circuits are in the same state.

[0061] In this embodiment, since the parameters of the two proposed sub-circuits have a specified mapping relationship, a gradient acquisition circuit for obtaining a specified probability gradient can be constructed for only one proposed sub-circuit.

[0062] In this embodiment, the proposed sub-circuit can be a parameterized quantum circuit with a known circuit structure. Specifically, for example, the circuit structure can be used to determine the number of quantum logic gates included in the proposed sub-circuit, the type and operation order of each quantum logic gate, and the number of qubits controlled. Two proposed sub-circuits with the same circuit structure can have the same number of quantum logic gates, the same type and operation order of each quantum logic gate, and the same number of qubits controlled. The gate parameters of each quantum logic gate included in the proposed sub-circuit can be adjusted, and the parameters of the two proposed sub-circuits can be adjusted synchronously according to a specified mapping relationship.

[0063] In this embodiment, the parameters of the proposed sub-circuit can be the gate parameters of the multiple quantum logic gates included in the proposed sub-circuit.

[0064] In this embodiment, the gradient acquisition circuit may include multiple gradient component acquisition circuits. Specifically, for example, each quantum logic gate included in a proposed sub-circuit may correspond to one gradient component acquisition circuit, and the number of gradient component acquisition circuits included in the gradient acquisition circuit may be determined by the number of quantum logic gates included in a proposed sub-circuit.

[0065] In this embodiment, the gradient of a specified probability can be a vector composed of gradient components of the specified probability along the gate parameter directions of the multiple quantum logic gates included in the proposed sub-circuit. The gradient of the specified probability can point in the direction of the maximum rate of change of the specified probability, and changing the specified probability along this direction can make the specified probability reach its extreme value as quickly as possible.

[0066] In this embodiment, since the number of qubits controlled by the two proposed sub-circuits is the same, the same state of qubits controlled by the two proposed sub-circuits can mean that the states of multiple qubits controlled by the first proposed sub-circuit and the states of multiple qubits controlled by the second proposed sub-circuit are the same. Specifically, taking the example that each proposed sub-circuit can control 3 qubits, the same state of qubits controlled by the two proposed sub-circuits can mean that the states of the 3 qubits controlled by the first proposed sub-circuit and the states of the 3 qubits controlled by the second proposed sub-circuit are both |001>.

[0067] In this embodiment, for any proposed sub-circuit, a gradient acquisition circuit is constructed. This can be achieved by generating a gradient acquisition quantum program for any proposed sub-circuit using the basic computing unit in the quantum computing system. The gradient acquisition quantum program is then sent to the quantum computing unit in the quantum computing system. Upon receiving the gradient acquisition quantum program, the quantum computing unit first determines the corresponding proposed sub-circuit based on the gradient acquisition quantum program, and then runs the gradient acquisition quantum program to determine the number of qubits controlled by the gradient acquisition circuit, the included quantum logic gates, the operation order of each quantum logic gate, and the control relationship between the state of the qubits and the operation of the quantum logic gates, thereby establishing the gradient acquisition circuit.

[0068] In some implementations, the basic computing unit may also package and send a quantum program for constructing a proposed sub-circuit and a quantum program for constructing a gradient acquisition circuit for the proposed sub-circuit to the quantum computing unit. After receiving the quantum program package, the quantum computing unit directly runs the quantum program package to simultaneously construct a proposed sub-circuit and a gradient acquisition circuit for the proposed sub-circuit.

[0069] Step 120: Adjust the parameters of the two proposed sub-circuits according to the measurement results of the gradient acquisition circuit; wherein the number of qubits measured to obtain the measurement results of the gradient acquisition circuit is less than the number of qubits measured to obtain the measurement results of either proposed sub-circuit.

[0070] In this embodiment, after the gradient acquisition circuit is constructed, the parameters of the two proposed sub-circuits can be adjusted synchronously based on the measurement results of the gradient acquisition circuit and the specified mapping relationship between the parameters of the two proposed sub-circuits. To obtain the measurement results of the gradient acquisition circuit, only the auxiliary qubits of the gradient acquisition circuit need to be measured, while to obtain the measurement results of any proposed sub-circuit, all the qubits controlled by that proposed sub-circuit need to be measured. Therefore, the number of qubits measured to obtain the measurement results of the gradient acquisition circuit is less than the number of qubits measured to obtain the measurement results of any proposed sub-circuit, thereby enabling the adjustment of quantum circuit parameters based on the measurement results of a smaller number of qubits.

[0071] In this embodiment, the measurement results of the gradient acquisition circuit can be used to obtain a gradient with a specified probability. Specifically, when the gradient acquisition circuit includes multiple gradient component acquisition circuits, the measurement results of the gradient acquisition circuit can include the measurement results of auxiliary qubits in the multiple gradient component acquisition circuits. For example, for each gradient component acquisition circuit, after the quantum logic gates included in the circuit complete the operation on the qubit, the auxiliary qubit can be measured to obtain the measurement result of the auxiliary qubit in the gradient component acquisition circuit.

[0072] In this embodiment, the parameters of two proposed sub-circuits are adjusted based on the measurement results of the gradient acquisition circuit. This adjustment can be achieved by using the measurement results of the gradient acquisition circuit to adjust the parameters of the proposed sub-circuit corresponding to that gradient acquisition circuit, and simultaneously adjusting the parameters of the other proposed sub-circuit based on a specified mapping relationship between the parameters of the two proposed sub-circuit line. Specifically, for example, after the quantum computing unit of the quantum computing system measures the auxiliary qubits in the multiple gradient component acquisition circuits included in the gradient acquisition circuit and obtains the measurement results of all gradient component acquisition circuits, it can send these measurement results to the basic computing unit. Upon receiving the measurement results, the basic computing unit can process them to obtain a gradient with a specified probability, and then, based on this gradient, simultaneously change the parameters of the two proposed sub-circuit line parameters according to a specified step size and a specified mapping relationship between the parameters of the two proposed sub-circuit line.

[0073] In the embodiments described in this specification, a gradient acquisition circuit is first constructed for one of two proposed sub-circuits that have the same circuit structure and whose parameters have a specified mapping relationship. Then, the parameters of the two proposed sub-circuits are adjusted based on the measurement results of the gradient acquisition circuit. Since only the auxiliary qubits of the gradient acquisition circuit need to be measured to obtain the measurement results of the gradient acquisition circuit, while all the qubits controlled by the proposed sub-circuit need to be measured to obtain the measurement results of any proposed sub-circuit, the parameters of the proposed sub-circuit can be adjusted based on the measurement results of a smaller number of qubits. This reduces the number of qubits that need to be measured to adjust the parameters of the proposed sub-circuit, improves the measurement method for adjusting the parameters of the quantum circuit, and improves the measurement efficiency to a certain extent.

[0074] In some embodiments, the quantum circuit can be used to perform matrix diagonalization on the self-conjugate matrix. Any of the proposed sub-circuits can be used to control multiple qubits in a specified state, such that the qubits controlled by the two proposed sub-circuits can represent a diagonal matrix formed by the eigenvalues ​​of the self-conjugate matrix.

[0075] Typically, when performing quantum computing tasks using a parameterized quantum circuit with a known circuit structure, a suitable parameterized sub-circuit can be selected from the existing circuit structure based on the task conditions, parameters, and objectives of the quantum computing task. The parameterized sub-circuit is then trained, and its output is used to represent the target data of the quantum computing task.

[0076] When performing matrix diagonalization of self-conjugate matrices using quantum circuits, the task is complex due to the need to decompose the self-conjugate matrix into multiple matrices of different types, resulting in complex task conditions and parameters. Measuring all qubits controlled by the parametric pseudo-circuit and then adjusting its parameters based on the measurement results could lead to slow training speed and high resource consumption. Therefore, training the parametric pseudo-circuit based on the measurement results obtained from the gradient can accelerate the training process and conserve resources.

[0077] In this embodiment, the goal of performing matrix diagonalization on the self-conjugate matrix is ​​to obtain a diagonal matrix with the same order as the self-conjugate matrix, and whose diagonal elements are the eigenvalues ​​of the self-conjugate matrix. The matrix elements of this diagonal matrix can be characterized by the probabilities of the various states that multiple qubits may be in after being controlled by two hypothetical sub-circuits.

[0078] In this embodiment, either of the two proposed sub-circuits can be used to characterize an orthogonal matrix formed by arranging multiple eigenvectors of the self-conjugate matrix in rows, and the other proposed sub-circuit can be used to characterize the transpose conjugate matrix of the orthogonal matrix. The order of both the orthogonal matrix and the transpose conjugate matrix of the orthogonal matrix is ​​the same as the order of the self-conjugate matrix.

[0079] In some embodiments, the quantum circuit may further include a data loading unit. The parameter adjustment method for the quantum circuit may further include: exciting multiple qubits in the ground state to the designated state through the data loading unit, such that the multiple qubits in the designated state can characterize the self-conjugation matrix.

[0080] When performing matrix diagonalization on a self-conjugate matrix via a quantum circuit, multiple qubits in the ground state can be manipulated using a data loading unit to input the self-conjugate matrix into two proposed sub-circuits, providing a basis for the training of subsequent proposed sub-circuits.

[0081] In this embodiment, the data loading unit may include multiple quantum logic gates with immutable parameters. The gate parameters of these quantum logic gates may be preset values.

[0082] In this embodiment, the number of qubits controlled by the data loading unit can be twice the number of qubits controlled by each proposed sub-circuit. The number of qubits controlled by each proposed sub-circuit can be determined based on the order of the self-conjugate matrix. Specifically, for example, referring to Equation 3, the number of qubits controlled by each proposed sub-circuit can be the logarithm of the order of the self-conjugate matrix, base 2. Since both the number of qubits and the order of the self-conjugate matrix are positive integers, for a self-conjugate matrix of any order, its order can be changed to a positive integer power of 2 by padding with zeros.

[0083] In this embodiment, before being excited by the data loading unit, the multiple qubits in the ground state are independent of each other; after being excited to the specified state by the data loading unit, the multiple qubits in the specified state are entangled with each other.

[0084] In this embodiment, the designated state can be a superposition state. The data loading unit excites multiple qubits in the ground state to the designated state, enabling these qubits in the designated state to represent a self-conjugation matrix. Multiple qubits can be manipulated through multiple quantum logic gates included in the data loading unit, allowing the probabilities of each state that the multiple entangled qubits in the designated superposition state might be in to represent each element of the self-conjugation matrix. Specifically, taking the representation of an 8th-order self-conjugation matrix using six qubits in designated states as an example, the 8th-order self-conjugation matrix includes 64 matrix elements, and the six qubits can be in 64 possible states. The probability corresponding to each state can represent one element of the 8th-order self-conjugation matrix.

[0085] In some implementations, the parameters of the two proposed sub-circuits have a specified mapping relationship, which may include: when the self-conjugate matrix is ​​a real matrix, the gate parameters of the rotating Pauli gates with the same gate identifier in the two proposed sub-circuits are the same; when the self-conjugate matrix is ​​not a real matrix, the gate parameters of the rotating Pauli gates with the same gate identifier in the two proposed sub-circuits are conjugates of each other.

[0086] In some cases, a specific mapping relationship between the parameters of two proposed sub-circuits can be determined based on the type of the self-conjugate matrix, so as to enable the quantum circuit with the same circuit structure to perform matrix diagonalization operation on self-conjugate matrices of different types, thereby enhancing the versatility of the quantum circuit.

[0087] In this embodiment, the type of the self-conjugate matrix can be determined based on the numerical type of its elements. Specifically, if all elements of the self-conjugate matrix are real numbers, the self-conjugate matrix is ​​a real matrix; if complex numbers exist among its elements, the self-conjugate matrix is ​​a non-real matrix.

[0088] In this embodiment, each proposed sub-line may include multiple rotating Pauli gates. Each rotating Pauli gate may be one of an RX gate, an RY gate, or an RZ gate, and the type of each rotating Pauli gate may be a preset type. Each rotating Pauli gate may correspond to a gate identifier and a gate parameter. Specifically, for example, the gate identifier of each rotating Pauli gate may represent the operating sequence of that rotating Pauli gate in its respective proposed sub-line. For two proposed sub-lines, rotating Pauli gates with the same operating sequence in each proposed sub-line have the same gate identifier. The gate parameter of each rotating Pauli gate may represent the signal strength corresponding to that rotating Pauli gate.

[0089] In this embodiment, when the self-conjugate matrix is ​​a real matrix, the gate parameters of all rotating Pauli gates included in the two proposed sub-circuits can all be real numbers. In this case, the gate parameters of rotating Pauli gates with the same gate identifier in the two proposed sub-circuits can be the same.

[0090] In this embodiment, when the self-conjugate matrix is ​​not a real matrix, the gate parameters of at least some of the rotating Pauli gates included in the two proposed sub-circuits can be complex numbers. Please refer to Formula 9. In this case, the gate parameters of the rotating Pauli gates with the same gate identifier in the two proposed sub-circuits can be determined to be conjugate according to the following formula:

[0091]

[0092] Where A, B, and M each represent a matrix, B * Let B be the adjoint matrix of matrix B. + Let denote the transpose and conjugate of matrix B, and ft denote the matrix expansion.

[0093] In some implementations, constructing a gradient acquisition circuit for any of the proposed sub-circuits may include: constructing a gradient component acquisition circuit for acquiring the gradient component of the specified probability in the direction of the gate parameter, for the gate parameter of any of the rotating Pauli gates. Correspondingly, adjusting the parameters of the two proposed sub-circuits based on the measurement results of the gradient acquisition circuit may include: obtaining the gradient of the specified probability based on the measurement results of multiple gradient component acquisition circuits; and simultaneously changing the gate parameters of at least one pair of rotating Pauli gates with the same gate identifier in the two proposed sub-circuits according to a specified step size.

[0094] When a gradient with a specified probability includes multiple gradient components, a gradient component acquisition circuit is first constructed for each gradient component. Then, the gradient with the specified probability is obtained based on the measurement results of the gradient component acquisition circuit. Since the differences in the circuit structure of different gradient component acquisition circuits lie only in the qubits controlled by the gradient component acquisition circuit identification module and the order of operations, and most of the circuit structure of the gradient component acquisition circuit can be reused, the construction efficiency and measurement efficiency of the gradient component acquisition circuit are improved.

[0095] In this embodiment, the gradient of a specified probability can be determined based on the gradient component of the specified probability in the direction of the gate parameter of any of the rotating Pauli gates. Specifically, for example, please refer to Equation 7, the gradient component of the specified probability in the direction of any gate parameter can be the partial derivative of the expression for the specified probability with respect to the gate parameter.

[0096] In this embodiment, the gradient component acquisition circuit may include an auxiliary qubit, a measurement circuit, an identification module, and a marking module. The measurement circuit is used to measure the auxiliary qubit, the identification module is used to identify the rotating Pauli gate corresponding to the gradient component acquisition circuit, and the marking module is used to mark quantum states where the qubits controlled by the two proposed sub-circuits have the same state. The circuit structures of different gradient component acquisition circuits used to acquire gradient components with specified probabilities in different gate parameter directions can be different. Specifically, for example, the qubits controlled by the identification modules of different gradient component acquisition circuits and the order of operations can be different, while the circuit structure of the remaining parts of the gradient component acquisition circuit can be the same.

[0097] Please see Figure 3 Taking the gradient component acquisition circuit for obtaining the gradient component in the direction of the gate parameter θ2 of a rotating Pauli gate with a specified probability and gate identifier V2 as an example, in Figure 3 In the diagram, the identification and marking modules of the gradient component acquisition circuit are outlined with solid lines, while the two proposed sub-circuits of the quantum circuit are outlined with dashed lines. Each proposed sub-circuit of the quantum circuit includes six rotating Pauli gates and one entangled unit, capable of controlling three qubits. The identification module of the gradient component acquisition circuit includes a rotating Pauli gate with parameter π, the type of which is the same as the rotating Pauli gate identified as V2. The marking module of the gradient component acquisition circuit includes three CNOT gates and a quantum logic gate for characterizing the unitary matrix K0. The unitary matrix K0 is an 8th-order unitary matrix with its first diagonal element being -1 and the remaining diagonal elements being 1. Please refer to Equation 10. The order of the unitary matrix K0 can be determined based on the number of qubits controlled by a proposed sub-circuit.

[0098] m=2 n Formula 10, where m represents the order of the unitary matrix K0, and n represents the number of qubits controlled by a hypothetical sub-circuit.

[0099] exist Figure 3 In the above, the states of the 6 qubits in the ground state and the auxiliary qubits after all quantum logic gate operations are as follows:

[0100]

[0101] In this embodiment, the measurement result of the gradient component acquisition circuit can be the measurement result of the state of the auxiliary qubit in the gradient component acquisition circuit. Specifically, for example, the probability that the auxiliary qubit is in the |1> state can be used as the measurement result of the gradient component acquisition circuit.

[0102] In this embodiment, the specified step size can represent the increment of the gate parameter each time it is adjusted. Specifically, taking the gate parameter as the rotation angle of the qubit relative to the ground state as an example, the specified step size can be 1°.

[0103] In this embodiment, the method for constructing the gradient component acquisition path is basically the same as the method for constructing the gradient acquisition path in the above embodiments, and will not be described again here.

[0104] In this embodiment, the measurement results of the line are obtained based on multiple gradient components to obtain a gradient with a specified probability. This can be achieved by first performing numerical transformation on the measurement results of each gradient component to obtain multiple gradient components, and then arranging these multiple gradient components in the order of the gate identifiers of the rotating Pauli gates corresponding to each gradient component to form a gradient vector with a specified probability. Specifically, using... Figure 3 Taking the gradient component acquisition line shown as an example, the gradient vector with a specified probability is as follows:

[0105]

[0106] In this embodiment, the gate parameters of at least one pair of rotating Pauli gates with the same gate identifier in two proposed sub-circuits are changed simultaneously according to a specified step size. This can be achieved by sequentially changing the gate parameters of at least one pair of rotating Pauli gates with the same gate identifier in the two proposed sub-circuits by the specified step size, following the order of the gate identifiers corresponding to multiple gradient components. This embodiment does not impose a specific limitation on the number of logarithmic changes in the gate parameters. For specific examples, please refer to [link to documentation]. Figure 3 The gate parameter changes of the rotating Pauli gate marked V1 in proposed sub-circuit 1 and proposed sub-circuit 2 can be specified in step order from V1 to V6.

[0107] In some implementations, the gate parameters of at least one pair of rotating Pauli gates with the same gate identifier in two proposed sub-circuits are changed simultaneously by a specified step size. Alternatively, the gate parameters of all rotating Pauli gates in two proposed sub-circuits can be changed simultaneously by a specified step size. For specific examples, please refer to [link to relevant documentation]. Figure 3 The gate parameter changes of all rotating Pauli gates in proposed sub-circuit 1 and proposed sub-circuit 2 can be specified by step size.

[0108] In some implementations, parameter-tuned quantum circuits can be used to perform different quantum computing tasks. Specifically, parameter-tuned quantum circuits can be part of a quantum circuit used to perform different quantum computing tasks. For example, a parameter-tuned quantum circuit can be part of a quantum circuit used to perform Hamiltonian simulation, quantum principal component analysis, matrix inversion, or quantum state entanglement entropy calculation.

[0109] Please see Figure 4 One embodiment of this specification provides a method for constructing a quantum circuit, applicable to a quantum computing system. The method for constructing the quantum circuit may include the following steps.

[0110] Step 210: Construct an initial quantum circuit; wherein the initial quantum circuit may include two initial proposed sub-circuits with the same circuit structure, and the parameters of the two initial proposed sub-circuits may have a specified mapping relationship.

[0111] In some cases, a quantum circuit for performing a specific quantum computing task has not yet been constructed. In this case, an initial quantum circuit for the quantum computing task and a gradient acquisition circuit for the parametric simulation sub-circuit in the initial quantum circuit can be constructed simultaneously. The parametric simulation in the initial quantum circuit can be trained based on the measurement results of the gradient acquisition circuit to form a target quantum circuit that can be used to perform the quantum computing task.

[0112] In this embodiment, the initial quantum circuit may include a data loading unit and two initial proposed sub-circuits. The parameters of the data loading unit are immutable, while the parameters of the two initial proposed sub-circuits are variable. Before adjusting the parameters of the two initial proposed sub-circuits, their parameters can be preset values.

[0113] In this embodiment, the initial quantum circuit can be constructed by generating an initial circuit quantum program through the basic computing unit, and then sending the initial circuit quantum program to the quantum computing unit in the quantum computing system. After receiving the initial circuit quantum program, the quantum computing unit can run the initial circuit quantum program to determine the circuit structure of the initial quantum circuit and establish the initial quantum circuit.

[0114] Step 220: For any of the initial proposed sub-circuits, construct a gradient acquisition circuit; wherein, the gradient acquisition circuit is used to acquire a gradient with a specified probability according to the parameters of the initial proposed sub-circuit; the specified probability is used to represent the probability that the qubits operated by the two initial proposed sub-circuits are in the same state.

[0115] In this embodiment, the method for constructing a gradient acquisition line for any initially proposed sub-line is basically the same as the method for constructing a gradient acquisition line in the above embodiments, and will not be repeated here.

[0116] Step 230: If the gradient of the specified probability does not meet the specified numerical condition, adjust the parameters of the two initial proposed sub-circuits according to the measurement results of the gradient acquisition line until the gradient of the specified probability meets the specified numerical condition, thereby obtaining two target proposed sub-circuits; wherein, the number of qubits measured to obtain the measurement results of the gradient acquisition line is less than the number of qubits measured to obtain the measurement results of any of the initial proposed sub-circuits.

[0117] In this embodiment, the specified threshold condition can be used to represent the numerical condition that the gradient of a specified probability needs to satisfy. Specifically, for example, the specified threshold condition can be less than or equal to 0.0001.

[0118] In this embodiment, the method for adjusting the parameters of the two initially proposed sub-lines based on the measurement results of the gradient acquisition line is basically the same as the parameter adjustment method of the proposed sub-lines in the above embodiment, and will not be repeated here.

[0119] Step 240: Based on the two objectives, design sub-circuits to form the target quantum circuit.

[0120] In this embodiment, the target quantum circuit has the same circuit structure as the initial quantum circuit.

[0121] In this embodiment, the method of forming a target quantum circuit based on two target proposed sub-circuits is similar to the method of constructing an initial quantum circuit. The difference is that in the initial circuit quantum program used to construct the initial quantum circuit, the parameters of the two initial proposed sub-circuits are preset values; while in the target circuit quantum program used to construct the target quantum circuit, the parameters of the two target proposed sub-circuits are adjusted values ​​obtained after parameter adjustment.

[0122] The implementation method described in this specification improves the efficiency of quantum circuit construction by simultaneously constructing the initial quantum circuit and the gradient acquisition circuit, reduces the number of data transfers between the basic computing unit and the quantum computing unit, and reduces the resource consumption caused by data transfer.

[0123] Please see Figure 5 One embodiment of this specification provides a method for adjusting the parameters of a quantum circuit, applied to a basic computing unit in a quantum computing system; the quantum circuit includes two proposed sub-circuits with identical circuit structures, and the parameters of the two proposed sub-circuits have a specified mapping relationship. The method for adjusting the parameters of the quantum circuit may include:

[0124] Step 310: For any of the proposed sub-circuits, generate a gradient acquisition quantum program for constructing a gradient acquisition circuit; wherein the gradient acquisition circuit is used to acquire a gradient with a specified probability according to the parameters of the proposed sub-circuit; the specified probability is used to represent the probability that the qubits controlled by the two proposed sub-circuits are in the same state.

[0125] Step 320: Send the gradient acquisition quantum program to the quantum computing unit belonging to the same quantum computing system.

[0126] Step 330: Adjust the parameters of the two proposed sub-circuits according to the measurement results of the gradient acquisition circuit fed back by the quantum computing unit; and send the adjusted parameters of the two proposed sub-circuits to the quantum computing unit; wherein the number of qubits measured to obtain the measurement results of the gradient acquisition circuit is less than the number of qubits measured to obtain the measurement results of any of the proposed sub-circuits.

[0127] In the embodiments described in this specification, the basic computing unit first generates a gradient acquisition quantum program for constructing a gradient acquisition circuit for one of two proposed sub-circuits that have the same circuit structure and whose parameters have a specified mapping relationship. The quantum program is then sent to the quantum computing unit, and the parameters of the two proposed sub-circuits are adjusted according to the measurement results of the gradient acquisition circuit fed back by the quantum computing unit. Since only the auxiliary qubits of the gradient acquisition circuit need to be measured to obtain the measurement results of the gradient acquisition circuit, while all the qubits controlled by the proposed sub-circuit need to be measured to obtain the measurement results of any proposed sub-circuit, the parameters of the proposed sub-circuit can be adjusted based on the measurement results of a smaller number of qubits. This reduces the number of qubits that need to be measured to adjust the parameters of the proposed sub-circuit, improves the measurement method for adjusting quantum circuit parameters, and improves the measurement efficiency to a certain extent.

[0128] Please see Figure 6 One embodiment of this specification provides a method for adjusting the parameters of a quantum circuit, applied to a quantum computing unit in a quantum computing system; the quantum circuit includes two proposed sub-circuits with identical circuit structures, and the parameters of the two proposed sub-circuits have a specified mapping relationship. The method for adjusting the parameters of the quantum circuit may include:

[0129] Step 410: Receive a gradient acquisition quantum program sent by a basic computing unit belonging to the same quantum computing system for constructing a gradient acquisition circuit; wherein, the gradient acquisition circuit is used to acquire a gradient with a specified probability according to the parameters of the proposed sub-circuit; the specified probability is used to represent the probability that the qubits operated by the two proposed sub-circuits are in the same state.

[0130] Step 420: For any of the proposed sub-circuits, construct the gradient acquisition circuit according to the quantum program.

[0131] Step 430: Measure the gradient acquisition circuit to obtain the measurement result of the gradient acquisition circuit; and feed back the measurement result of the gradient acquisition circuit to the basic computing unit so that the basic computing unit can adjust the parameters of the two proposed sub-circuits according to the measurement result of the gradient acquisition circuit; wherein, the number of qubits measured to obtain the measurement result of the gradient acquisition circuit is less than the number of qubits measured to obtain the measurement result of any of the proposed sub-circuits.

[0132] In the embodiments described in this specification, the quantum computing unit receives a gradient acquisition quantum program sent by the basic computing unit. Based on this quantum program, it constructs a gradient acquisition circuit for any one of two proposed sub-circuits with identical circuit structures and specified parameter mapping relationships. The unit measures the gradient acquisition circuit and feeds the measurement back to the basic computing unit for adjusting the parameters of the two proposed sub-circuits. Since only the auxiliary qubits of the gradient acquisition circuit need to be measured to obtain the measurement result of the gradient acquisition circuit, while all the qubits controlled by the proposed sub-circuit need to be measured to obtain the measurement result of any proposed sub-circuit, the parameters of the proposed sub-circuit can be adjusted based on the measurement results of a smaller number of qubits. This reduces the number of qubits that need to be measured to adjust the parameters of the proposed sub-circuit, improves the measurement method for adjusting quantum circuit parameters, and improves the measurement efficiency to a certain extent.

[0133] Please see Figure 7 One embodiment of this specification provides a parameter adjustment device for a quantum circuit, applied to a quantum computing system; the quantum circuit includes two proposed sub-circuits with identical circuit structures, and the parameters of the two proposed sub-circuits have a specified mapping relationship. The device may include:

[0134] A construction module is used to construct a gradient acquisition circuit for any of the proposed sub-circuits; wherein the gradient acquisition circuit is used to acquire a gradient with a specified probability according to the parameters of the proposed sub-circuit; the specified probability is used to represent the probability that the qubits operated by the two proposed sub-circuits are in the same state.

[0135] An adjustment module is used to adjust the parameters of the two proposed sub-circuits based on the measurement results of the gradient acquisition circuit; wherein the number of qubits measured to obtain the measurement results of the gradient acquisition circuit is less than the number of qubits measured to obtain the measurement results of either of the proposed sub-circuits.

[0136] Please see Figure 8One embodiment of this specification provides a device for constructing quantum circuits for use in a quantum computing system. The device may include:

[0137] The first construction module is used to construct an initial quantum circuit; wherein the initial quantum circuit includes two initial proposed sub-circuits with the same circuit structure, and the parameters of the two initial proposed sub-circuits have a specified mapping relationship.

[0138] The second construction module is used to construct a gradient acquisition circuit for any of the initial proposed sub-circuits; wherein the gradient acquisition circuit is used to acquire a gradient with a specified probability according to the parameters of the initial proposed sub-circuit; the specified probability is used to represent the probability that the qubits operated by the two initial proposed sub-circuits are in the same state.

[0139] The training module is used to adjust the parameters of the two initially proposed sub-circuits based on the measurement results of the gradient acquisition circuit when the gradient with the specified probability does not meet the specified threshold condition, until the gradient with the specified probability meets the specified threshold condition, thereby obtaining two target proposed sub-circuits; wherein the number of qubits measured to obtain the measurement results of the gradient acquisition circuit is less than the number of qubits measured to obtain the measurement results of any of the initially proposed sub-circuits.

[0140] A forming module is used to form a target quantum circuit based on the two targets by designing sub-circuits.

[0141] The specific functions and effects of the quantum circuit parameter adjustment device and the quantum circuit construction device can be explained by referring to other embodiments in this specification, and will not be repeated here. Each module in the quantum circuit parameter adjustment device and the quantum circuit construction 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 it can be 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.

[0142] Please see Figure 9 This specification also provides a computer device, including a memory and a processor, wherein the memory stores a computer program, characterized in that the processor, when executing the computer program, implements the parameter adjustment method or the quantum circuit construction method of any of the above embodiments. The computer device may be a classical computer. The computer device may also be a quantum computer.

[0143] The computer device may include a processor connected to a system bus, a non-volatile storage medium, internal memory, a communication interface, and an input device. The non-volatile storage medium may store an operating system and related computer program instructions.

[0144] 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 quantum circuit parameter adjustment method or the quantum circuit construction method in any of the above embodiments.

[0145] This specification also provides a computer program product containing instructions that, when executed by a computer, cause the computer to perform the quantum circuit parameter adjustment method or the quantum circuit construction method in any of the above embodiments.

[0146] 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.

[0147] 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.

[0148] 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.

[0149] 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.

[0150] 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.

[0151] 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.

[0152] 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.

[0153] 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.

[0154] 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.

[0155] 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.

[0156] 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.

[0157] 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.

[0158] 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.

Claims

1. A method of parameter adjustment of a quantum circuit, characterized by, The quantum circuit is applied to a quantum computing system; the quantum circuit is used for performing a matrix diagonalization operation on a Hermitian matrix; the quantum circuit comprises two pseudo-configured sub-circuits with the same circuit structure, and parameters of the two pseudo-configured sub-circuits have a specified mapping relationship; any of the pseudo-configured sub-circuits is used for regulating and controlling a plurality of quantum bits in a specified state, so that the quantum bits regulated and controlled by the two pseudo-configured sub-circuits represent a diagonal matrix formed by eigenvalues of the Hermitian matrix; the method comprises: For any of the pseudo-configured sub-circuits, a gradient obtaining circuit is constructed; wherein the gradient obtaining circuit is used for obtaining a gradient of a specified probability according to parameters of the pseudo-configured sub-circuit; the specified probability is used for representing a probability that the states of the quantum bits regulated by the two pseudo-configured sub-circuits are the same; parameters of the two pseudo-configured sub-circuits are adjusted according to a measurement result of the gradient obtaining circuit; wherein a number of quantum bits measured to obtain the measurement result of the gradient obtaining circuit is less than a number of quantum bits measured to obtain the measurement result of any of the pseudo-configured sub-circuits.

2. The method of claim 1, wherein, The quantum circuit further comprises a data loading unit; the method further comprises: a plurality of quantum bits in a ground state are excited to the specified state by the data loading unit, so that the plurality of quantum bits in the specified state can represent the Hermitian matrix; wherein a number of the plurality of quantum bits is determined according to an order of the Hermitian matrix.

3. The method of claim 1, wherein, Any of the pseudo-configured sub-circuits comprises a plurality of rotation Pauli gates, each of the rotation Pauli gates corresponds to a gate identifier and a gate parameter; the parameters of the two pseudo-configured sub-circuits have a specified mapping relationship, comprising: in the case that the Hermitian matrix is a real matrix, gate parameters of rotation Pauli gates with the same gate identifier in the two pseudo-configured sub-circuits are the same; in the case that the Hermitian matrix is a non-real matrix, gate parameters of rotation Pauli gates with the same gate identifier in the two pseudo-configured sub-circuits are conjugate to each other.

4. The method of claim 3, wherein, The gradient of the specified probability is determined according to a gradient component of the specified probability in a direction of a gate parameter of any of the rotation Pauli gates; for any of the pseudo-configured sub-circuits, the step of constructing the gradient obtaining circuit comprises: for the gate parameter of any of the rotation Pauli gates, a gradient component obtaining circuit for obtaining the gradient component of the specified probability in the direction of the gate parameter is constructed; wherein different gradient component obtaining circuits for obtaining gradient components of the specified probability in different directions of different gate parameters have different circuit structures; correspondingly, the step of adjusting the parameters of the two pseudo-configured sub-circuits according to the measurement result of the gradient obtaining circuit comprises: the gradient of the specified probability is obtained according to measurement results of a plurality of gradient component obtaining circuits; gate parameters of at least one pair of rotation Pauli gates with the same gate identifier in the two pseudo-configured sub-circuits are changed simultaneously by a specified step size.

5. A method of constructing a quantum circuit, characterized by, The quantum circuit is applied to a quantum computing system; the quantum circuit is used for performing a matrix diagonalization operation on a Hermitian matrix; the method comprises: ​ constructing an initial quantum circuit; wherein the initial quantum circuit comprises two initial ansatz sub-circuits with the same circuit structure, and parameters of the two initial ansatz sub-circuits have a specified mapping relationship; any of the initial ansatz sub-circuits is configured to regulate a plurality of quantum bits in a specified state, so that the quantum bits regulated by the two initial ansatz sub-circuits represent a diagonal matrix formed by eigenvalues of the self-conjugate matrix; for any of the initial ansatz sub-circuits, constructing a gradient obtaining circuit; wherein the gradient obtaining circuit is configured to obtain a gradient of a specified probability according to parameters of the initial ansatz sub-circuit; the specified probability is configured to represent a probability that quantum bits operated by the two initial ansatz sub-circuits are in the same state; in a case where the gradient of the specified probability does not meet a specified threshold condition, adjusting the parameters of the two initial ansatz sub-circuits according to a measurement result of the gradient obtaining circuit until the gradient of the specified probability meets the specified threshold condition, to obtain two target ansatz sub-circuits; wherein a number of quantum bits measured to obtain the measurement result of the gradient obtaining circuit is less than a number of quantum bits measured to obtain a measurement result of any of the initial ansatz sub-circuits; forming a target quantum circuit according to the two target ansatz sub-circuits.

6. A method for adjusting the parameters of a quantum circuit, characterized in that, a basic computing unit applied to a quantum computing system; the quantum circuit is configured to perform a matrix diagonalization operation on a self-conjugate matrix; the quantum circuit comprises two ansatz sub-circuits with the same circuit structure, and parameters of the two ansatz sub-circuits have a specified mapping relationship; any of the ansatz sub-circuits is configured to regulate a plurality of quantum bits in a specified state, so that the quantum bits regulated by the two ansatz sub-circuits represent a diagonal matrix formed by eigenvalues of the self-conjugate matrix; the method comprises: for any of the ansatz sub-circuits, generating a gradient obtaining quantum program for constructing a gradient obtaining circuit; wherein the gradient obtaining circuit is configured to obtain a gradient of a specified probability according to parameters of the ansatz sub-circuit; the specified probability is configured to represent a probability that quantum bits regulated by the two ansatz sub-circuits are in the same state; sending the gradient obtaining quantum program to a quantum computing unit belonging to the same quantum computing system; adjusting the parameters of the two ansatz sub-circuits according to a measurement result of the gradient obtaining circuit fed back by the quantum computing unit; and sending the adjusted parameters of the two ansatz sub-circuits to the quantum computing unit; wherein a number of quantum bits measured to obtain the measurement result of the gradient obtaining circuit is less than a number of quantum bits measured to obtain a measurement result of any of the ansatz sub-circuits.

7. A method for adjusting the parameters of a quantum circuit, characterized in that, A quantum computing unit applied to a quantum computing system; the quantum circuit is used for performing a matrix diagonalization operation on a Hermitian matrix; the quantum circuit comprises two pseudo-sub-circuits with the same circuit structure, and parameters of the two pseudo-sub-circuits have a specified mapping relationship; any of the pseudo-sub-circuits is used for regulating a plurality of quantum bits in a specified state, so that the quantum bits regulated by the two pseudo-sub-circuits represent a diagonal matrix formed by eigenvalues of the Hermitian matrix; the method comprises: receiving a gradient acquisition quantum program sent by a basic computing unit belonging to the same quantum computing system and used for constructing a gradient acquisition circuit; wherein the gradient acquisition circuit is used for acquiring a gradient of a specified probability according to parameters of the pseudo-sub-circuits; the specified probability is used for representing a probability that quantum bits regulated by the two pseudo-sub-circuits are in the same state; constructing a gradient acquisition circuit according to the gradient acquisition quantum program for any of the pseudo-sub-circuits; measuring the gradient acquisition circuit to obtain a measurement result of the gradient acquisition circuit; and feeding back the measurement result of the gradient acquisition circuit to the basic computing unit, so that the basic computing unit adjusts the parameters of the two pseudo-sub-circuits according to the measurement result of the gradient acquisition circuit; wherein a number of quantum bits measured to obtain the measurement result of the gradient acquisition circuit is less than a number of quantum bits measured to obtain a measurement result of any of the pseudo-sub-circuits.

8. A quantum circuit parameter adjustment apparatus characterized by comprising: A quantum computing unit applied to a quantum computing system; the quantum circuit is used for performing a matrix diagonalization operation on a Hermitian matrix; the quantum circuit comprises two pseudo-sub-circuits with the same circuit structure, and parameters of the two pseudo-sub-circuits have a specified mapping relationship; any of the pseudo-sub-circuits is used for regulating a plurality of quantum bits in a specified state, so that the quantum bits regulated by the two pseudo-sub-circuits represent a diagonal matrix formed by eigenvalues of the Hermitian matrix; the device comprises: a construction module configured to construct a gradient acquisition circuit for any of the pseudo-sub-circuits; wherein the gradient acquisition circuit is used for acquiring a gradient of a specified probability according to parameters of the pseudo-sub-circuits; the specified probability is used for representing a probability that quantum bits regulated by the two pseudo-sub-circuits are in the same state; an adjustment module configured to adjust the parameters of the two pseudo-sub-circuits according to a measurement result of the gradient acquisition circuit; wherein a number of quantum bits measured to obtain the measurement result of the gradient acquisition circuit is less than a number of quantum bits measured to obtain a measurement result of any of the pseudo-sub-circuits.

9. A quantum circuit construction apparatus, characterized by comprising: A quantum computing unit applied to a quantum computing system; the quantum circuit is used for performing a matrix diagonalization operation on a Hermitian matrix; the device comprises: The first construction module is configured to construct an initial quantum circuit, wherein the initial quantum circuit comprises two initial ansatz sub-circuits with the same circuit structure, and parameters of the two initial ansatz sub-circuits have a specified mapping relationship; any initial ansatz sub-circuit is configured to regulate a plurality of quantum bits in a specified state, so that the quantum bits regulated by the two initial ansatz sub-circuits represent a diagonal matrix formed by eigenvalues of the self-conjugate matrix; The second construction module is configured to construct, for any initial ansatz sub-circuit, a gradient obtaining circuit, wherein the gradient obtaining circuit is configured to obtain a gradient of a specified probability according to parameters of the initial ansatz sub-circuit; the specified probability is configured to represent a probability that states of quantum bits operated by the two initial ansatz sub-circuits are the same; The training module is configured to, in a case where the gradient of the specified probability does not meet a specified threshold condition, adjust the parameters of the two initial ansatz sub-circuits according to a measurement result of the gradient obtaining circuit until the gradient of the specified probability meets the specified threshold condition, to obtain two target ansatz sub-circuits; wherein a number of quantum bits measured to obtain the measurement result of the gradient obtaining circuit is less than a number of quantum bits measured to obtain the measurement result of any initial ansatz sub-circuit; The forming module is configured to form a target quantum circuit according to the two target ansatz sub-circuits. 10.A computer device, comprising a memory and a processor, wherein the memory stores a computer program, and the computer device is configured to perform the method according to any one of claims 1-9. The processor executes the computer program to implement the method in any one of claims 1 to 7.

11. A computer readable storage medium having stored thereon a computer program, characterized in that The computer program is executed by the processor to implement the method in any one of claims 1 to 7.

Citation Information

Patent Citations

  • Method and device for simulating energy of target system based on quantum calculation and medium

    CN114492814A

  • Quantum computing method and system

    CN114638369A