Quantum circuit construction method for computing singular values and singular value computation model

By constructing quantum circuits to obtain the basis of the system to be measured, determining the tensor product and performing singular value decomposition, the computational difficulty of singular value decomposition in quantum computing is solved, the efficiency of separating noise signals and data signals in signal processing is improved, and the communication quality is improved.

CN118863074BActive Publication Date: 2025-10-14ORIGIN QUANTUM COMPUTING TECH (HEFEI) CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310479392.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-04-28
Publication Date
2025-10-14
Estimated Expiration
2043-04-28

AI Technical Summary

Technical Problem

How to realize the calculation of singular value decomposition in quantum computing? Existing classical algorithms are difficult to meet the requirements.

Method used

By constructing quantum circuits, the basis of the system to be measured is obtained, the tensor product of the composite system is determined, and singular value decomposition is performed. Variational quantum circuits are constructed, and quantum logic gates are adjusted to calculate singular values.

Benefits of technology

It realizes the calculation of singular value decomposition in quantum computing, improves the efficiency of separating noise signals and data signals in signal processing, and improves communication quality.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118863074B_ABST
    Figure CN118863074B_ABST
Patent Text Reader

Abstract

The embodiment of the application provides a quantum circuit construction method for computing singular values and a singular value computation model, determines a quantum expression form of a tensor product of a composite system of a first to-be-measured system and a second to-be-measured system, and constructs a variational quantum circuit according to the quantum expression form of the tensor product; takes a state of the first to-be-measured system and a state of the second to-be-measured system as inputs of the variational quantum circuit, and obtains a quantum observation result of the variational quantum circuit; adjusts quantum logic gates in the variational quantum circuit according to the quantum observation result, so that a quantum circuit for computing singular values is finally obtained. The quantum circuit for computing singular values can realize computation of singular values of the first to-be-measured system and the second to-be-measured system, so that computation of singular value decomposition is realized through quantum computation.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of quantum computing, and particularly relates to a quantum circuit construction method for computing singular values and a singular value computing model. BACKGROUND

[0002] Singular value decomposition (SVD) is an important matrix decomposition in linear algebra, and is a generalization of eigenvalue decomposition on arbitrary matrices. SVD has important applications in signal processing, statistics, etc. In the field of signal processing, SVD can be applied to the design of filters. Collaborative filtering using SVD can effectively separate noise signals and data signals, thereby improving communication quality.

[0003] In classical algorithms, the computation of SVD has been realized. However, with the development of quantum computing technology, how to realize the computation of SVD in quantum computing has become a technical problem to be solved. SUMMARY

[0004] The purpose of the embodiments of the present application is to provide a quantum circuit construction method for computing singular values and a singular value computing model, so as to realize the computation of SVD by quantum computing. The specific technical solutions are as follows:

[0005] In a first aspect, the embodiments of the present application provide a quantum circuit construction method for computing singular values, and the method comprises:

[0006] obtaining a basis of a first to-be-measured system and a basis of a second to-be-measured system;

[0007] determining a tensor product of a composite system of the first to-be-measured system and the second to-be-measured system according to the basis of the first to-be-measured system and the basis of the second to-be-measured system, wherein the tensor product is represented by a first coefficient matrix, the basis of the first to-be-measured system and the basis of the second to-be-measured system;

[0008] performing singular value decomposition on the first coefficient matrix to obtain a quantum expression form of the tensor product, wherein the quantum expression form of the tensor product is represented by singular values, a state of the first to-be-measured system and a state of the second to-be-measured system;

[0009] According to a quantum expression form of the tensor product, a variational quantum circuit is constructed, wherein the variational quantum circuit comprises a first quantum system sub-circuit and a second quantum system sub-circuit, the first quantum system sub-circuit and the second quantum system sub-circuit each comprise a plurality of quantum logic gates, the first quantum system sub-circuit is used for quantum computing on a state of the first to-be-measured system, and the second quantum system sub-circuit is used for quantum computing on a state of the second to-be-measured system.

[0010] The state of the first to-be-measured system and the state of the second to-be-measured system are encoded into quantum states and input into the variational quantum circuit to obtain a quantum observation result of the variational quantum circuit.

[0011] The quantum logic gates are adjusted according to the quantum observation result to obtain a quantum circuit for computing singular values.

[0012] In a possible implementation, the first quantum system sub-circuit comprises a single rotation logic gate acting on a first quantum bit, a single rotation logic gate acting on a second quantum bit, a CNOT gate acting on the first quantum bit and the second quantum bit; and the second quantum system sub-circuit comprises a single rotation logic gate acting on a third quantum bit, a single rotation logic gate acting on a fourth quantum bit, and a CNOT gate acting on the third quantum bit and the fourth quantum bit.

[0013] The encoding of the state of the first to-be-measured system and the state of the second to-be-measured system into quantum states and input into the variational quantum circuit to obtain a quantum observation result of the variational quantum circuit comprises:

[0014] The state of the first to-be-measured system is encoded into a quantum state of a first quantum bit and a quantum state of a second quantum bit, and the state of the second to-be-measured system is encoded into a quantum state of a third quantum bit and a quantum state of a fourth quantum bit.

[0015] The quantum state of the first quantum bit and the quantum state of the second quantum bit are input into the first quantum system sub-circuit, and the quantum state of the third quantum bit and the quantum state of the fourth quantum bit are input into the second quantum system sub-circuit; the first quantum bit and the second quantum bit are measured to obtain a quantum observation result of the first to-be-measured system; and the third quantum bit and the fourth quantum bit are measured to obtain a quantum observation result of the second to-be-measured system.

[0016] In a possible implementation, the adjusting of the quantum logic gates according to the quantum observation result to obtain a quantum circuit for computing singular values comprises:

[0017] According to the quantum observation result, a probability that the quantum observation result of the first to-be-measured system is the same as the quantum observation result of the second to-be-measured system is calculated, and a loss of the variational quantum circuit is determined based on the probability;

[0018] According to the loss of the variational quantum circuit, a variable parameter of a quantum logic gate in the variational quantum circuit is adjusted;

[0019] The first to-be-measured system and the second to-be-measured system are selected to continue training of the variational quantum circuit until the loss of the variational quantum circuit converges, and a quantum circuit for calculating singular values is obtained.

[0020] In a possible implementation, the number of the first quantum bit, the second quantum bit, the third quantum bit and the fourth quantum bit is 1, and the calculation of the probability that the quantum observation result of the first to-be-measured system is the same as the quantum observation result of the second to-be-measured system and the determination of the loss of the variational quantum circuit based on the probability include:

[0021] According to the quantum observation result, P(|0000>), P(|0101>), P(|1010>) and P(|1111>) are respectively calculated, where P(|0000>) represents a probability that the quantum observation result of the first to-be-measured system is |00> and the quantum observation result of the second to-be-measured system is |00>, P(|0101>) represents a probability that the quantum observation result of the first to-be-measured system is |01> and the quantum observation result of the second to-be-measured system is |01>, P(|1010>) represents a probability that the quantum observation result of the first to-be-measured system is |10> and the quantum observation result of the second to-be-measured system is |10>, and P(|1111>) represents a probability that the quantum observation result of the first to-be-measured system is |11> and the quantum observation result of the second to-be-measured system is |11>.

[0022] The loss L(θ) of the variational quantum circuit is calculated as L(θ) = 1 - P(|0000>) - P(|0101>) - P(|1010>) - P(|1111>).

[0023] In a possible implementation, the single-rotation logic gate acting on the first quantum bit includes an RX(θ1) gate, an RY(θ5) gate, an RZ(θ9) gate, an RX(θ 13 ) gate, an RY(θ 17 ) gate and an RZ(θ 21 ) gate.

[0024] The single-rotation logic gate acting on the second quantum bit includes an RX(θ2) gate, an RY(θ6) gate, an RZ(θ 10 ) gate, an RX(θ14 ) gate, RY(θ 18 ) gate, RZ(θ 22 ) gate;

[0025] The CNOT gate acting on the first and second qubits comprises a first CNOT gate, a third CNOT gate, a fifth CNOT gate, a seventh CNOT gate, a ninth CNOT gate;

[0026] The single rotation logic gate acting on the third qubit comprises an RX(θ3) gate, an RY(θ7) gate, an RZ(θ 11 ) gate, an RX(θ 15 ) gate, an RY(θ 19 ) gate, an RZ(θ 23 ) gate;

[0027] The single rotation logic gate acting on the fourth qubit comprises an RX(θ4) gate, an RY(θ8) gate, an RZ(θ 12 ) gate, an RX(θ 16 ) gate, an RY(θ 20 ) gate, an RZ(θ 24 ) gate;

[0028] The CNOT gate acting on the first and second qubits comprises a second CNOT gate, a fourth CNOT gate, a sixth CNOT gate, an eighth CNOT gate, a tenth CNOT gate;

[0029] The outputs of the RX(θ1) gate and the RX(θ2) gate are connected to the inputs of the first CNOT gate, the outputs of the RX(θ3) gate and the RX(θ4) gate are connected to the inputs of the second CNOT gate, the outputs of the RY(θ5) gate and the RY(θ6) gate are connected to the inputs of the third CNOT gate, the outputs of the RY(θ7) gate and the RY(θ8) gate are connected to the inputs of the fourth CNOT gate, the outputs of the RZ(θ9) gate and the RZ(θ 10 ) gate are connected to the inputs of the fifth CNOT gate, the outputs of the RZ(θ 11 ) gate and the RZ(θ 12 ) gate are connected to the inputs of the sixth CNOT gate, the outputs of the RX(θ 13 ) gate and the RX(θ 14 ) gate are connected to the inputs of the seventh CNOT gate, the outputs of the RX(θ 15 ) gate and the RX(θ 16 ) gate are connected to the inputs of the eighth CNOT gate, the outputs of the RY(θ 17 ) gate and the RY(θ 18 ) gate are connected to the inputs of the ninth CNOT gate, the outputs of the RY(θ 19 ) gate and the RY(θ 20 ) gate are connected to the inputs of the tenth CNOT gate.

[0030] In a possible implementation, determining the tensor product of a composite system of the first system to be measured and the second system to be measured based on a basis of the first system to be measured and a basis of the second system to be measured includes:

[0031] The tensor product of the composite system of the first system to be measured and the second system to be measured is expressed as follows:

[0032]

[0033] Among them, |ψ> AB represents the tensor product, a iu represents the element in row i and column u of the first coefficient matrix, |i> A represents the basis of the first system to be measured, |u> B Denotes the basis of the second system to be measured.

[0034] In a possible implementation, performing singular value decomposition on the first coefficient matrix to obtain a quantum expression of the tensor product includes:

[0035] Perform singular value decomposition on the first coefficient matrix:

[0036]

[0037] Perform basis changes on the first and second unitary matrices:

[0038] ∑ i U ij |i> A =|j> A

[0039] ∑ μ V jμ |μ> B =|j> B

[0040] Then the quantum expression of tensor product is:

[0041]

[0042] Among them, U ij is the element in the i-th row and j-th column of the first unitary matrix, V ju is the element in the jth row and uth column of the second unitary matrix, λ j is the jth singular value; |j> A represents the state of the first system to be measured, |j> B Indicates the state of the second system to be measured.

[0043] In a possible implementation, the method further includes:

[0044] encoding the state of the first to-be-measured system and the state of the second to-be-measured system into quantum states, and inputting into a quantum circuit for computing singular values to obtain a state observation result of the quantum circuit for computing singular values;

[0045] determining, according to the state observation result, an observation probability value of the first to-be-measured system and the second to-be-measured system having the same state observation result;

[0046] performing a probability root operation on the observation probability value to obtain a singular value entropy.

[0047] In a possible implementation, the performing a probability root operation on the observation probability value to obtain a singular value entropy includes:

[0048] the singular value entropy is calculated by the following formula:

[0049]

[0050] wherein, S represents the singular value entropy, P i is the observation probability value of the i-th case of the first to-be-measured system and the second to-be-measured system having the same state observation result.

[0051] In a second aspect, an embodiment of the present application provides a singular value calculation model based on a quantum circuit, including:

[0052] a data preprocessing module, a quantum circuit for computing singular values, and a classical calculation module.

[0053] The data preprocessing module is configured to encode the state of the first to-be-measured system and the state of the second to-be-measured system into quantum states.

[0054] The quantum circuit includes a first quantum system sub-circuit and a second quantum system sub-circuit, and both the first quantum system sub-circuit and the second quantum system sub-circuit include a plurality of quantum logic gates; the first quantum system sub-circuit is configured to perform quantum calculation on the state of the first to-be-measured system, and the second quantum system sub-circuit is configured to perform quantum calculation on the state of the second to-be-measured system to obtain a state observation result of the quantum circuit for computing singular values.

[0055] The classical calculation module is configured to determine, according to the state observation result, an observation probability value of the first to-be-measured system and the second to-be-measured system having the same state observation result; and perform a probability root operation on the observation probability value to obtain a singular value entropy.

[0056] The embodiment of the present application has the following beneficial effects:

[0057] The quantum circuit construction method and singular value calculation model for calculating singular values ​​provided in the embodiments of the present application determine the quantum expression of the tensor product of the composite system of the first and second measurement systems, and construct a variational quantum circuit according to the quantum expression of the tensor product; use the state of the first and second measurement systems as inputs to the variational quantum circuit to obtain quantum observation results of the variational quantum circuit; adjust the quantum logic gates in the variational quantum circuit according to the quantum observation results, and ultimately obtain a quantum circuit for calculating singular values. The quantum circuit for calculating singular values ​​can calculate the singular values ​​of the first and second measurement systems, thereby realizing the calculation of singular value decomposition through quantum computing.

[0058] Of course, it is not necessary to achieve all the advantages described above at the same time when implementing any product or method of the present application. BRIEF DESCRIPTION OF THE DRAWINGS

[0059] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other embodiments can also be obtained based on these drawings.

[0060] Figure 1 A hardware structure block diagram of a computer terminal for a quantum circuit construction method for calculating singular values ​​according to an embodiment of the present application;

[0061] Figure 2 This is a first schematic diagram of a method for constructing a quantum circuit for calculating singular values ​​according to an embodiment of the present application;

[0062] Figure 3 This is a first schematic diagram of a variational quantum circuit according to an embodiment of the present application;

[0063] Figure 4 This is a second schematic diagram of a variational quantum circuit according to an embodiment of the present application;

[0064] Figure 5 This is a schematic diagram of a possible implementation of step S206 in an embodiment of the present application;

[0065] Figure 6 This is a second schematic diagram of a method for constructing a quantum circuit for calculating singular values ​​according to an embodiment of the present application;

[0066] Figure 7 A schematic diagram of a singular value calculation model based on quantum circuits according to an embodiment of the present application. DETAILED DESCRIPTION

[0067] The following will be combined with the drawings in the embodiments of this application to clearly and completely describe the technical solutions in the embodiments of this application. Obviously, the embodiments described are only part of the embodiments of this application, not all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field based on this application are within the scope of protection of this application.

[0068] In order to realize the calculation of singular value decomposition through quantum computing, an embodiment of the present application provides a quantum circuit construction method for calculating singular values. The method can be applied to electronic devices such as computer terminals, specifically ordinary computers, quantum computers, etc.

[0069] The following describes it in detail by taking running on a computer terminal as an example. Figure 1 FIG. 1 is a hardware structure block diagram of a computer terminal for a method of constructing a quantum circuit for calculating singular values ​​according to an exemplary embodiment. Figure 1 As shown, the computer terminal may include one or more ( Figure 1 Only one is shown in the figure) processor 102 (processor 102 may include but is not limited to a microprocessor MCU or a programmable logic device FPGA and other processing devices) and a memory 104 for storing a quantum circuit construction method based on a quantum circuit. Optionally, the above-mentioned computer terminal may also include a transmission device 106 for communication functions and an input and output device 108. It will be understood by those skilled in the art that Figure 1 The structure shown is only for illustration and does not limit the structure of the above-mentioned computer terminal. For example, the computer terminal may also include Figure 1 More or fewer components than shown, or with Figure 1 Different configurations shown.

[0070] Memory 104 can be used to store software programs and modules for application software, such as the program instructions / modules corresponding to the quantum circuit construction method for calculating singular values ​​in the embodiment of the present invention. Processor 102 executes various functional applications and data processing by running the software programs and modules stored in memory 104, thereby implementing the above-mentioned method. Memory 104 may include high-speed random access memory and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, memory 104 may further include memory remotely located relative to processor 102, and these remote memories may be connected to the computer terminal via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof.

[0071] The transmission device 106 is used to receive or send data via a network. A specific example of the aforementioned network may include a wireless network provided by a communications provider of a computer terminal. In one embodiment, the transmission device 106 includes a network interface controller (NIC), which can be connected to other network devices via a base station to enable communication with the Internet. In another embodiment, the transmission device 106 may be a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.

[0072] It's important to note that a true quantum computer has a hybrid architecture, consisting of two main components: a classical computer, responsible for performing classical computations and control, and a quantum device, responsible for running quantum programs and thus achieving quantum computations. A quantum program is a sequence of instructions written in a quantum language, such as QRunes, that can be executed on a quantum computer. This supports quantum logic gate operations and ultimately enables quantum computations. Specifically, a quantum program is a sequence of instructions that operate quantum logic gates in a specific time sequence.

[0073] In practical applications, due to the limitations of the development of quantum device hardware, quantum computing simulations are usually required to verify quantum algorithms, quantum applications, and the like. Quantum computing simulation is the process of simulating the operation of quantum programs corresponding to specific problems using a virtual architecture (i.e., a quantum virtual machine) built with the resources of an ordinary computer. Generally, it is necessary to construct a quantum program corresponding to a specific problem. The quantum program referred to in the embodiments of the present invention is a program written in a classical language to characterize quantum bits and their evolution, in which quantum bits, quantum logic gates, and the like related to quantum computing are represented by corresponding classical codes.

[0074] Quantum circuits, as a manifestation of quantum programs, also known as quantum logic circuits, are the most commonly used general quantum computing model. They represent circuits that operate on quantum bits in an abstract concept. Their components include quantum bits, circuits (timelines), and various quantum logic gates. Finally, the results often need to be read out through quantum measurement operations.

[0075] Unlike traditional circuits, which are connected by metal wires to transmit voltage or current signals, in quantum circuits, the circuits can be seen as connected by time. In other words, the state of the quantum bit naturally evolves over time, following the instructions of the Hamiltonian operator until it encounters a logic gate and is operated.

[0076] A quantum program corresponds to a total quantum circuit as a whole, and the quantum program refers to the total quantum circuit, wherein the total number of qubits in the total quantum circuit is the same as the total number of qubits of the quantum program. It can be understood that a quantum program can be composed of a quantum circuit, a measurement operation for a qubit in the quantum circuit, a register for storing measurement results, and a control flow node (jump instruction). A quantum circuit can include tens, hundreds or even thousands of quantum logic gate operations. The execution process of a quantum program is the process of executing all quantum logic gates in a certain time sequence. It should be noted that the time sequence refers to the time sequence of the execution of a single quantum logic gate.

[0077] It should be noted that in classical computing, the most basic unit is a bit, and the most basic control mode is a logic gate, which can be combined to achieve the purpose of controlling the circuit. Similarly, the way to process qubits is quantum logic gates. Using quantum logic gates can evolve quantum states, and quantum logic gates are the basis of quantum circuits. Quantum logic gates include single-bit quantum logic gates such as Hadamard gate (H gate), Pauli-X gate (X gate), Pauli-Y gate (Y gate), Pauli-Z gate (Z gate), RX gate (RX rotation gate), RY gate (RY rotation gate), RZ gate (RZ rotation gate), and the like; and multi-bit quantum logic gates such as CNOT gate, CR gate, iSWAP gate, Toffoli gate, and the like. Quantum logic gates are generally represented by unitary matrices, which are not only matrix forms, but also operations and transformations. The effect of a general quantum logic gate on a quantum state is calculated by left multiplying the quantum state right vector by a unitary matrix.

[0078] Next, the quantum circuit construction method for computing singular values and the singular value computation model based on the quantum circuit of the embodiment of the present application are further described and explained.

[0079] Referring to Figure 2 , Figure 2 FIG. 1 is a flowchart of a quantum circuit construction method for computing singular values according to an embodiment of the present application. The method can include the following steps:

[0080] S201, obtaining a basis of a first to-be-measured system and a basis of a second to-be-measured system.

[0081] The first and second systems to be measured are two systems that require singular value decomposition (SVD). For example, in the field of signal processing, the first system to be measured can be a noise signal, and the second system to be measured can be a data signal. The first and second systems to be measured can be represented in the form of a vector space, where a basis (also called a basis) is a fundamental tool for describing and characterizing a vector space. A basis of a vector space is a special subset of it, and the elements of the basis are called basis vectors. Any element in a vector space can be uniquely represented as a linear combination of the basis vectors.

[0082] S202. Determine a tensor product of a composite system of the first system to be measured and the second system to be measured based on a basis of the first system to be measured and a basis of the second system to be measured; wherein the tensor product is represented by a first coefficient matrix, a basis of the first system to be measured, and a basis of the second system to be measured.

[0083] In the realm of vector spaces, homomorphisms between objects are linear mappings. Given the vector space A of the first system to be measured and the vector space B of the second system to be measured, construct a vector space Z such that all bilinear mappings defined on AxB can be replaced by a single linear mapping defined on Z. Then, Z is the tensor product of A and B. Using the basis of the first and second systems to be measured, the tensor product of the composite system of the first and second systems can be expressed.

[0084] The tensor product of the composite system is represented by the first coefficient matrix, the basis of the first system to be measured, and the basis of the second system to be measured. In one possible implementation, the tensor product of the composite system of the first system to be measured and the second system to be measured can be represented by the following form:

[0085]

[0086] Among them, |ψ> AB represents the tensor product, a iu represents the element in row i and column u of the first coefficient matrix, |i> A represents the basis of the first system to be measured, |u> B represents the basis of the second system to be measured. In one example, the first coefficient matrix may be a covariance matrix.

[0087] S203 , performing singular value decomposition on the first coefficient matrix to obtain a quantum expression of the tensor product, wherein the quantum expression of the tensor product is represented by singular values, the state of the first system to be measured, and the state of the second system to be measured.

[0088] Singular value decomposition is a decomposition method that can be applied to any matrix. The first coefficient matrix C is decomposed into singular values:

[0089] C=UDV T

[0090] Where D is a diagonal matrix, U and V are both unitary matrices. For the sake of distinction, U is referred to as the first unitary matrix and V is referred to as the second unitary matrix.

[0091] Because both U and V are unitary matrices, the state of the first system to be measured can be represented by the first unitary matrix and the basis of the first system to be measured, and the state of the second system to be measured can be represented by the second unitary matrix and the basis of the second system to be measured. Combining the singular values, the state of the first system to be measured, and the state of the second system to be measured, we obtain a quantum representation of the tensor product.

[0092] S204: Construct a variational quantum circuit based on the quantum expression of the tensor product, wherein the variational quantum circuit includes a first quantum system subcircuit and a second quantum system subcircuit, each of the first quantum system subcircuit and the second quantum system subcircuit includes a plurality of quantum logic gates, the first quantum system subcircuit is used to perform quantum calculation on the state of the first system to be measured, and the second quantum system subcircuit is used to perform quantum calculation on the state of the second system to be measured.

[0093] The variational quantum circuit (also known as a quantum neural network) includes multiple quantum logic gates with variable parameters. Corresponding to the quantum representation of the convenient tensor product, the variational quantum circuit in the embodiments of the present application includes two parts, namely a first quantum system subcircuit and a second quantum system subcircuit. The first quantum system subcircuit is used to perform quantum calculations on the state of the first system to be measured, and the second quantum system subcircuit is used to perform quantum calculations on the state of the second system to be measured.

[0094] S205 , encoding the state of the first system to be measured and the state of the second system to be measured into quantum states, and inputting the states into the variational quantum circuit to obtain quantum observation results of the variational quantum circuit.

[0095] The state of the first system to be measured is encoded as a quantum state as the input of the first quantum system sub-circuit, and the state of the second system to be measured is encoded as a quantum state as the input of the second quantum system sub-circuit. After the action of the variational quantum circuit, the quantum observation result of the variational quantum circuit is obtained.

[0096] S206, adjusting the quantum logic gate according to the quantum observation result to obtain a quantum circuit for calculating singular values.

[0097] The variable parameters of the quantum logic gates in the variational quantum circuit are adjusted according to the quantum observation result, a new state of the first to-be-measured system and a new state of the second to-be-measured system are selected, and the adjustment of the quantum logic gates of the variational quantum circuit is continued, and finally the quantum circuit for calculating the singular value is obtained.

[0098] In the embodiment of the application, the tensor product of the composite system of the first to-be-measured system and the second to-be-measured system is determined, and the variational quantum circuit is constructed according to the quantum expression form of the tensor product; the state of the first to-be-measured system and the state of the second to-be-measured system are taken as the input of the variational quantum circuit, and the quantum observation result of the variational quantum circuit is obtained; the quantum logic gate in the variational quantum circuit is adjusted according to the quantum observation result, and finally the quantum circuit for calculating the singular value is obtained. The quantum circuit for calculating the singular value can realize the calculation of the singular value of the first to-be-measured system and the second to-be-measured system, so as to realize the calculation of the singular value decomposition through quantum calculation.

[0099] The process of singular value decomposition of the first coefficient matrix is described below. In a possible implementation, the singular value decomposition of the first coefficient matrix represents that the quantum expression form of the tensor product is obtained, which includes:

[0100] Step one, singular value decomposition of the first coefficient matrix represents:

[0101]

[0102] From the above analysis, it can be seen that the singular value decomposition of the first coefficient matrix C can be represented as: C = UDV T , which is further represented in the form of element multiplication, that is, wherein, U ij is the element of the i-th row and the j-th column of the first unitary matrix, V ju is the element of the j-th row and the u-th column of the second unitary matrix, and λ j is the j-th singular value.

[0103] Step two, basis change of the first unitary matrix and the second unitary matrix:

[0104] ∑ i U ij |i> A = |j> A

[0105] ∑ μ V jμ |μ> B = |j> B

[0106] The first unitary matrix U and the second unitary matrix V are both unitary matrices, and thus the basis change is as follows: ∑i U ij |i> A =|j> A ,∑ μ V jμ |μ> B =|j> B .

[0107] Step 3: The quantum expression of tensor product is:

[0108]

[0109] ∑ i U ij |i> A =|j> A ,∑ μ V jμ |μ> B =|j> B Substitute into In the quantum expression of tensor product, we can get the tensor product. ij is the element in the i-th row and j-th column of the first unitary matrix, V ju is the element in the jth row and uth column of the second unitary matrix, λ j is the jth singular value; |j> A represents the state of the first system to be measured, |j> B Indicates the state of the second system to be measured.

[0110] In the embodiments of the present application, a specific process for determining the quantum expression of the tensor product is provided. The eigenvalues ​​of the first coefficient matrix (covariance matrix) are directly calculated. Using a matrix diagonalization algorithm, the number of parameters is reduced by half, thereby increasing the computational speed and ultimately the computational speed of the singular value decomposition. For example, in signal processing scenarios, the singular value decomposition of the noise signal and the data signal can be quickly calculated, thereby quickly separating the noise signal from the data signal and increasing the real-time performance of signal communication.

[0111] The specific structure of the variational quantum circuit can be set according to actual conditions. For the quantum expression of the tensor product, in one possible implementation, a single rotation logic gate acts on the first quantum bit, a single rotation logic gate acts on the second quantum bit, and a CNOT gate acts on the first and second quantum bits; the second quantum system subcircuit includes a single rotation logic gate acts on the third quantum bit, a single rotation logic gate acts on the fourth quantum bit, and a CNOT gate acts on the third and fourth quantum bits.

[0112] The state of the first to-be-measured system and the state of the second to-be-measured system are encoded into quantum states, and are input into the variational quantum circuit to obtain quantum observation results of the variational quantum circuit, including:

[0113] The state of the first to-be-measured system is encoded into a quantum state of a first qubit and a quantum state of a second qubit, and the state of the second to-be-measured system is encoded into a quantum state of a third qubit and a quantum state of a fourth qubit;

[0114] The quantum state of the first qubit and the quantum state of the second qubit are input into the first quantum system sub-circuit, and the quantum state of the third qubit and the quantum state of the fourth qubit are input into the second quantum system sub-circuit; the first qubit and the second qubit are measured to obtain quantum observation results of the first to-be-measured system; and the third qubit and the fourth qubit are measured to obtain quantum observation results of the second to-be-measured system.

[0115] In one example, referring to Figure 3 , Figure 3 is a schematic diagram of a variational quantum circuit of an embodiment of the present application, in which the number of single rotation logic gates and CNOT gates is only for illustration, and can be customized according to actual conditions. The state of the first to-be-measured system is represented by a first qubit and a second qubit, and the state of the second to-be-measured system is represented by a third qubit and a fourth qubit. The first qubit and the second qubit are input as inputs of a first quantum system sub-circuit, and the third qubit and the fourth qubit are input as inputs of a second quantum system sub-circuit. After the action of each single rotation logic gate and CNOT gate, the final result of the variational quantum circuit is observed to obtain quantum observation results, wherein the quantum observation results include quantum observation results of the first to-be-measured system and quantum observation results of the second to-be-measured system.

[0116] The number of single rotation logic gates and CNOT gates can be designed according to actual requirements of calculation. In one possible implementation, referring to Figure 4 , the single rotation logic gates acting on the first qubit include RX(θ1) gates, RY(θ5) gates, RZ(θ9) gates, RX(θ 13 ) gates, RY(θ 17 ) gates, and RZ(θ 21 ) gates.

[0117] The single rotation logic gates acting on the second qubit include RX(θ2) gates, RY(θ6) gates, RZ(θ 10 ) gates, RX(θ 14 ) gates, RY(θ 18 ) gates, and RZ(θ 22)Door;

[0118] The CNOT gates acting on the first qubit and the second qubit include a first CNOT gate, a third CNOT gate, a fifth CNOT gate, a seventh CNOT gate, and a ninth CNOT gate;

[0119] The single rotation logic gates acting on the third qubit include RX(θ3) gate, RY(θ7) gate, RZ(θ 11 ) gate, RX(θ 15 ) gate, RY(θ 19 ) gate, RZ(θ 23 )Door;

[0120] The single rotation logic gates acting on the fourth qubit include RX(θ4) gate, RY(θ8) gate, RZ(θ 12 ) gate, RX(θ 16 ) gate, RY(θ 20 ) gate, RZ(θ 24 )Door;

[0121] The CNOT gates acting on the first qubit and the second qubit include a second CNOT gate, a fourth CNOT gate, a sixth CNOT gate, an eighth CNOT gate, and a tenth CNOT gate;

[0122] Among them, the outputs of the RX(θ1) gate and the RX(θ2) gate are connected to the input of the first CNOT gate, the outputs of the RX(θ3) gate and the RX(θ4) gate are connected to the input of the second CNOT gate, the outputs of the RY(θ5) gate and the RY(θ6) gate are connected to the input of the third CNOT gate, the outputs of the RY(θ7) gate and the RY(θ8) gate are connected to the input of the fourth CNOT gate, and the outputs of the RZ(θ9) gate and the RZ(θ10) gate are connected to the input of the fourth CNOT gate. 10 ) gate’s output is connected to the input of the fifth CNOT gate, RZ(θ 11 ) gate and RZ(θ 12 ) gate’s output is connected to the input of the sixth CNOT gate, RX(θ 13 ) gate and RX(θ 14 ) gate’s output is connected to the input of the seventh CNOT gate, RX(θ 15 ) gate and RX(θ 16 ) gate’s output is connected to the input of the eighth CNOT gate, RY(θ 17 ) gate and RY(θ 18 ) gate’s output is connected to the input of the ninth CNOT gate, RY(θ 19 ) gate and RY(θ 20 ) gate’s output is connected to the input of the tenth CNOT gate.

[0123] in, Figure 4 Each CNOT gate in the is shown. In the embodiments of the present application, the specific structure of the variational quantum circuit is given, and the calculation of singular value decomposition through quantum calculation is realized.

[0124] Next, the adjustment process of the quantum logic gate of the variational quantum circuit is exemplified. In a possible implementation, referring to Figure 5 The above quantum logic gate is adjusted according to the above quantum observation result, and a quantum circuit for calculating singular value is obtained, including:

[0125] S501, according to the above quantum observation result, the probability that the quantum observation result of the first to-be-measured system is the same as the quantum observation result of the second to-be-measured system is calculated, and the loss of the variational quantum circuit is determined based on the probability.

[0126] The quantum observation result of the first to-be-measured system is the same as the quantum observation result of the second to-be-measured system, that is, the observed quantum state of the first to-be-measured system is the same as the quantum state of the second to-be-measured system.

[0127] Taking 2+2 quantum bits as an example, the quantum state of the first to-be-measured system can be |00>, |01>, |10>, |11>, and the quantum state of the second to-be-measured system can be |00>, |01>, |10>, |11>; when the quantum state of the first to-be-measured system is |00>, the quantum state of the second to-be-measured system is also |00>, the quantum observation result of the first to-be-measured system is the same as the quantum observation result of the second to-be-measured system; similarly, when the quantum state of the first to-be-measured system is |01>, the quantum state of the second to-be-measured system is also |01>, the quantum observation result of the first to-be-measured system is the same as the quantum observation result of the second to-be-measured system; similarly, when the quantum state of the first to-be-measured system is |10>, the quantum state of the second to-be-measured system is also |10>, the quantum observation result of the first to-be-measured system is the same as the quantum observation result of the second to-be-measured system; similarly, when the quantum state of the first to-be-measured system is |11>, the quantum state of the second to-be-measured system is also |11>, the quantum observation result of the first to-be-measured system is the same as the quantum observation result of the second to-be-measured system. The probability of each same state is calculated respectively, and the loss of the variational quantum circuit is calculated based on the probability of each same state.

[0128] In a possible implementation, the above calculation of the probability that the quantum observation result of the first to-be-measured system is the same as the quantum observation result of the second to-be-measured system, and the determination of the loss of the variational quantum circuit based on the probability, includes:

[0129] According to the quantum observation result, P(|0000>), P(|0101>), P(|1010>), and P(|1111>) are counted respectively, and the loss L(θ) of the variational quantum circuit is calculated as L(θ) = 1 - P(|0000>)-P(|0101>)-P(|1010>)-P(|1111>).

[0130] P(|0000>) represents the probability that the quantum observation result of the first to-be-measured system is |00> and the quantum observation result of the second to-be-measured system is |00>, P(|0101>) represents the probability that the quantum observation result of the first to-be-measured system is |01> and the quantum observation result of the second to-be-measured system is |01>, P(|1010>) represents the probability that the quantum observation result of the first to-be-measured system is |10> and the quantum observation result of the second to-be-measured system is |10>, and P(|1111>) represents the probability that the quantum observation result of the first to-be-measured system is |11> and the quantum observation result of the second to-be-measured system is |11>.

[0131] S502, according to the loss of the variational quantum circuit, adjusting the variable parameters of the quantum logic gate in the variational quantum circuit.

[0132] According to the loss of the variational quantum circuit, the variable parameters of the quantum logic gate in the variational quantum circuit are adjusted by gradient descent method, Newton algorithm, conjugate gradient method, Cauchy-Newton method or damped least square method.

[0133] S503, selecting new states of the first to-be-measured system and the second to-be-measured system to continue training the variational quantum circuit until the loss of the variational quantum circuit converges, and obtaining a quantum circuit for calculating singular values.

[0134] Taking 2+2 quantum bits as an example, the target of the variational quantum circuit training is to make the probabilities of |00>|00>, |01>|01>, |10>|10>, and |11>|11> be 0, and the form of the trained circuit can be Selecting new states of the first to-be-measured system and the second to-be-measured system to continue training the variational quantum circuit until the loss of the variational quantum circuit converges (the loss tends to 0), and obtaining a quantum circuit for calculating singular values.

[0135] In the embodiments of the present application, the specific process of adjusting the quantum logic gate of the variational quantum circuit is given, and the variable parameters of the quantum logic gate are adjusted until the loss of the variational quantum circuit converges, thereby obtaining a quantum circuit for calculating singular values. The quantum circuit for calculating singular values can realize the calculation of singular values of the first to-be-measured system and the second to-be-measured system, thereby realizing the calculation of singular value decomposition through quantum calculation.

[0136] The following is an example of the process of calculating the singular value entropy using the "quantum circuit for calculating singular values". In one possible implementation, see Figure 6 , the above method further includes:

[0137] S601 , encoding the state of the first system to be measured and the state of the second system to be measured into quantum states, and inputting the states into a quantum circuit for calculating singular values, to obtain state observation results of the quantum circuit for calculating singular values.

[0138] The state observation result of the first measurement system is the observed quantum state of the first measurement system. The state observation result of the second measurement system is the same, namely the observed quantum state of the second measurement system. Taking 2+2 qubits as an example, the quantum states of the first measurement system can be |00>, |01>, |10>, |11>. Similarly, the quantum states of the second measurement system can be |00>, |01>, |10>, |11>.

[0139] When the quantum state of the first system to be measured is |00> and the quantum state of the second system to be measured is also |00>, the quantum observation result of the first system to be measured is the same as the quantum observation result of the second system to be measured. Similarly, when the quantum state of the first system to be measured is |01> and the quantum state of the second system to be measured is also |01>, the quantum observation result of the first system to be measured is the same as the quantum observation result of the second system to be measured. Similarly, when the quantum state of the first system to be measured is |10> and the quantum state of the second system to be measured is also |10>, the quantum observation result of the first system to be measured is the same as the quantum observation result of the second system to be measured. Similarly, when the quantum state of the first system to be measured is |11> and the quantum state of the second system to be measured is also |11>, the quantum observation result of the first system to be measured is the same as the quantum observation result of the second system to be measured. The probability of each identical state is calculated separately, and the loss of the variational quantum circuit is calculated based on the probability of each identical state.

[0140] S602 : Determine, based on the state observation result, an observation probability value when the state observation result of the first system to be measured is the same as that of the second system to be measured.

[0141] When the quantum state of the first to-be-measured system is |00> and the quantum state of the second to-be-measured system is also |00>, the quantum observation result of the first to-be-measured system is the same as the quantum observation result of the second to-be-measured system; similarly, when the quantum state of the first to-be-measured system is |01> and the quantum state of the second to-be-measured system is also |01>, the quantum observation result of the first to-be-measured system is the same as the quantum observation result of the second to-be-measured system; similarly, when the quantum state of the first to-be-measured system is |10> and the quantum state of the second to-be-measured system is also |10>, the quantum observation result of the first to-be-measured system is the same as the quantum observation result of the second to-be-measured system; similarly, when the quantum state of the first to-be-measured system is |11> and the quantum state of the second to-be-measured system is also |11>, the quantum observation result of the first to-be-measured system is the same as the quantum observation result of the second to-be-measured system.

[0142] Taking 2+2 quantum bits as an example, the observation probability values when the state observation results of the first to-be-measured system and the second to-be-measured system are the same include: P1=P(|0000>), P2=P(|0101>), P3=P(|1010>), and P4=P(|1111>).

[0143] In S603, the probability square root operation is performed on the observation probability values to obtain the singular value entropy.

[0144] In a possible implementation, the probability square root operation is performed on the observation probability values to obtain the singular value entropy, including:

[0145] The singular value entropy is calculated by the following formula:

[0146]

[0147] Wherein, S represents the singular value entropy, P i In an example, taking 2+2 quantum bits as an example, i belongs to 1 to 4, P1=P(|0000>), P2=P(|0101>), P3=P(|1010>), and P4=P(|1111>).

[0148] In the embodiments of the present application, the singular value of the first to-be-measured system and the second to-be-measured system is calculated by using the quantum circuit for calculating the singular value, and the calculation speed of the singular value can be greatly improved by using the entanglement property of the quantum circuit. In the scene of signal processing, the singular values of the noise signal and the data signal can be quickly calculated, so that the separation of the noise signal and the data signal is quickly realized, and the real-time performance of signal communication is increased.

[0149] The embodiments of the present application also provide a singular value calculation model based on a quantum circuit, as shown inFigure 7 comprising:

[0150] a data preprocessing module 701, a quantum circuit for computing singular value 702, a classical computing module 703;

[0151] The data preprocessing module 701 is configured to encode the state of the first to-be-measured system and the state of the second to-be-measured system into a quantum state.

[0152] The quantum circuit 702 includes a first quantum system sub-circuit and a second quantum system sub-circuit, and the first quantum system sub-circuit and the second quantum system sub-circuit each include a plurality of quantum logic gates; the first quantum system sub-circuit is configured to perform quantum computation on the state of the first to-be-measured system, and the second quantum system sub-circuit is configured to perform quantum computation on the state of the second to-be-measured system to obtain a state observation result of the quantum circuit for computing singular value.

[0153] The classical computing module 703 is configured to determine an observation probability value that the state observation result of the first to-be-measured system is the same as the state observation result of the second to-be-measured system according to the state observation result, and perform a probability square root operation on the observation probability value to obtain a singular value entropy.

[0154] The specific structure of the quantum circuit 702 for computing singular value can refer to the variational quantum circuit in the above embodiment, which will not be described here. The data preprocessing module 701 and the classical computing module 703 can be implemented by relying on the hardware of a classical computer, for example, the data preprocessing module 701 and the classical computing module 703 can be a software process running on a classical computer. In other embodiments, the data preprocessing module 701 and the classical computing module 703 can also be quantum circuits. The classical computer can include a processor, a memory, a communication interface and a communication bus; wherein the processor, the communication interface and the memory complete mutual communication through the communication bus; the memory is used to store a computer program; the processor is used to execute the computer program stored in the memory to realize the functions of the data preprocessing module 701 and the classical computing module 703.

[0155] In the embodiments of the present application, the quantum circuit for computing singular value is used to realize the computation of the singular value of the first to-be-measured system and the second to-be-measured system, and the entanglement property of the quantum circuit is used to greatly improve the computation speed of the singular value. In the face of signal processing scenarios, the singular values of the noise signal and the data signal can be quickly calculated, so that the separation of the noise signal and the data signal is quickly realized, and the real-time performance of signal communication is increased.

[0156] The communication bus mentioned in the classic computer mentioned above may be a PCI (Peripheral Component Interconnect) bus or an EISA (Extended Industry Standard Architecture) bus. This communication bus can be divided into address buses, data buses, control buses, etc. For ease of illustration, the figure shows only one thick line, but this does not mean that there is only one bus or only one type of bus.

[0157] The communication interface is used for communication between the above-mentioned classical computers and other devices.

[0158] The memory may include RAM (Random Access Memory) or NVM (Non-Volatile Memory), such as at least one disk storage. Optionally, the memory may also be at least one storage device located away from the aforementioned processor.

[0159] The above-mentioned processor can be a general-purpose processor, including a CPU (Central Processing Unit), an NP (Network Processor), etc.; it can also be a DSP (Digital Signal Processing), an ASIC (Application Specific Integrated Circuit), an FPGA (Field-Programmable Gate Array) or other programmable logic devices, discrete gate or transistor logic devices, and discrete hardware components.

[0160] The quantum circuit construction method for calculating singular values ​​and the singular value calculation model based on quantum circuits in this application can not only be applied to the field of signal processing, as mentioned above, the singular value decomposition can also be applied to fields such as statistics. For example,

[0161] Systemic risk can also be assessed using singular value entropy. In fact, when a financial crisis occurs, stock prices across an entire market or across clusters of several industrial sectors exhibit collective behavior. This means that the eigenvalues ​​of the stock price correlation matrix almost degenerate. Roughly speaking, the probability distribution of the eigenvalues ​​becomes significantly sharper. Consequently, the singular value entropy is relatively small, indicating a high risk of a financial crisis. Based on this theory and singular value decomposition, the first and second systems to be measured can be represented by the prices of two stocks, allowing for crucial analysis of the current market's systemic risk assessment, effectively predicting the onset of a financial crisis.

[0162] The embodiment of the present application further provides a computer readable storage medium, wherein the computer readable storage medium stores a computer program, and the computer program is executed by a processor to implement the quantum circuit construction method for computing singular values.

[0163] In another embodiment of the present application, a computer program product including instructions, which when executed on a computer, causes the computer to implement the quantum circuit construction method for computing singular values.

[0164] In the above embodiments, the implementation can be achieved by hardware, software, firmware, or any combination thereof. When implemented by software, the implementation can be in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the whole or part of the processes or functions described in the embodiments of the present application are generated. The computer can be a general purpose computer, a special purpose computer, a computer network, or other programmable apparatus. The computer instructions can be stored in a computer readable storage medium or transmitted from one computer readable storage medium to another computer readable storage medium, for example, the computer instructions can be transmitted from one website, computer, server or data center to another website, computer, server or data center through wired (such as coaxial cable, optical fiber, digital subscriber line) or wireless (such as infrared, wireless, microwave, etc.) manner. The computer readable storage medium can be any available medium that can be accessed by a computer or a data storage device such as a server, data center, etc. integrated with one or more available media. The available medium can be a magnetic medium (for example, floppy disk, hard disk, magnetic tape), an optical medium (for example, DVD), or a semiconductor medium (for example, solid state disk (SSD)), etc.

[0165] It should be noted that, in this article, the technical features in each optional solution can be combined to form a solution as long as there is no contradiction, and these solutions are all within the scope disclosed in this application. Relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply that there is any such actual relationship or order between these entities or operations. Moreover, the term "comprise", "comprising" or any other variant thereof is intended to cover non-exclusive inclusion, so that the process, method, article or equipment including a series of elements not only include those elements, but also include other elements not clearly listed, or also include elements inherent to such process, method, article or equipment. In the absence of more restrictions, the elements limited by the sentence "comprising a..." do not exclude the presence of other identical elements in the process, method, article or equipment including the elements.

[0166] Each embodiment in this specification is described in a related manner. Each embodiment focuses on the differences from other embodiments, and the same or similar parts between the embodiments can be referenced to each other.

[0167] The above description is only a preferred embodiment of the present application and is not intended to limit the scope of protection of the present application. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principles of the present application are included in the scope of protection of the present application.

Claims

1. A method for constructing a quantum circuit for calculating singular values, characterized in that: The method comprises: Obtaining a basis of a first system to be measured and a basis of a second system to be measured; Determining a tensor product of a composite system of the first system to be measured and the second system to be measured based on a basis of the first system to be measured and a basis of the second system to be measured; wherein the tensor product is represented by a first coefficient matrix, a basis of the first system to be measured, and a basis of the second system to be measured; Performing singular value decomposition on the first coefficient matrix to obtain a quantum expression of the tensor product, wherein the quantum expression of the tensor product is represented by singular values, a state of the first system to be measured, and a state of the second system to be measured; Constructing a variational quantum circuit according to the quantum expression of the tensor product, wherein the variational quantum circuit includes a first quantum system subcircuit and a second quantum system subcircuit, the first quantum system subcircuit and the second quantum system subcircuit each include a plurality of quantum logic gates, the first quantum system subcircuit is used to perform quantum calculation on the state of the first system to be measured, and the second quantum system subcircuit is used to perform quantum calculation on the state of the second system to be measured; Encoding the state of the first system to be measured and the state of the second system to be measured into quantum states, and inputting the states into the variational quantum circuit to obtain quantum observation results of the variational quantum circuit; Adjusting the quantum logic gate according to the quantum observation result to obtain a quantum circuit for calculating singular values; Encoding the state of the first system to be measured and the state of the second system to be measured into quantum states, and inputting the states into a quantum circuit for calculating singular values, to obtain state observation results of the quantum circuit for calculating singular values; Determining, based on the state observation result, an observation probability value when the state observation results of the first system to be measured and the second system to be measured are the same; A probability square root operation is performed on the observed probability value to obtain a singular value entropy.

2. The method according to claim 1, characterized in that The first quantum system subcircuit includes a single rotation logic gate acting on the first quantum bit, a single rotation logic gate acting on the second quantum bit, and a CNOT gate acting on the first quantum bit and the second quantum bit; the second quantum system subcircuit includes a single rotation logic gate acting on the third quantum bit, a single rotation logic gate acting on the fourth quantum bit, and a CNOT gate acting on the third quantum bit and the fourth quantum bit; The encoding of the state of the first system to be measured and the state of the second system to be measured into quantum states and inputting the states into the variational quantum circuit to obtain quantum observation results of the variational quantum circuit includes: Encoding the state of the first system to be measured into the quantum state of a first qubit and the quantum state of a second qubit; encoding the state of the second system to be measured into the quantum state of a third qubit and the quantum state of a fourth qubit; Input the quantum state of the first quantum bit and the quantum state of the second quantum bit into the first quantum system subcircuit, and input the quantum state of the third quantum bit and the quantum state of the fourth quantum bit into the second quantum system subcircuit; measure the first quantum bit and the second quantum bit to obtain the quantum observation result of the first system to be measured; measure the third quantum bit and the fourth quantum bit to obtain the quantum observation result of the second system to be measured.

3. The method according to claim 2, characterized in that The step of adjusting the quantum logic gate according to the quantum observation result to obtain a quantum circuit for calculating a singular value includes: According to the quantum observation result, calculating a probability that the quantum observation result of the first system to be measured is the same as the quantum observation result of the second system to be measured, and determining the loss of the variational quantum circuit based on the probability; According to the loss of the variational quantum circuit, the variable parameters of the quantum logic gate in the variational quantum circuit are adjusted; New states of the first system to be measured and the second system to be measured are selected to continue training the variational quantum circuit until the loss of the variational quantum circuit converges, thereby obtaining a quantum circuit for calculating singular values.

4. The method according to claim 3, characterized in that The number of the first qubit, the second qubit, the third qubit, and the fourth qubit is 1, and calculating the probability that a quantum observation result of the first system to be measured is the same as a quantum observation result of the second system to be measured, and determining the loss of the variational quantum circuit based on the probability includes: According to the quantum observation results, P(|0000>), P(|0101>), P(|1010>), and P(|1111>) are respectively counted, wherein P(|0000>) represents the probability that the quantum observation result of the first system to be measured is |00> and the quantum observation result of the second system to be measured is |00>, P(|0101>) represents the probability that the quantum observation result of the first system to be measured is |01> and the quantum observation result of the second system to be measured is |01>, P(|1010>) represents the probability that the quantum observation result of the first system to be measured is |10> and the quantum observation result of the second system to be measured is |10>, and P(|1111>) represents the probability that the quantum observation result of the first system to be measured is |11> and the quantum observation result of the second system to be measured is |11>; Calculate the loss of the variational quantum circuit L(θ) = 1-P(|0000>)-P(|0101>)-P(|1010>)-P(|1111>).

5. The method according to claim 2, characterized in that The single rotation logic gates acting on the first quantum bit include RX(θ1) gate, RY(θ5) gate, RZ(θ9) gate, RX(θ 13 ) gate, RY(θ 17 ) gate, RZ(θ 21 )Door; The single rotation logic gates acting on the second qubit include RX(θ2) gate, RY(θ6) gate, RZ(θ 10 ) gate, RX(θ 14 ) gate, RY(θ 18 ) gate, RZ(θ 22 )Door; The CNOT gates acting on the first qubit and the second qubit include a first CNOT gate, a third CNOT gate, a fifth CNOT gate, a seventh CNOT gate, and a ninth CNOT gate; The single rotation logic gates acting on the third qubit include RX(θ3) gate, RY(θ7) gate, RZ(θ 11 ) gate, RX(θ 15 ) gate, RY(θ 19 ) gate, RZ(θ 23 )Door; The single rotation logic gates acting on the fourth qubit include RX(θ4) gate, RY(θ8) gate, RZ(θ 12 ) gate, RX(θ 16 ) gate, RY(θ 20 ) gate, RZ(θ 24 )Door; The CNOT gates acting on the first qubit and the second qubit include a second CNOT gate, a fourth CNOT gate, a sixth CNOT gate, an eighth CNOT gate, and a tenth CNOT gate; Among them, the outputs of the RX(θ1) gate and the RX(θ2) gate are connected to the input of the first CNOT gate, the outputs of the RX(θ3) gate and the RX(θ4) gate are connected to the input of the second CNOT gate, the outputs of the RY(θ5) gate and the RY(θ6) gate are connected to the input of the third CNOT gate, the outputs of the RY(θ7) gate and the RY(θ8) gate are connected to the input of the fourth CNOT gate, and the outputs of the RZ(θ9) gate and the RZ(θ10) gate are connected to the input of the fourth CNOT gate. 10 ) gate’s output is connected to the input of the fifth CNOT gate, RZ(θ 11 ) gate and RZ(θ 12 ) gate’s output is connected to the input of the sixth CNOT gate, RX(θ 13 ) gate and RX(θ 14 ) gate’s output is connected to the input of the seventh CNOT gate, RX(θ 15 ) gate and RX(θ 16 ) gate’s output is connected to the input of the eighth CNOT gate, RY(θ 17 ) gate and RY(θ 18 ) gate’s output is connected to the input of the ninth CNOT gate, RY(θ 19 ) gate and RY(θ 20 ) gate’s output is connected to the input of the tenth CNOT gate.

6. The method according to claim 1, characterized in that The determining, based on a basis of the first system to be measured and a basis of the second system to be measured, a tensor product of a composite system of the first system to be measured and the second system to be measured includes: The tensor product of the composite system of the first system to be measured and the second system to be measured is expressed as follows: Among them, |ψ> AB represents the tensor product, a iu represents the element in row i and column u of the first coefficient matrix, |i> A represents the basis of the first system to be measured, |u> B Denotes the basis of the second system to be measured.

7. The method according to claim 6, characterized in that The step of performing singular value decomposition on the first coefficient matrix to obtain a quantum expression of the tensor product includes: Perform singular value decomposition on the first coefficient matrix: Perform basis changes on the first and second unitary matrices: Σ i IN ij |i> A =|j> A ∑ μ V jμ |μ> B =|j> B Then the quantum expression of tensor product is: Among them, U ij is the element in the i-th row and j-th column of the first unitary matrix, V ju is the element in the jth row and uth column of the second unitary matrix, λ j is the jth singular value; |j> A represents the state of the first system to be measured, |j> B Indicates the state of the second system to be measured.

8. The method according to claim 1, characterized in that The performing a probability square root operation on the observed probability value to obtain a singular value entropy includes: The singular value entropy is calculated by the following formula: Among them, S represents the singular value entropy, P i is the observation probability value of the i-th case that the state observation results of the first system to be measured and the second system to be measured are the same.

9. A singular value calculation model based on quantum circuits, characterized in that: include: A data preprocessing module, a quantum circuit for calculating singular values, and a classical computing module, wherein the quantum circuit for calculating singular values ​​is constructed using the quantum circuit construction method according to any one of claims 1 to 8; The data preprocessing module is used to encode the state of the first system to be measured and the state of the second system to be measured into quantum states; The quantum circuit includes a first quantum system subcircuit and a second quantum system subcircuit, each of which includes a plurality of quantum logic gates; the first quantum system subcircuit is used to perform quantum calculation on the state of the first system to be measured, and the second quantum system subcircuit is used to perform quantum calculation on the state of the second system to be measured, to obtain a state observation result of the quantum circuit for calculating singular values; The classical calculation module is used to determine, based on the state observation results, an observation probability value when the state observation results of the first system to be measured and the second system to be measured are the same; and perform a probability square root operation on the observation probability value to obtain a singular value entropy.

Citation Information

Patent Citations

  • Quantum circuit decomposition method and device, storage medium and electronic device

    CN111563599A

  • Method and device for simulating quantum state amplitude in quantum circuit

    CN114692880A