Quantum Hamiltonian learning method, image segmentation method and license plate recognition method

By combining parameterized quantum circuits and Hamiltonian learning in quantum computing, a high reliability and high practical quantum Hamiltonian learning method is achieved by constructing unitary operators and quantum logic gates, and the problem of lack of combined research in the existing technology is solved.

CN114565096BActive Publication Date: 2025-03-25CENT SOUTH UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210194165.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-03-01
Publication Date
2025-03-25
Estimated Expiration
2042-03-01

AI Technical Summary

Technical Problem

There is a lack of research on combining parameterized quantum circuits with Hamiltonian learning in the prior art, which makes Hamiltonian learning impossible to effectively realize in quantum computing.

Method used

By determining the Hamiltonianity of the initial system and the final state system, constructing unitary operators and decomposing them, a quantum logic gate is obtained, a parametric quantum circuit is constructed, and a parametric quantum circuit is evolved on it, a loss function is calculated and the system parameters are updated, and Hamiltonian learning is realized.

Benefits of technology

The quantum Hamiltonian learning method with high reliability and high practicality is realized, which can effectively combine parametric quantum circuits to solve the application problem of Hamiltonian learning in quantum computing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114565096B_ABST
    Figure CN114565096B_ABST
Patent Text Reader

Abstract

The present invention discloses a quantum Hamiltonian learning method, including determining the Hamiltonian of the initial system and presetting the Hamiltonian of the final state system; constructing the corresponding unitary operator and decomposing it to obtain the corresponding quantum logic gate; constructing the final parameterized quantum circuit; bringing the initial system into the parameterized quantum circuit and evolving it to generate an intermediate state quantum system, calculating the loss function and updating the system parameters during the evolution process; comparing the expected value of the Hamiltonian of the intermediate state quantum system with the expected value of the Hamiltonian of the preset final state system and outputting the final quantum bit sorting and the expected value of the Hamiltonian of the corresponding system, completing the parameterized quantum Hamiltonian learning. The present invention also discloses an image segmentation method including the quantum Hamiltonian learning method, and a license plate recognition method including the image segmentation method. The present invention has higher reliability and better practicality.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of quantum computing, and specifically relates to a quantum Hamiltonian learning method, an image segmentation method and a license plate recognition method. Background Art

[0002] With the development of economy and technology and the improvement of people's living standards, quantum computing technology has begun to be gradually applied. At present, quantum computing has the potential to solve some basic problems, such as factoring integers or finding disordered data sets, so the research of quantum computing has attracted considerable attention.

[0003] Parameterized quantum circuits are a quantum circuit training method proposed in recent years. It can train and optimize quantum circuits by reducing the loss function of the parameters in the circuit until convergence. The characteristic of parameterized quantum circuits is that the corresponding quantum logic gates are obtained by decomposing the unitary operators containing parameters. Many quantum methods based on parameterized quantum circuits have been used to complete multiple application tasks on quantum computers, such as training bosonic sampling, improving principal component analysis, and realizing chemical measurements. Parameterized quantum circuits have the ability to characterize quantum algorithms. With the improvement of quantum computers, parameterized quantum circuits have a wide range of application scenarios.

[0004] Hamiltonian learning was proposed in 2014 as an important quantum machine learning technology. By learning the Hamiltonian to perceive unknown physical systems, it provides an important idea for solving the basic problems of preparing and measuring physical systems; the physical state of the system, etc., constitutes the basis of a large number of practical applications such as material analysis and semiconductor design. The Hamiltonian learning algorithm aims to learn quantum systems with Ising models by updating the evolution time. In recent years, the Hamiltonian learning algorithm has improved in terms of calculation accuracy and elimination of noise effects.

[0005] However, there is currently no research on the combination of parameterized quantum circuits and Hamiltonian learning. Summary of the invention

[0006] One of the purposes of the present invention is to provide a quantum Hamiltonian learning method which can realize Hamiltonian learning and has high reliability and good practicality.

[0007] A second object of the present invention is to provide an image segmentation method including the quantum Hamiltonian learning method.

[0008] A third object of the present invention is to provide a license plate recognition method including the image segmentation method.

[0009] The quantum Hamiltonian learning method provided by the present invention comprises the following steps:

[0010] S1. Determine the Hamiltonian of the initial system and preset the Hamiltonian of the final system;

[0011] S2. construct the corresponding unitary operator according to the Hamiltonian of the initial system and the Hamiltonian of the final system obtained in step S1;

[0012] S3. Decomposing the unitary operator constructed in step S2 to obtain the corresponding quantum logic gate;

[0013] S4. Constructing the final parameterized quantum circuit according to the quantum logic gate obtained in step S3;

[0014] S5. Bring the initial system into the parameterized quantum circuit constructed in step S4, and evolve it to generate an intermediate state quantum system; during the evolution process, calculate the loss function and update the system parameters;

[0015] S6. Calculate the expected value of the Hatch density of the intermediate state quantum system obtained in step S5 and the expected value of the Hatch density of the preset final state system, and compare them;

[0016] S7. According to the comparison result of step S6, the final quantum bit ordering and the expected value of the Hamiltonian of the corresponding system are output to complete the parameterized quantum Hamiltonian learning.

[0017] The step S1 of determining the Hamiltonian of the initial system and presetting the Hamiltonian of the final system specifically includes the following steps:

[0018] Determine the initial system to have a Hamiltonian H b A quantum system with a Hamiltonian H b satisfy Where N is the number of particles in the system; is the Pauli X operator;

[0019] The final state system is assumed to have a Hamiltonian H p A quantum system with a Hamiltonian H p satisfy Where I is the unit matrix; N is the number of particles in the system; is the Pauli Z operator; It is the direct product symbol in quantum computing.

[0020] Step S2 constructs the corresponding unitary operator based on the Hamiltonian of the initial system and the Hamiltonian of the final state system obtained in step S1, which specifically includes the following steps:

[0021] The quantum gates of the constructed quantum circuit are based on the cumulative multiplication of unitary transformations in U(α,β) with parameters α and β as unitary operator generators. Where M is the number of system evolution steps; α and β are the parameters that need to be updated in the parameterized quantum circuit; α ρ is the parameter of α in the ρth step of evolution; β ρ is the parameter of β in the ρth step of evolution; U(H b ,α ρ ) and U(H p ,β ρ ) is the quantum circuit of the ρth step of evolution, and U(H b ,α ρ ) is expressed as U(H p ,β ρ ) is expressed as Where i is the imaginary unit, H b is the Hamiltonian of the initial system, H p is the Hamiltonian of the final state system;

[0022] U(H b ,α ρ ) and U(H p ,β ρ ) is the corresponding unitary operator finally constructed.

[0023] Step S3 decomposes the unitary operator constructed in step S2 to obtain a corresponding quantum logic gate, which specifically includes the following steps:

[0024] The unitary operator U(H b ,α ρ ):

[0025]

[0026] Thus, the unitary operator U(H b ,α ρ ) is decomposed into several rotation angles of 2α ρ R x (2α ρ )Door;

[0027] The unitary operator U(H p ,β ρ ):

[0028]

[0029] In the formula is a constant term; then the latter term This breaks down into:

[0030]

[0031] Thus, the unitary operator U(Hp ,β ρ ) is decomposed into several rotation angles of -β ρ R z (-β ρ ) gate and CNOT gate.

[0032] The final parameterized quantum circuit is constructed according to the quantum logic gates obtained in step S3 in step S4, specifically, the corresponding quantum logic gates decomposed in step S3 are combined together according to the construction order of the unitary operator, so as to obtain the final parameterized quantum circuit.

[0033] The step S5 of bringing the initial system into the parameterized quantum circuit constructed in step S4 and performing evolution to generate an intermediate state quantum system specifically includes the following steps:

[0034] The initial system is brought into the parameterized quantum circuit constructed in step S4 to excite the initial system. In the parameterized quantum circuit, the initial system begins to spontaneously complete the system evolution link and begins to generate an intermediate state quantum system. The Hamiltonian H(t) of the intermediate state quantum system conforms to the formula Where t is the evolution time, T is the system temperature during the evolution process; H b is the Hamiltonian of the initial system; H p is the Hamiltonian of the preset final state system.

[0035] In the evolution process described in step S5, the loss function is calculated and the system parameters are updated, specifically, the loss function of the parameters α and β is calculated, and the parameters α and β are updated using the gradient descent optimization algorithm.

[0036] The loss function is calculated in the evolution process and the system parameters are updated, which specifically includes the following steps:

[0037] The gradient of the loss function L(α,β) is calculated using the following formula:

[0038]

[0039]

[0040] Where α j is the parameter of α at the jth step of evolution; β j is the parameter of β at the jth step of evolution; Δ j is the parameter of the jth direction; the update rules of α and β are:

[0041]

[0042]

[0043] Where γ is the adaptive learning rate that controls the update rate of the quantum circuit.

[0044] Step S7 outputs the final quantum bit order and the expected value of the Hamiltonian of the corresponding system according to the comparison result of step S6, which specifically includes the following steps:

[0045] Compare the expected value of the Hatt density quantity of the intermediate state quantum system with the expected value of the Hatt density quantity of the preset final state system:

[0046] If the difference between the expected value of the Hamiltonian of the intermediate state quantum system and the expected value of the Hamiltonian of the preset final state system is within the set range, the evolution is stopped, and the currently obtained quantum state system is taken as the final quantum state system, and the final quantum bit ordering and the expected value of the Hamiltonian of the corresponding system are output;

[0047] If the difference between the expected value of the Hatt density quantity of the intermediate state quantum system and the expected value of the Hatt density quantity of the preset final state system is not within the set range, the evolution continues.

[0048] The present invention also provides an image segmentation method including the quantum Hamiltonian learning method, which specifically includes the following steps:

[0049] A. Abstract the original image into an undirected network weighted graph, and establish a one-to-one correspondence between the position of each vertex in the graph and the quantum bit sorting;

[0050] B. Use the undirected network weighted graph established in step A as the initial system and substitute it into the above-mentioned parameterized quantum Hamiltonian learning method to complete the system evolution;

[0051] C. Obtain the output result of the parameterized quantum Hamiltonian learning method, and use the original image information corresponding to the quantum bit sorting with the highest expected value in the output result as the segmentation boundary;

[0052] D. Use the segmentation boundary obtained in step C to perform image segmentation on the original image, thereby completing the image segmentation of the original image.

[0053] The process described in step A of abstracting the original image into an undirected network weighted graph and establishing a one-to-one correspondence between the positions of each vertex in the graph and the quantum bit sequence specifically includes the following steps:

[0054] The original image is represented by an undirected network weighted graph G: the vertices in the graph G correspond to the pixels in the original image; the edge e connecting two vertices in the graph G ij Corresponding to pixel v in the original image i With adjacent pixels v j The relationship between or the corresponding pixel v in the original image i With adjacent area v jThe relationship between ij The weight w ij Corresponding to pixel v in the original image i With adjacent pixels v j The specific relationship between them or the corresponding pixel v in the original image i With adjacent area v j The specific relationship between them;

[0055] A one-to-one correspondence is established between the undirected network weighted graph G and the bit sequence of the quantum bits: the first pixel in the upper left corner of the undirected network weighted graph G is taken as the first quantum bit and the serial number is set to 0. From top to bottom and from left to right, a one-to-one correspondence is established between the undirected network weighted graph G and the bit sequence of the quantum bits.

[0056] The present invention also provides a license plate recognition method including the image segmentation method, which specifically includes the following steps:

[0057] a. Use the above image segmentation method to segment the target area, thereby completing feature extraction and obtaining corresponding extraction results;

[0058] b. Use a classifier to classify the extraction results obtained in step a to obtain corresponding classification results;

[0059] c. Normalize the classification results obtained in step b to obtain the information to be identified;

[0060] d. Extract the text and digital information from the information to be identified obtained in step d to obtain the corresponding license plate number and complete the license plate recognition.

[0061] The quantum Hamiltonian learning method and image segmentation method provided by the present invention not only realize the combination of Hamiltonian learning and parameterized quantum circuits through the innovative design of the parameterized quantum Hamiltonian learning method, but also creatively propose the parameterized quantum Hamiltonian learning method, and apply the Hamiltonian learning method to process the image segmentation problem, which has higher reliability and better practicality. BRIEF DESCRIPTION OF THE DRAWINGS

[0062] Figure 1 The figure is a flow chart of the learning method of the present invention.

[0063] Figure 2 A schematic diagram of the circuit structure of a parameterized quantum circuit constructed in the learning method of the present invention.

[0064] Figure 3 Schematic diagram of the process flow of the segmentation method of the present invention.

[0065] Figure 4 Schematic diagram of the segmentation principle of the segmentation method of the present invention.

[0066] Figure 5 The figure is a flow chart of the method for license plate recognition of the present invention. DETAILED DESCRIPTION

[0067] like Figure 1 The figure shows a flow chart of the learning method of the present invention: the quantum Hamiltonian learning method provided by the present invention comprises the following steps:

[0068] S1. Determine the Hamiltonian of the initial system and preset the Hamiltonian of the final system; specifically includes the following steps:

[0069] In the parameterized quantum Hamiltonian learning algorithm, the initial Hamiltonian of the system and the Hamiltonian system that is ultimately expected to be evolved should be determined in advance;

[0070] Determine the initial system to have a Hamiltonian H b A quantum system with a Hamiltonian H b satisfy Where N is the number of particles in the system; is the Pauli X operator;

[0071] The final state system is assumed to have a Hamiltonian H p A quantum system with a Hamiltonian H p satisfy Where I is the unit matrix; N is the number of particles in the system; is the Pauli Z operator; It is the direct product symbol in quantum computing;

[0072] S2. According to the Hamiltonian of the initial system and the Hamiltonian of the final system obtained in step S1, construct the corresponding unitary operator; specifically comprising the following steps:

[0073] The quantum gates of the constructed quantum circuit are based on the cumulative multiplication of unitary transformations in U(α,β) with parameters α and β as unitary operator generators. Where M is the number of system evolution steps; α and β are the parameters that need to be updated in the parameterized quantum circuit; α ρ is the parameter of α in the ρth step of evolution; β ρ is the parameter of β in the ρth step of evolution; U(H b ,α ρ ) and U(H p ,β ρ ) is the quantum circuit of the ρth step of evolution, and U(H b ,α ρ ) is expressed as U(H p ,β ρ ) is expressed as Where i is the imaginary unit, H b is the Hamiltonian of the initial system, H p is the Hamiltonian of the final system; parameters α and β are both random at the beginning;

[0074] U(H b ,α ρ ) and U(H p ,β ρ ) is the corresponding unitary operator finally constructed;

[0075] S3. Decomposing the unitary operator constructed in step S2 to obtain a corresponding quantum logic gate; specifically comprising the following steps:

[0076] The unitary operator U(H b ,α ρ ):

[0077]

[0078] Thus, the unitary operator U(H b ,α ρ ) is decomposed into several rotation angles of 2α ρ R x (2α ρ )Door;

[0079] The unitary operator U(H p ,β ρ ):

[0080]

[0081] In the formula is a constant term; then the latter term This breaks down into:

[0082]

[0083] Thus, the unitary operator U(H p ,β ρ ) is decomposed into several rotation angles of -β ρ R z (-β ρ ) gate and CNOT gate;

[0084] S4. According to the quantum logic gates obtained in step S3, the final parameterized quantum circuit is constructed; specifically, the corresponding quantum logic gates decomposed in step S3 are combined together according to the construction order of the unitary operator, so as to obtain the final parameterized quantum circuit; the specific result is as follows Figure 2 As shown;

[0085] S5. Bring the initial system into the parameterized quantum circuit constructed in step S4, and evolve to generate an intermediate state quantum system; calculate the loss function during the evolution process, and update the system parameters; specifically include the following steps:

[0086] The initial system is brought into the parameterized quantum circuit constructed in step S4 to excite the initial system. In the parameterized quantum circuit, the initial system begins to spontaneously complete the system evolution link and begins to generate an intermediate state quantum system. This process is carried out under adiabatic conditions, so the Hamiltonian H(t) of the intermediate state quantum system conforms to the formula Where t is the evolution time, T is the system temperature during the evolution process, and if Then there is H b is the Hamiltonian of the initial system; H p is the Hamiltonian of the preset final state system;

[0087] In addition, the loss function of parameters α and β is calculated, and the parameters α and β are updated using the gradient descent optimization algorithm; in specific implementation, the gradient of the loss function L(α,β) is calculated using the following formula:

[0088]

[0089]

[0090] Where α j is the parameter of α at the jth step of evolution; β j is the parameter of β at the jth step of evolution; Δ j is the parameter of the jth direction; the update rules of α and β are:

[0091]

[0092]

[0093] Where γ is the adaptive learning rate that controls the update rate of the quantum circuit;

[0094] S6. Calculate the expected value of the Hatch quantity of the intermediate state quantum system obtained in step S5 and the expected value of the Hatch quantity of the preset final state system, and compare them; specifically comprising the following steps:

[0095] Compare the expected value of the Hatt density quantity of the intermediate state quantum system with the expected value of the Hatt density quantity of the preset final state system:

[0096] If the difference between the expected value of the Hamiltonian of the intermediate state quantum system and the expected value of the Hamiltonian of the preset final state system is within the set range, the evolution is stopped, and the currently obtained quantum state system is taken as the final quantum state system, and the final quantum bit ordering and the expected value of the Hamiltonian of the corresponding system are output;

[0097] If the difference between the expected value of the Hatt density quantity of the intermediate state quantum system and the expected value of the Hatt density quantity of the preset final state system is not within the set range, the evolution continues;

[0098] S7. According to the comparison result of step S6, the final quantum bit ordering and the expected value of the Hamiltonian of the corresponding system are output to complete the parameterized quantum Hamiltonian learning.

[0099] like Figure 3 The method flow chart of the segmentation method of the present invention is shown as follows: The image segmentation method provided by the present invention including the quantum Hamiltonian learning method specifically comprises the following steps:

[0100] A. Abstract the original image into an undirected network weighted graph, and establish a one-to-one correspondence between the positions of each vertex in the graph and the quantum bit order; specifically, the following steps are included:

[0101] The original image is represented by an undirected network weighted graph G: the vertices in the graph G correspond to the pixels in the original image; the edge e connecting two vertices in the graph G ij Corresponding to pixel v in the original image i With adjacent pixels v j The relationship between or the corresponding pixel v in the original image i With adjacent area v j The relationship between ij The weight w ij Corresponding to pixel v in the original image i With adjacent pixels v j The specific relationship between them or the corresponding pixel v in the original image i With adjacent area v j There is a specific relationship between them; in specific applications, the weight w ij Can be given more meanings;

[0102] In a specific implementation, a preferred method is: the edges between nodes can be assigned different weights according to the following definition relationship: if the grayscale values ​​between adjacent pixels are the same, the weight of the edge is assigned to 0; if the grayscale values ​​between adjacent pixels are different, a value between 0 and 1 is assigned according to the difference between the grayscale values; and finally the target boundary is determined by a parameterized quantum Hamiltonian learning algorithm;

[0103] Establish a one-to-one correspondence between the undirected network weighted graph G and the bit sequence of the quantum bit: take the first pixel in the upper left corner of the undirected network weighted graph G as the first quantum bit and set the serial number to 0. From top to bottom and from left to right, establish a one-to-one correspondence between the undirected network weighted graph G and the bit sequence of the quantum bit.

[0104] B. Use the undirected network weighted graph established in step A as the initial system and substitute it into the above-mentioned quantum Hamiltonian learning method to complete the system evolution;

[0105] C. Obtain the output result of the parameterized quantum Hamiltonian learning method, and use the original image information corresponding to the quantum bit sorting with the highest expected value in the output result as the segmentation boundary;

[0106] D. Use the segmentation boundary obtained in step C to segment the original image, thereby completing the image segmentation of the original image; for example, if the highest expected quantum bit order in the output result is |101011>, the pixels corresponding to the quantum bits numbered 2 and 4 are grouped together, and the remaining pixels are automatically grouped; the schematic diagram of the segmentation principle of the above steps is shown in Figure 4 shown.

[0107] The quantum Hamiltonian learning method in step B comprises the following steps:

[0108] S1. Determine the Hamiltonian of the initial system and preset the Hamiltonian of the final system;

[0109] S2. construct the corresponding unitary operator according to the Hamiltonian of the initial system and the Hamiltonian of the final system obtained in step S1;

[0110] S3. Decomposing the unitary operator constructed in step S2 to obtain the corresponding quantum logic gate;

[0111] S4. Constructing the final parameterized quantum circuit according to the quantum logic gate obtained in step S3;

[0112] S5. Bring the initial system into the parameterized quantum circuit constructed in step S4, and evolve it to generate an intermediate state quantum system; during the evolution process, calculate the loss function and update the system parameters;

[0113] S6. Calculate the expected value of the Hatch density of the intermediate state quantum system obtained in step S5 and the expected value of the Hatch density of the preset final state system, and compare them;

[0114] S7. According to the comparison result of step S6, the final quantum bit ordering and the expected value of the Hamiltonian of the corresponding system are output to complete the parameterized quantum Hamiltonian learning.

[0115] The step S1 of determining the Hamiltonian of the initial system and presetting the Hamiltonian of the final system specifically includes the following steps:

[0116] Determine the initial system to have a Hamiltonian H b A quantum system with a Hamiltonian H b satisfy Where N is the number of particles in the system; is the Pauli X operator;

[0117] The final state system is assumed to have a Hamiltonian H p A quantum system with a Hamiltonian H p satisfy Where I is the unit matrix; N is the number of particles in the system; is the Pauli Z operator; It is the direct product symbol in quantum computing.

[0118] Step S2 constructs the corresponding unitary operator based on the Hamiltonian of the initial system and the Hamiltonian of the final state system obtained in step S1, which specifically includes the following steps:

[0119] The quantum gates of the constructed quantum circuit are based on the cumulative multiplication of unitary transformations in U(α,β) with parameters α and β as unitary operator generators. Where M is the number of system evolution steps; α and β are the parameters that need to be updated in the parameterized quantum circuit; α ρ is the parameter of α in the ρth step of evolution; β ρ is the parameter of β in the ρth step of evolution; U(H b ,α ρ ) and U(H p ,β ρ ) is the quantum circuit of the ρth step of evolution, and U(H b ,α ρ ) is expressed as U(H p ,β ρ ) is expressed as Where i is the imaginary unit, H b is the Hamiltonian of the initial system, H p is the Hamiltonian of the final state system;

[0120] U(H b ,α ρ ) and U(H p ,β ρ ) is the corresponding unitary operator finally constructed.

[0121] Step S3 decomposes the unitary operator constructed in step S2 to obtain a corresponding quantum logic gate, which specifically includes the following steps:

[0122] The unitary operator U(H b ,α ρ ):

[0123]

[0124] Thus, the unitary operator U(H b ,α ρ ) is decomposed into several rotation angles of 2α ρ R x (2α ρ )Door;

[0125] The unitary operator U(H p ,β ρ ):

[0126]

[0127] In the formula is a constant term; then the latter term This breaks down into:

[0128]

[0129] Thus, the unitary operator U(H p ,β ρ ) is decomposed into several rotation angles of -β ρ R z (-β ρ ) gate and CNOT gate.

[0130] The final parameterized quantum circuit is constructed according to the quantum logic gates obtained in step S3 in step S4, specifically, the corresponding quantum logic gates decomposed in step S3 are combined together according to the construction order of the unitary operator, so as to obtain the final parameterized quantum circuit.

[0131] The step S5 of bringing the initial system into the parameterized quantum circuit constructed in step S4 and performing evolution to generate an intermediate state quantum system specifically includes the following steps:

[0132] The initial system is brought into the parameterized quantum circuit constructed in step S4 to excite the initial system. In the parameterized quantum circuit, the initial system begins to spontaneously complete the system evolution link and begins to generate an intermediate state quantum system. The Hamiltonian H(t) of the intermediate state quantum system conforms to the formula Where t is the evolution time, T is the system temperature during the evolution process; H b is the Hamiltonian of the initial system; H p is the Hamiltonian of the preset final state system.

[0133] In the evolution process described in step S5, the loss function is calculated and the system parameters are updated, specifically, the loss function of the parameters α and β is calculated, and the parameters α and β are updated using the gradient descent optimization algorithm.

[0134] The loss function is calculated during the evolution process, and the system parameters are updated, which specifically includes the following steps:

[0135] The gradient of the loss function L(α,β) is calculated using the following formula:

[0136]

[0137]

[0138] Where α j is the parameter of α at the jth step of evolution; β j is the parameter of β at the jth step of evolution; Δ j is the parameter of the jth direction; the update rules of α and β are:

[0139]

[0140]

[0141] Where γ is the adaptive learning rate that controls the update rate of the quantum circuit.

[0142] Step S7 outputs the final quantum bit order and the expected value of the Hamiltonian of the corresponding system according to the comparison result of step S6, which specifically includes the following steps:

[0143] Compare the expected value of the Hatt density quantity of the intermediate state quantum system with the expected value of the Hatt density quantity of the preset final state system:

[0144] If the difference between the expected value of the Hamiltonian of the intermediate state quantum system and the expected value of the Hamiltonian of the preset final state system is within the set range, the evolution is stopped, and the currently obtained quantum state system is taken as the final quantum state system, and the final quantum bit ordering and the expected value of the Hamiltonian of the corresponding system are output;

[0145] If the difference between the expected value of the Hatt density quantity of the intermediate state quantum system and the expected value of the Hatt density quantity of the preset final state system is not within the set range, the evolution continues.

[0146] like Figure 5 The method flow chart of the license plate recognition method of the present invention is shown as follows: The license plate recognition method provided by the present invention including the image segmentation method specifically includes the following steps:

[0147] a. Use the above image segmentation method to segment the target area, thereby completing feature extraction and obtaining corresponding extraction results;

[0148] b. Use a classifier to classify the extraction results obtained in step a to obtain corresponding classification results;

[0149] c. Normalize the classification results obtained in step b to obtain the information to be identified;

[0150] d. Extract the text and digital information from the information to be identified obtained in step d to obtain the corresponding license plate number and complete the license plate recognition.

Claims

1. A quantum Hamiltonian learning method, comprising the following steps: S1. Determine the Hamiltonian of the initial system and preset the Hamiltonian of the final system; S2. construct the corresponding unitary operator according to the Hamiltonian of the initial system and the Hamiltonian of the final system obtained in step S1; S3. Decomposing the unitary operator constructed in step S2 to obtain the corresponding quantum logic gate; S4. Constructing the final parameterized quantum circuit according to the quantum logic gate obtained in step S3; S5. Bring the initial system into the parameterized quantum circuit constructed in step S4, and evolve it to generate an intermediate state quantum system; during the evolution process, calculate the loss function and update the system parameters; in, The process of bringing the initial system into the parameterized quantum circuit constructed in step S4 and evolving the intermediate state quantum system specifically includes the following steps: The initial system is brought into the parameterized quantum circuit constructed in step S4 to excite the initial system. In the parameterized quantum circuit, the initial system begins to spontaneously complete the system evolution link and begins to generate an intermediate state quantum system. The Hamiltonian H(t) of the intermediate state quantum system conforms to the formula Where t is the evolution time, T is the system temperature during the evolution process; H b is the Hamiltonian of the initial system; H p is the Hamiltonian of the preset final state system; The loss function is calculated during the evolution process, and the system parameters are updated. Specifically, the loss function of the parameters α and β is calculated, and the parameters α and β are updated using the gradient descent optimization algorithm. The loss function is calculated during the evolution process, and the system parameters are updated, which specifically includes the following steps: The gradient of the loss function L(α,β) is calculated using the following formula: Where α j is the parameter of α at the jth step of evolution; β j is the parameter of β at the jth step of evolution; Δ j is the parameter of the jth direction; the update rules of α and β are: Where γ is the adaptive learning rate that controls the update rate of the quantum circuit; S6. Calculate the expected value of the Hatch density of the intermediate state quantum system obtained in step S5 and the expected value of the Hatch density of the preset final state system, and compare them; S7. According to the comparison result of step S6, the final quantum bit ordering and the expected value of the Hamiltonian of the corresponding system are output to complete the parameterized quantum Hamiltonian learning.

2. The quantum Hamiltonian learning method according to claim 1, characterized in that The step S1 of determining the Hamiltonian of the initial system and presetting the Hamiltonian of the final system specifically includes the following steps: Determine the initial system to have a Hamiltonian H b A quantum system with a Hamiltonian H b satisfy Where N is the number of particles in the system; is the Pauli X operator; The final state system is assumed to have a Hamiltonian of H p A quantum system with a Hamiltonian H p satisfy Where I is the unit matrix; N is the number of particles in the system; is the Pauli Z operator; It is the direct product symbol in quantum computing.

3. The quantum Hamiltonian learning method according to claim 2, characterized in that Step S2 constructs the corresponding unitary operator based on the Hamiltonian of the initial system and the Hamiltonian of the final state system obtained in step S1, which specifically includes the following steps: The quantum gates of the constructed quantum circuit are based on the cumulative multiplication of unitary transformations in U(α,β) with parameters α and β as unitary operator generators. Where M is the number of system evolution steps; α and β are the parameters that need to be updated in the parameterized quantum circuit; α ρ is the parameter of α in the ρth step of evolution; β ρ is the parameter of β in the ρth step of evolution; U(H b ,α ρ ) and U(H p ,β ρ ) is the quantum circuit of the ρth step of evolution, and U(H b ,α ρ ) is expressed as U(H p ,β ρ ) is expressed as Where i is the imaginary unit, H b is the Hamiltonian of the initial system, H p is the Hamiltonian of the final state system; U(H b ,α ρ ) and U(H p ,β ρ ) is the corresponding unitary operator finally constructed.

4. The quantum Hamiltonian learning method according to claim 3, characterized in that Step S3 decomposes the unitary operator constructed in step S2 to obtain a corresponding quantum logic gate, which specifically includes the following steps: The unitary operator U(H b ,α ρ ): Thus, the unitary operator U(H b ,α ρ ) is decomposed into several rotation angles of 2α ρ R x (2α ρ )Door; The unitary operator U(H p ,β ρ ): In the formula is a constant term; then the latter term This breaks down into: Thus, the unitary operator U(H p ,β ρ ) is decomposed into several rotation angles of -β ρ R z (-β ρ ) gate and CNOT gate.

5. The quantum Hamiltonian learning method according to claim 4, characterized in that The final parameterized quantum circuit is constructed according to the quantum logic gates obtained in step S3 in step S4, specifically, the corresponding quantum logic gates decomposed in step S3 are combined together according to the construction order of the unitary operator, so as to obtain the final parameterized quantum circuit.

6. The quantum Hamiltonian learning method according to claim 5, characterized in that Step S7 outputs the final quantum bit order and the expected value of the Hamiltonian of the corresponding system according to the comparison result of step S6, which specifically includes the following steps: Compare the expected value of the Hatt density quantity of the intermediate state quantum system with the expected value of the Hatt density quantity of the preset final state system: If the difference between the expected value of the Hamiltonian of the intermediate state quantum system and the expected value of the Hamiltonian of the preset final state system is within the set range, the evolution is stopped, and the currently obtained quantum state system is taken as the final quantum state system, and the final quantum bit ordering and the expected value of the Hamiltonian of the corresponding system are output; If the difference between the expected value of the Hatt density quantity of the intermediate state quantum system and the expected value of the Hatt density quantity of the preset final state system is not within the set range, the evolution continues.

7. An image segmentation method comprising the quantum Hamiltonian learning method according to any one of claims 1 to 6, characterized in that The specific steps include: A. Abstract the original image into an undirected network weighted graph, and establish a one-to-one correspondence between the positions of each vertex in the graph and the quantum bit order; specifically, the following steps are included: The original image is represented by an undirected network weighted graph G: the vertices in the graph G correspond to the pixels in the original image; the edge e connecting two vertices in the graph G ij Corresponding to pixel v in the original image i With adjacent pixels v j The relationship between or the corresponding pixel v in the original image i With adjacent area v j The relationship between ij The weight w ij Corresponding to pixel v in the original image i With adjacent pixels v j The specific relationship between them or the corresponding pixel v in the original image i With adjacent area v j The specific relationship between them; Establish a one-to-one correspondence between the undirected network weighted graph G and the bit sequence of the quantum bit: take the first pixel in the upper left corner of the undirected network weighted graph G as the first quantum bit and set the serial number to 0. From top to bottom and from left to right, establish a one-to-one correspondence between the undirected network weighted graph G and the bit sequence of the quantum bit. B. Using the undirected network weighted graph established in step A as the initial system, and substituting it into the parameterized quantum Hamiltonian learning method described in any one of claims 1 to 6 to complete the system evolution; C. Obtain the output result of the parameterized quantum Hamiltonian learning method, and use the original image information corresponding to the quantum bit sorting with the highest expected value in the output result as the segmentation boundary; D. Use the segmentation boundary obtained in step C to perform image segmentation on the original image, thereby completing the image segmentation of the original image.

8. A license plate recognition method comprising the image segmentation method according to claim 7, characterized in that The specific steps include: a. Use the above image segmentation method to segment the target area, thereby completing feature extraction and obtaining corresponding extraction results; b. Use a classifier to classify the extraction results obtained in step a to obtain corresponding classification results; c. Normalize the classification results obtained in step b to obtain the information to be identified; d. Extract the text and digital information from the information to be identified obtained in step d to obtain the corresponding license plate number and complete the license plate recognition.

Citation Information

Patent Citations

  • Heuristic graph embedding methods for adiabatic quantum computation optimization

    CA2901048A1

  • Apparatus and methods for quantum computing and machine learning

    CA3046887A1