CN117689031A - Method and device for operating computer, computer system and storage medium - Google Patents

Method and device for operating computer, computer system and storage medium Download PDF

Info

Publication number
CN117689031A
CN117689031A CN202410134601.5A CN202410134601A CN117689031A CN 117689031 A CN117689031 A CN 117689031A CN 202410134601 A CN202410134601 A CN 202410134601A CN 117689031 A CN117689031 A CN 117689031A
Authority
CN
China
Prior art keywords
hamiltonian
computer
target
quantum
item
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202410134601.5A
Other languages
Chinese (zh)
Other versions
CN117689031B (en
Inventor
于云龙
李辰
张新
赵雅倩
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Suzhou Metabrain Intelligent Technology Co Ltd
Original Assignee
Suzhou Metabrain Intelligent Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Suzhou Metabrain Intelligent Technology Co Ltd filed Critical Suzhou Metabrain Intelligent Technology Co Ltd
Priority to CN202410134601.5A priority Critical patent/CN117689031B/en
Publication of CN117689031A publication Critical patent/CN117689031A/en
Application granted granted Critical
Publication of CN117689031B publication Critical patent/CN117689031B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The application discloses an operation method and device of a computer, a computer system and a storage medium, wherein the operation method of the computer comprises the following steps: under the condition that a combined optimization problem to be solved is received, a second computer is called to operate a target quantum algorithm by using a catalytic item corresponding to the combined optimization problem, wherein the catalytic item is used for accelerating the evolution speed of the target quantum algorithm; receiving expected problem parameters returned by the second computer; adjusting the catalytic item according to the expected problem parameter until the expected problem parameter meets the exit condition of the adjustment process, so as to obtain a target catalytic item; by adopting the technical scheme, the problem that the accuracy of solving the combined optimization problem by the operating computer is lower in the related art is solved, and the technical effect of improving the accuracy of solving the combined optimization problem by the operating computer is achieved.

Description

Method and device for operating computer, computer system and storage medium
Technical Field
Embodiments of the present invention relate to the field of computers, and in particular, to a method and apparatus for operating a computer, a computer system, and a storage medium.
Background
Quantum computers may yield better results than classical computers on certain specific problems, such as solutions to combinatorial optimization problems, where there are very high complexity and very long time to solve, and the use of quantum computers to solve combinatorial optimization problems often can greatly reduce the time to solve, the ability of such quantum computers over classical computers is also known as quantum dominance.
Currently, when a combination optimization problem needs to be solved, a quantum system corresponding to the combination optimization problem can be built through a quantum computer, in theory, the actual ground state of the quantum system corresponds to the optimal result of the combination optimization problem, in the prior art, a quantum algorithm can be operated in the quantum computer to evolve the quantum system so as to solve the approximation of the actual ground state, namely the approximation ground state of the quantum system, and the solution result of the combination optimization problem is solved by using the approximation ground state. Obviously, the closer the approximate ground state is to the actual ground state, the closer the solution result is to the optimal result, the selection of the component items in the quantum algorithm influences the evolution process of the quantum system, and the approach degree of the approximate ground state and the actual ground state, namely the approach degree of the solution result and the optimal result of the combined optimization problem is directly related. However, the component items in the current quantum algorithm are selected with certain arbitrary property, and the component items which are currently selected in the quantum algorithm are possibly not optimal, which directly leads to lower accuracy of the solving result of the combination optimization problem.
Aiming at the problem that in the related art, the accuracy of solving the combination optimization problem by running a computer is low, no effective solution is proposed yet.
Disclosure of Invention
The embodiment of the application provides a method and a device for operating a computer, a computer system and a storage medium, which are used for solving the problem that the accuracy of solving a combination optimization problem by operating the computer is low in the related art.
According to an embodiment of the present application, there is provided an operation method of a computer, a computer system including a first computer and a second computer, the first computer being connected to the second computer, the second computer being a quantum computer in which a target quantum algorithm is deployed, the target quantum algorithm being a quantum algorithm having a function of solving a combinatorial optimization problem, the method being applied to the first computer, the method including:
under the condition that the combined optimization problem to be solved is received, calling the second computer to operate a target quantum algorithm by using a catalytic term corresponding to the combined optimization problem, wherein the catalytic term is used for accelerating the evolution speed of the target quantum algorithm;
receiving expected problem parameters returned by the second computer, wherein the expected problem parameters are used for indicating the degree of approaching of an evolution end state and a ground state of a problem item, the evolution end state is obtained by the second computer through the operation of the target quantum algorithm by using the catalytic item, the problem item is used for indicating the combination optimization problem, and the ground state of the problem item is used for indicating the solution of the combination optimization problem;
Adjusting the catalytic item according to the expected problem parameter until the expected problem parameter meets the exit condition of the adjustment process, so as to obtain a target catalytic item;
and extracting a target evolution end state corresponding to the target quantum algorithm executed by adopting the target catalytic item from the second computer to solve the combination optimization problem.
Optionally, the adjusting the catalytic term according to the desired problem parameter includes:
and adjusting the Hamiltonian amount of the first catalyst currently used by the target quantum algorithm to the Hamiltonian amount of the second catalyst according to the expected problem parameter, wherein the catalysis term comprises: and the Hamiltonian amount of the catalyst of the target quantum algorithm.
Optionally, the adjusting the hamiltonian amount of the first catalyst currently used by the target quantum algorithm to the hamiltonian amount of the second catalyst according to the expected problem parameter includes:
adjusting a first catalytic coefficient in the first catalyst hamiltonian to a second catalytic coefficient according to the expected problem parameter, wherein the catalytic coefficient of the catalyst hamiltonian of the target quantum algorithm is a superposition coefficient of a berkovickers in a berkovich term of the catalyst hamiltonian;
And sending the second catalytic coefficient to the second computer, wherein the second catalytic coefficient is used for instructing the second computer to construct the second catalyst hamiltonian using the second catalytic coefficient.
Optionally, the sending the second catalytic coefficient to the second computer includes:
converting the second catalytic coefficient into a target construction instruction, wherein the target construction instruction is used for indicating to adjust interaction among qubits in a quantum system of the second computer so as to construct the second catalyst Hamiltonian amount;
and sending the target construction instruction to the second computer.
Optionally, the adjusting the catalytic item according to the expected problem parameter until the expected problem parameter meets an exit condition of an adjustment process, to obtain a target catalytic item includes:
detecting whether the expected problem parameter meets the exit condition;
determining an adjustment mode of the catalytic item according to the expected problem parameter under the condition that the expected problem parameter does not meet the exit condition;
and adjusting the catalytic item according to the adjustment mode until the expected problem parameter meets the exit condition of the adjustment process, so as to obtain the target catalytic item.
Optionally, the detecting whether the expected problem parameter meets the exit condition includes:
detecting a relation between a problem hamiltonian expected value and an adjustment threshold, wherein the expected problem parameter comprises the problem hamiltonian expected value, the problem hamiltonian expected value is an expected value of the problem hamiltonian of the combination optimization problem in the evolution end state, and the problem item comprises the problem hamiltonian;
and under the condition that the expected value of the Hamiltonian amount of the problem is larger than or equal to the adjustment threshold value, determining that the adjustment process does not meet the exit condition.
Optionally, the detecting whether the expected problem parameter meets the exit condition includes:
detecting whether a problem hamiltonian expected value converges or not, wherein the expected problem parameter comprises the problem hamiltonian expected value, the problem hamiltonian expected value is an expected value of the problem hamiltonian of the combined optimization problem in the evolution end state, and the problem item comprises the problem hamiltonian;
and under the condition that the expected value of the Hamiltonian amount of the problem is not converged, determining that the adjustment process does not meet the exit condition.
Optionally, the detecting whether the expected Hamiltonian value of the problem converges includes:
detecting whether the problem Hamiltonian expected value is stable or not according to the problem Hamiltonian expected value and a historical problem Hamiltonian expected value, wherein the historical problem Hamiltonian expected value is N problem Hamiltonian expected values received before the problem Hamiltonian expected value is received, and N is a positive integer;
and under the condition that the expected value of the Hamiltonian amount of the problem is unstable, determining that the expected value of the Hamiltonian amount of the problem is not converged.
Optionally, the determining the adjustment mode of the catalytic item according to the expected problem parameter includes one of the following:
determining a target gradient of the catalytic term according to the expected problem parameter, wherein the adjustment mode comprises the target gradient;
and determining a target gradient and a target step length of the catalytic item according to the expected problem parameter, wherein the adjustment mode comprises the target gradient and the target step length.
Optionally, said adjusting said catalytic item according to said adjustment means includes one of:
when the adjustment mode comprises the target gradient, adjusting the catalytic item by default step length according to the target gradient;
And under the condition that the adjustment mode comprises the target gradient and the target step length, adjusting the catalytic item according to the target gradient.
Optionally, the receiving the expected problem parameter returned by the second computer includes:
and receiving a problem Hamiltonian expected value sent by a quantum measurement device deployed on the second computer, wherein the expected problem parameter comprises the problem Hamiltonian expected value, the problem Hamiltonian expected value is obtained by measuring an expected value of the problem Hamiltonian of the combined optimization problem in the evolution end state by the quantum measurement device, and the problem item comprises the problem Hamiltonian.
Optionally, before the invoking the second computer to run the target quantum algorithm using the catalytic term corresponding to the combinatorial optimization problem, the method further includes:
converting the combination optimization problem into the problem item, and constructing an initial item, wherein the initial item is used for providing an initial state for a quantum algorithm;
constructing the catalytic term according to the problem term and the initial term;
constructing the problem item, the initial item and the catalytic item into the target quantum algorithm;
And deploying the target quantum algorithm to the second computer.
Optionally, the converting the combination optimization problem into the problem term includes:
receiving the combined optimization problem sent by a user, wherein the combined optimization problem is a problem of solving an object set which simultaneously satisfies a plurality of constraint conditions from a plurality of objects in a target scene, and the plurality of constraint conditions comprise: constraint conditions for the object and constraint conditions for the association relationship of the object in the target scene;
constructing a topological structure corresponding to the combination optimization problem, wherein vertexes in the topological structure represent each object in the plurality of objects, and edges connected between the vertexes in the topological structure represent association relations of the plurality of objects in the target scene;
constructing an optimization target of the combination optimization problem by using the topological structure and the constraint conditions, and constructing a quantum system corresponding to the target scene, wherein the quantum system takes each object in the objects as a quantum bit, and interaction among the quantum bits is used for representing the association relation of the objects in the target scene;
And converting the optimization target into the quantum system to obtain the problem Hamiltonian quantity corresponding to the quantum system as the problem item.
Optionally, the constructing the catalytic term according to the problem term and the initial term includes:
constructing a first evolution path function of a problem Hamiltonian quantity and a second evolution path function of an initial Hamiltonian quantity, wherein the problem item comprises the problem Hamiltonian quantity, and the initial item comprises the initial Hamiltonian quantity;
and constructing a catalyst Hamiltonian amount according to the problem Hamiltonian amount, the initial Hamiltonian amount, the first evolution path function and the second evolution path function, and a third evolution path function of the catalyst Hamiltonian amount, wherein the catalysis item comprises the catalyst Hamiltonian amount.
Optionally, the constructing the problem item, the initial item and the catalytic item as the target quantum algorithm includes:
the Hamiltonian quantity of the problem, the initial Hamiltonian quantity, the catalyst Hamiltonian quantity, the first evolution path function, the second evolution path function and the third evolution path function are constructed to be time-containing Hamiltonian quantity as the target quantum algorithm, wherein the first evolution path function, the second evolution path function and the third evolution path function are functions from actual evolution time to target evolution time, the first evolution path function is 1 at initial evolution time until reaching the target evolution time and is 0 at initial evolution time, the second evolution path function is 0 at initial evolution time until reaching the target evolution time and is 1, and the third evolution path function is 0 at initial evolution time and at target evolution time.
Optionally, the constructing the catalyst hamiltonian according to the problem hamiltonian, the initial hamiltonian, the first evolution path function and the second evolution path function includes:
constructing the problem hamiltonian amount, the initial hamiltonian amount, the first evolution path function and the second evolution path function as reference hamiltonian amounts;
and constructing a target Brilliant term as the catalyst Hamiltonian amount by using the reference Hamiltonian amount, wherein the target Brilliant term is an operation between a superposition coefficient and a Brix operator.
Optionally, the constructing a target brix item using the reference hamiltonian amount as the catalyst hamiltonian amount includes one of:
constructing a two-body Brix term using the reference Hamiltonian amount as the catalyst Hamiltonian amount, wherein the target Brix term comprises a two-body Brix term comprising an operation between a superposition coefficient and two Brix operators;
and constructing a summation operation of a single Brilliant term and a two-body Brilliant term by using the reference Hamiltonian quantity as the catalyst Hamiltonian quantity, wherein the target Brilliant term comprises the summation operation of the single Brilliant term and the two-body Brilliant term, the single Brilliant term comprises an operation between a superposition coefficient and a single Brilliant, and the two-body Brilliant term comprises an operation between the superposition coefficient and two Brilliant.
Optionally, the monomer bubble profile is of the form:
wherein->Is saidSuperposition coefficient in monomer bubble interest, +.>For a single Brix in the monomer Brix term, < >>Is the j-th qubit in the quantum system of the second computer +.>A bubble operator of direction, the quantum system comprising M qubits, j being a positive integer greater than or equal to 1 and less than or equal to M;
the two-body bubble term is of the following form:
wherein->For the superposition coefficient in the two-body bubble interest item,>for two Brix operators in the two-body Brix term,/I>Is the j-th qubit in the quantum system of the second computer +.>Bubble sharp operator of direction, ->Is the kth qubit in the quantum system of the second computer +.>A Brix operator of the direction, wherein the quantum system comprises M quantum bits, j is a positive integer greater than or equal to 1 and less than or equal to M, k is a positive integer greater than or equal to 1 and less than or equal to M, and j isThe quantum bit and the kth quantum bit are different quantum bits in the quantum system;
the sum operation of the monomer Brix term and the two-body Brix term is as follows:
Wherein->For the superposition coefficient in said monomer bubble interest,/->For a single Brix in the monomer Brix term, < >>Is the j-th qubit in the quantum system of the second computer +.>Bubble sharp operator of direction, ->For the superposition coefficient in the two-body bubble interest item,>for two Brix operators in the two-body Brix term,/I>Is the kth qubit in the quantum system of the second computer +.>The quantum system comprises M quantum bits, j is a positive integer greater than or equal to 1 and less than or equal to M, k is a positive integer greater than or equal to 1 and less than or equal to M, and the jth quantum bit and the kth quantum bit are different quantum bits in the quantum system.
According to another embodiment of the present application, there is also provided a computer system including: a first computer and a second computer, wherein the first computer has a combination optimization problem to be solved, the second computer is a quantum computer deployed with a target quantum algorithm, the target quantum algorithm is a quantum algorithm with a function of solving the combination optimization problem, and the first computer is a first computer in the operation method of any one of the computers; the second computer is the second computer in the operating method of any one of the computers.
According to another embodiment of the present application, there is also provided an operating apparatus of a computer, a computer system including a first computer and a second computer, the first computer being connected to the second computer, the second computer being a quantum computer in which a target quantum algorithm is deployed, the target quantum algorithm being a quantum algorithm having a function of solving a combinatorial optimization problem, the apparatus being applied to the first computer, the apparatus including:
the calling module is used for calling the second computer to operate a target quantum algorithm by using a catalytic term corresponding to the combination optimization problem under the condition that the combination optimization problem to be solved is received, wherein the catalytic term is used for accelerating the evolution speed of the target quantum algorithm;
the receiving module is used for receiving expected problem parameters returned by the second computer, wherein the expected problem parameters are used for indicating the degree of approach of an evolution end state and a ground state of a problem item, the evolution end state is obtained by the second computer through the operation of the target quantum algorithm by using the catalytic item, the problem item is used for indicating the combination optimization problem, and the ground state of the problem item is used for indicating the solution of the combination optimization problem;
The adjustment module is used for adjusting the catalytic item according to the expected problem parameter until the expected problem parameter meets the exit condition of the adjustment process, so as to obtain a target catalytic item;
and the solving module is used for extracting a target evolution end state corresponding to the target quantum algorithm executed by adopting the target catalytic item from the second computer to solve the combined optimization problem.
According to a further embodiment of the present application, there is also provided a computer readable storage medium having stored therein a computer program, wherein the computer program is arranged to perform the steps of any of the method embodiments described above when run.
According to a further embodiment of the present application, there is also provided an electronic device comprising a memory having stored therein a computer program and a processor arranged to run the computer program to perform the steps of any of the method embodiments described above.
In the embodiment of the application, a method for operating a computer is provided, the computer system comprises a first computer and a second computer, the first computer is connected with the second computer, the second computer is a quantum computer provided with a target quantum algorithm, the target quantum algorithm is a quantum algorithm with a function of solving a combination optimization problem, under the condition that the first computer receives the combination optimization problem to be solved, the first computer calls the second computer to operate the target quantum algorithm by using a catalytic item corresponding to the combination optimization problem, and the catalytic item can accelerate the evolution speed of the target quantum algorithm; and finally, the first computer extracts a target evolution end state corresponding to a target quantum algorithm executed by the target catalytic item from the second computer to solve the combination optimization problem, wherein the expected problem parameter is returned by the second computer, the expected problem parameter is used for indicating the approaching degree of the evolution end state and the ground state of the problem item, the evolution end state is obtained by the second computer through the operation of the target quantum algorithm by using the catalytic item, the problem item is used for indicating the combination optimization problem, and the ground state of the problem item is used for indicating the solution of the combination optimization problem. In the method, the target catalytic item is obtained by carrying out multi-round adjustment on the catalytic item in the target quantum algorithm in the mode, wherein each round of adjustment is based on expected problem parameters returned by the second computer, so that the target evolution end state obtained by adopting the target quantum algorithm executed by the final target catalytic item is closer to the ground state of the problem item, and further a solution with higher accuracy of combined optimization problem can be obtained based on the target evolution end state. By adopting the technical scheme, the problem that in the related technology, the accuracy of solving the combined optimization problem by the running computer is lower is solved, and the technical effect of improving the accuracy of solving the combined optimization problem by the running computer is realized.
Drawings
FIG. 1 is a block diagram of the hardware architecture of a computer device for a method of operating a computer according to an embodiment of the present application;
FIG. 2 is a flow chart of a method of operation of a computer according to an embodiment of the present application;
FIG. 3 is a schematic diagram of a computer system according to an embodiment of the present application;
FIG. 4 is a schematic illustration of adjusting catalytic terms based on desired problem parameters according to an embodiment of the present application;
FIG. 5 is a schematic illustration of an art-mounted camera in an art gallery according to an embodiment of the application;
FIG. 6 is a schematic illustration of a catalytic item tuning flow according to an embodiment of the present application;
fig. 7 is a block diagram of an operating device of a computer according to an embodiment of the present application.
Detailed Description
Embodiments of the present application will be described in detail below with reference to the accompanying drawings in conjunction with the embodiments.
It should be noted that the terms "first," "second," and the like in the description and claims of the present application and the above figures are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order.
The method embodiments provided in the embodiments of the present application may be performed in a server device or similar computing device. Taking the example of running on a server device, fig. 1 is a block diagram of the hardware structure of a computer device of a running method of a computer according to an embodiment of the present application. As shown in fig. 1, the server device may include one or more (only one is shown in fig. 1) processors 102 (the processor 102 may include, but is not limited to, a microprocessor MCU, a programmable logic device FPGA, or the like processing means) and a memory 104 for storing data, wherein the server device may further include a transmission device 106 for communication functions and an input-output device 108. It will be appreciated by those of ordinary skill in the art that the architecture shown in fig. 1 is merely illustrative and is not intended to limit the architecture of the server apparatus described above. For example, the server device may also include more or fewer components than shown in FIG. 1, or have a different configuration than shown in FIG. 1.
The memory 104 may be used to store a computer program, for example, a software program of application software and a module, such as a computer program corresponding to an operation method of a computer in the embodiment of the present application, and the processor 102 executes the computer program stored in the memory 104 to perform various functional applications and data processing, that is, implement 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, the memory 104 may further include memory remotely located with respect to the processor 102, which may be connected to the server device via a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The transmission device 106 is used to receive or transmit data via a network. Specific examples of the network described above may include a wireless network provided by a communication provider of a server device. In one example, the transmission device 106 includes a network adapter (Network Interface Controller, simply referred to as NIC) that can connect to other network devices through a base station to communicate with the internet. In one example, the transmission device 106 may be a Radio Frequency (RF) module, which is configured to communicate with the internet wirelessly.
Nouns involved in the embodiments of the present application are explained as follows:
NISQ, noisy Intermediate-Scale Quantum, noisy mesoscale quanta;
VQA, variational Quantum Algorithm, variable component sub-algorithms;
QITE, quantum Imaginary Time Evolution, evolution in quantum deficiency;
QA, quantum Annealing, quantum annealing.
For a better understanding of the inventive method of operation of the computer set forth in the present application, the inventive concepts of the present application are first described:
quantum computers (quantum computers utilize quantum bit superposition or entanglement properties and compute based on unitary transformations of quantum gates) may yield better results than classical computers (classical computers use classical computation, utilize binary digital signals, and operate based on boolean algebra), and the ability of such quantum computers to outperform classical computers is also known as quantum advantage. At present, research on quantum computing mainly comprises improvement of quantum computing hardware performance, design of quantum algorithms running on a quantum computer and the like. Limited by the current experimental technology, the practical quantum computer which can be realized at present only has tens to hundreds of quantum bits, and meanwhile, the error rate of a quantum gate acting on the quantum bits, especially the error rate of a double-quantum-bit gate, is always maintained at a high level, so that the quantum computing is in the noise-containing mesoscale quantum (NISQ) age at present. Limited by hardware conditions, large-scale quantum algorithms cannot be realized in the NISQ age, which is also one of the important features of the NISQ age.
In order to fully utilize the noise-containing quantum device in the NISQ era and obtain a result with heuristic or quantum advantage, researchers propose a series of quantum algorithms which can be run on the NISQ device, and the quantum algorithms mainly comprise a variable sub-virtual evolution algorithm, a quantum annealing algorithm and the like. The quantum virtual time evolution algorithm (QITE) is a virtual time evolution algorithm commonly used in condensed state physical calculation, approximates the virtual time evolution algorithm through a series of physically realizable operations, and then the operations are sequentially applied to prepare the expected state.
The quantum annealing algorithm (QA) originates from adiabatic evolution in quantum mechanics, and considers two hamiltonians and their evolution, if the evolution process is slow enough, it can evolve from the ground state of one hamiltonian to the ground state of the other hamiltonian. This also means that if one wants to solve a problem, one can code the solution of this problem onto the ground state of a certain hamiltonian, and then proceed to adiabatic evolution slowly enough from the initial state that is physically easy to prepare, so that under the guarantee of the adiabatic theorem, the quantum annealing algorithm can help find the solution of the target problem. Based on a quantum annealing algorithm, a quantum computer based on quantum annealing can be constructed, and tasks such as ground state solving and the like can be performed on the quantum computer according to the basic principle of quantum annealing.
The ground state solving and other tasks have very important practical significance. Some practical problems encountered in the fields of communication networks, chip design, flight path scheduling, security analysis (such as the "best installation scheme problem for installing cameras in art museums" as an example in the field of security analysis) and the like can often be abstracted into a class of classical combination optimization problems, including travel business problems, satisfaction problems, maximum cut problems and the like. Solving such classical combination optimization problems is generally considered to be NP-Complete or NP-hard, meaning that classical computers cannot be used to solve efficiently. The solution of such classical combinatorial optimization problems can be mapped to the ground state of a certain hamiltonian, so that quantum annealing quantum computers can be used to solve such problems. In general, quantum computers based on quantum annealing are believed to have quantum advantages over classical computers.
Meanwhile, the current quantum computers based on quantum annealing can achieve larger scale, for example, some quantum computers comprise 5000 multi-quantum bits, and quantum computers with the scale can show quantum advantages to a certain extent. It is also one of the main objects of the present application that it is of paramount importance to improve the performance of quantum computers based on quantum annealing. The application can provide a new optimization method and an implemented system for a quantum computer based on quantum annealing for ground state solving. By applying the method and the system provided by the application, the performance of the quantum computer based on the quantum annealing algorithm can be improved. Meanwhile, the scheme provided by the application can be realized by using the current experimental means.
The quantum annealing algorithm is described as follows: the quantum annealing algorithm is guaranteed by the adiabatic theorem and has long enough evolution time(also called annealing time) can be prepared to the ground state of any hamiltonian. Here->As a physical quantity measuring the complexity of the algorithm, if +.>As the system increases exponentially, that means that the complexity of a quantum computer in solving such problems is also exponential. The exponential complexity is avoided as much as possible in quantum computing, otherwise quantum annealing algorithms and corresponding quantum computers cannot guarantee their quantum advantages compared to classical computers and classical algorithms.
While the quantum computer performs the annealing time required by the quantum annealing algorithmEnergy gap between the instantaneous ground state and the instantaneous first excited state of the instantaneous hamiltonian in practice and in the evolution process +.>In relation to, more particularly,
(1)
this means that if the energy gap is in the evolution processIs exponentially small, then to overcome this exponentially small energy gap, an exponentially long annealing time is required>And exponential algorithm complexity. Such exponentially small energy gaps are encountered when solving 3-SAT problems (a class of satisfiability problems) using quantum computers based on quantum annealing. At the same time, since the classical combination optimization problems of this type are all mutually equivalent, this means that this exponential complexity is unavoidable in solving classical combination optimization problems using quantum computers based on quantum annealing. This presents a significant challenge for practical applications of quantum computers based on quantum annealing.
To solve this problem, enhancing the feasibility of quantum-annealed-based quantum computers, the present application proposes a series of ways to modify the adiabatic evolution path, including a method of introducing an additional "catalyst" term (also called catalytic term) during the actual evolution, which is set toThe method can not influence the properties of the initial state and the final state of the system, but plays roles in amplifying the energy gap, inhibiting non-adiabatic transition behavior and the like in the evolution process. The method of selecting such a catalyst item may be one in which the catalyst item may be designed using the concept of physically multi-body localization, or may be one in which the catalyst item may be designed based on the concept of a variation, the catalyst item being selected such that the amount of action of the system is minimized. Both methods described herein can improve the behavior of the quantum annealing algorithm to a certain extent, but these methods for selecting the catalyst item do not give an optimal result, and on the basis of the operation method of the computer provided by the application, the proposed scheme can further improve the result after the catalyst item is introduced, and at the same time, the proposed scheme can also be directly implemented on the existing quantum annealing-based quantum computer.
In order to further improve the behaviour of the quantum algorithm after introduction of the catalyst term, the intensity term before the catalyst term is used as parameter to be optimized, the final state of the time-dependent evolution under such different parameter to be optimized is prepared using a quantum computer, the expected value of the target problem hamiltonian in this final state is measured, and then the corresponding parameter is optimized using a classical computer such that the expected value is minimized. Better results are finally obtained due to the presence of the optimization.
In this embodiment, there is provided a method for operating a computer, fig. 2 is a flowchart of a method for operating a computer according to an embodiment of the present application, a computer system includes a first computer and a second computer, the first computer is connected to the second computer, the second computer is a quantum computer in which a target quantum algorithm is deployed, the target quantum algorithm is a quantum algorithm having a function of solving a combination optimization problem, the method is applied to the first computer, and as shown in fig. 2, the flowchart includes the steps of:
step S12, under the condition that the combination optimization problem to be solved is received, calling the second computer to operate a target quantum algorithm by using a catalytic term corresponding to the combination optimization problem, wherein the catalytic term is used for accelerating the evolution speed of the target quantum algorithm;
Step S14, receiving expected problem parameters returned by the second computer, wherein the expected problem parameters are used for indicating the degree of approach of an evolution end state and a ground state of a problem item, the evolution end state is obtained by the second computer through the operation of the target quantum algorithm by using the catalytic item, the problem item is used for indicating the combination optimization problem, and the ground state of the problem item is used for indicating the solution of the combination optimization problem;
step S16, adjusting the catalytic item according to the expected problem parameter until the expected problem parameter meets the exit condition of the adjustment process, so as to obtain a target catalytic item;
and S18, extracting a target evolution end state corresponding to the target quantum algorithm executed by adopting the target catalytic item from the second computer to solve the combination optimization problem.
Alternatively, in this embodiment, the target quantum algorithm may be, but is not limited to, a quantum annealing algorithm, a quantum approximation optimization algorithm, and the like, and the application describes an embodiment with the quantum annealing algorithm as the target quantum algorithm, and does not limit the target quantum algorithm. All quantum algorithms that allow solving the combinatorial optimization problem can be considered as target quantum algorithms.
Optionally, in this embodiment, the present application proposes a method for operating a computer, which may be used in a quantum annealing optimization scenario for ground state solution, and may be directly implemented by using a current quantum annealing-based quantum computer. By mapping the solution of the classical combinatorial optimization problem to a ground state of a certain hamiltonian, quantum advantage is possible for quantum computers based on quantum annealing by performing the process of ground state solution. The time for a quantum computer to perform quantum annealing becomes exponentially long, as there may be an exponentially small energy gap in the evolution process. In order to solve the problem of the small energy gap of the index, the catalyst item (corresponding to the catalytic item) is introduced in the evolution process, but no definite scheme is available for selecting the catalyst item at present, and some existing schemes cannot give the best results. One of the purposes of the present application is to solve this problem to some extent.
The running method of the computer provided by the application can be applied to a quantum annealing computer system for ground state solving, the computer system comprises a first computer and a second computer, the first computer is connected with the second computer, the second computer is a quantum computer provided with a target quantum algorithm, the target quantum algorithm is a quantum algorithm with a function of solving a combination optimization problem, the method is applied to the first computer, fig. 3 is a schematic diagram of a computer system according to an embodiment of the application, as shown in fig. 3, the computer system is coupled with the first computer and the second computer, the first computer can be a classical computer, the second computer can be a quantum computer, and the quantum computer and the classical computer are connected in a bidirectional way through a channel Similarly, the flow of the running method of the computer provided by the application is also divided into two parts, namely classical computer execution and quantum computer execution, and firstly, the classical combination optimization problem corresponding to the actual problem to be solved on the classical computer is equivalent to be containedClassical I Xin Moxing +.>This is also called the problem hamiltonian (corresponding to the problem term described above), where the ground state of the problem hamiltonian corresponds to the solution of the real problem to be solved (i.e., the problem term is used to indicate the combined optimization problem, and the ground state of the problem term is used to indicate the solution of the combined optimization problem). Then the initial catalyst Hamiltonian is designed>Wherein the coefficients preceding each different British operator term in the catalyst Hamiltonian amount (which can be understood as the above catalytic term) are the parameters to be optimized +.>
Classical computers transfer this information over a channel to a quantum computer, where it is transferred from an initial stateStarting from the initial Hamiltonian quantity +.>Catalyst Hamiltonian amount->And problem hamiltonian->Time evolution is carried out under the action of (2) and the final state +.>. Then measure the problem hamiltonian>In state->The lower expected value- >(corresponding to the desired problem parameters described above). Then pass the channel to add +.>And->Returning to the classical computer, calculating the pair +.>Is then based on the new +.>Preparation of the corresponding State->This procedure is repeated until the optimization reaches convergence, at which point the resulting +.>The (equivalent to the end state of the target evolution) is an approximate solution to the corresponding problem. The computer system couples the quantum computer and the classical computer, and optimizes the Hamiltonian term (equivalent to the catalytic term) of the catalyst in the quantum computer by using the classical computer, so that a better catalyst Hamiltonian term (equivalent to the target catalytic term) is sought, and the behavior of the quantum computer is further improved. Since it is not here related to operations that the NISQ device cannot realize, such as large-scale quantum error correction, this scheme can be directly applied to quantum computers based on quantum annealing algorithm in the NISQ age, which is also one of the innovative points of the present application.
Optionally, in this embodiment, the catalytic term is a component term of the target quantum algorithm, and when the above-mentioned problem of combination optimization is solved, the evolution time may increase exponentially with the increase of the system.
In the embodiment of the application, a method for operating a computer is provided, the computer system comprises a first computer and a second computer, the first computer is connected with the second computer, the second computer is a quantum computer provided with a target quantum algorithm, the target quantum algorithm is a quantum algorithm with a function of solving a combination optimization problem, under the condition that the first computer receives the combination optimization problem to be solved, the first computer calls the second computer to operate the target quantum algorithm by using a catalytic item corresponding to the combination optimization problem, and the catalytic item can accelerate the evolution speed of the target quantum algorithm; and finally, the first computer extracts a target evolution end state corresponding to a target quantum algorithm executed by the target catalytic item from the second computer to solve the combination optimization problem, wherein the expected problem parameter is returned by the second computer, the expected problem parameter is used for indicating the approaching degree of the evolution end state and the ground state of the problem item, the evolution end state is obtained by the second computer through the operation of the target quantum algorithm by using the catalytic item, the problem item is used for indicating the combination optimization problem, and the ground state of the problem item is used for indicating the solution of the combination optimization problem. In the method, the target catalytic item is obtained by carrying out multi-round adjustment on the catalytic item in the target quantum algorithm in the mode, wherein each round of adjustment is based on expected problem parameters returned by the second computer, so that the target evolution end state obtained by adopting the target quantum algorithm executed by the final target catalytic item is closer to the ground state of the problem item, and further a solution with higher accuracy of combined optimization problem can be obtained based on the target evolution end state. By adopting the technical scheme, the problem that in the related technology, the accuracy of solving the combined optimization problem by the running computer is lower is solved, and the technical effect of improving the accuracy of solving the combined optimization problem by the running computer is realized.
As an alternative, adjusting the catalytic term according to the desired problem parameter further comprises:
s21, adjusting the Hamiltonian amount of a first catalyst currently used by the target quantum algorithm into a Hamiltonian amount of a second catalyst according to the expected problem parameter, wherein the catalysis item comprises: and the Hamiltonian amount of the catalyst of the target quantum algorithm.
Alternatively, in the present embodiment, fig. 4 is a schematic diagram of adjusting the catalytic item based on the desired problem parameter according to the embodiment of the present application, and as shown in fig. 4, a round of adjustment of the catalytic item is illustrated: the first computer sends the Hamiltonian amount of the first catalyst to the second computer, the second computer executes a target quantum algorithm according to the received Hamiltonian amount of the first catalyst to obtain expected problem parameters of the round, the expected problem parameters are transmitted back to the first computer, and the first computer adjusts the Hamiltonian amount of the first catalyst according to the received expected problem parameters to obtain Hamiltonian amount of the second catalyst. It should be noted that fig. 4 only shows a single-round adjustment process of the catalytic item, and the catalytic item may undergo multiple rounds of adjustment, each round of adjustment being based on the desired problem parameters obtained in the previous round.
As an alternative, the method adjusts the hamiltonian amount of the first catalyst currently used by the target quantum algorithm to the hamiltonian amount of the second catalyst according to the desired problem parameter, and further includes:
s31, adjusting a first catalytic coefficient in the Hamiltonian amount of the first catalyst to a second catalytic coefficient according to the expected problem parameter, wherein the catalytic coefficient of the Hamiltonian amount of the catalyst of the target quantum algorithm is a superposition coefficient of Brix operators in Brix terms of the Hamiltonian amount of the catalyst;
and S32, sending the second catalytic coefficient to the second computer, wherein the second catalytic coefficient is used for indicating the second computer to construct the second catalyst Hamiltonian volume by using the second catalytic coefficient.
Alternatively, in the present embodiment, the above-mentioned catalyst has a Hamiltonian amount ofCatalyst Hamiltonian amount->The coefficients preceding each different Brix term of (a) are the parameters to be optimized +.>Parameter->For the catalytic coefficient, the catalyst Hamiltonian is adjusted to +.>It can be understood that the parameters to be optimized are +.>And adjusting, namely adjusting a first catalytic coefficient in the Hamiltonian amount of the first catalyst to a second catalytic coefficient, and sending the second catalytic coefficient to the second computer, wherein the second computer is responsible for constructing the received second catalytic coefficient as the Hamiltonian amount of the second catalyst.
As an alternative, the sending the second catalytic coefficient to the second computer further includes:
s41, converting the second catalytic coefficient into a target construction instruction, wherein the target construction instruction is used for indicating to adjust interaction among qubits in a quantum system of the second computer so as to construct the Hamiltonian amount of the second catalyst;
s42, sending the target construction instruction to the second computer.
Optionally, in this embodiment, unlike the foregoing manner of adjusting the first catalytic coefficient in the first catalyst hamiltonian to the second catalytic coefficient and sending the second catalytic coefficient to the second computer, the second computer may take charge of constructing the received second catalytic coefficient into the second catalyst hamiltonian, and may take charge of converting the second catalytic coefficient into the target construction instruction and then send the target construction instruction to the second computer, where the target construction instruction may instruct the second computer to adjust the interaction between the qubits in the quantum system, and after receiving the target construction instruction, the second computer may adjust the interaction between the qubits in the quantum system by changing a magnetic field of the quantum system, so as to construct the second catalyst hamiltonian.
As an alternative solution, the catalytic item is adjusted according to the expected problem parameter until the expected problem parameter meets the exit condition of the adjustment process, so as to obtain a target catalytic item, and further includes:
s51, detecting whether the expected problem parameter meets the exit condition;
s52, determining an adjustment mode of the catalytic item according to the expected problem parameter under the condition that the expected problem parameter does not meet the exit condition;
and S53, adjusting the catalytic item according to the adjustment mode until the expected problem parameter meets the exit condition of the adjustment process, so as to obtain the target catalytic item.
Alternatively, in the present embodiment, a round of adjustment of the catalytic item is illustrated in fig. 4, and the catalytic item may undergo multiple rounds of adjustment, each round of adjustment based on the desired problem parameters obtained in the previous round. And the judging mode of stopping the adjustment of the catalytic item is to determine whether the expected problem parameter meets the exit condition, if the expected problem parameter does not meet the exit condition, determining the adjustment mode of the catalytic item according to the expected problem parameter, and continuously adjusting the catalytic item according to the adjustment mode.
As an alternative, detecting whether the expected problem parameter satisfies the exit condition further includes:
S61, detecting a relation between a problem Hamiltonian expected value and an adjustment threshold, wherein the expected problem parameter comprises the problem Hamiltonian expected value, the problem Hamiltonian expected value is an expected value of the problem Hamiltonian of the combined optimization problem in the evolution end state, and the problem item comprises the problem Hamiltonian;
and S62, determining that the adjustment process does not meet the exit condition when the expected value of the Hamiltonian amount of the problem is greater than or equal to the adjustment threshold.
Optionally, in this embodiment, a manner of detecting whether the expected problem parameter meets the exit condition is provided, that is, comparing a problem hamiltonian expected value with an adjustment threshold, where the expected problem parameter includes the problem hamiltonian expected value, and the problem hamiltonian expected value is the problem hamiltonianIn state->Desired value of
Alternatively, in the present embodiment, the smaller the problem hamiltonian expected value is, the closer the evolution end state is to the ground state of the problem item. And under the condition that the expected value of the Hamiltonian quantity is larger than or equal to the adjustment threshold value, determining that the adjustment process does not meet the exit condition, and under the condition that the expected value of the Hamiltonian quantity is smaller than the adjustment threshold value, determining that the adjustment process meets the exit condition.
As an alternative, detecting whether the expected problem parameter satisfies the exit condition further includes:
s71, detecting whether a problem Hamiltonian expected value converges or not, wherein the expected problem parameter comprises the problem Hamiltonian expected value, the problem Hamiltonian expected value is an expected value of the problem Hamiltonian of the combination optimization problem in the evolution end state, and the problem item comprises the problem Hamiltonian;
and S72, determining that the adjustment process does not meet the exit condition under the condition that the expected value of the Hamiltonian amount of the problem is not converged.
Alternatively, in the present embodiment, another way of detecting whether the expected problem parameter satisfies the exit condition is proposed, that is, observing the expected value of the problem hamiltonianWhether the Hamiltonian amount of the first catalyst is converged or not is determined, in theory, after the Hamiltonian amount of the first catalyst is adjusted to the Hamiltonian amount of the second catalyst, the second computer operates the target quantum algorithm to obtain different evolution end states, so that expected values of the Hamiltonian amount of the problem are also different, whether the expected values of the Hamiltonian amount of the problem are converged or not is determined through multiple-round adjustment, the exit condition is not met in the adjustment process when the expected values of the Hamiltonian amount of the problem are not converged, and the exit condition is met in the adjustment process when the expected values of the Hamiltonian amount of the problem are converged.
As an alternative, detecting whether the problem hamiltonian expected value converges or not further includes:
s81, detecting whether the problem Hamiltonian expected value is stable or not according to the problem Hamiltonian expected value and a historical problem Hamiltonian expected value, wherein the historical problem Hamiltonian expected value is N problem Hamiltonian expected values received before the problem Hamiltonian expected value is received, and N is a positive integer;
s82, when the expected value of the Hamiltonian amount is unstable, determining that the expected value of the Hamiltonian amount is not converged.
Optionally, in this embodiment, the manner of determining whether the expected value of the problem hamiltonian is converged is to detect whether the expected value of the problem hamiltonian is stable according to the expected value of the problem hamiltonian and the historical expected value of the problem hamiltonian, for example, if a floating range of the expected value of the problem hamiltonian obtained by near-N adjustment is smaller than a threshold value of the floating range, this indicates that the expected value of the problem hamiltonian is stable, it may be determined that the expected value of the problem hamiltonian is converged, and if a floating range of the expected value of the problem hamiltonian obtained by near-N adjustment is greater than or equal to the threshold value of the floating range, this indicates that the expected value of the problem hamiltonian is unstable, and it may be determined that the expected value of the problem hamiltonian is not converged.
It is noted that the optimization of the catalytic term mentioned in the present application may be understood as an optimization of the quantum annealing algorithm, and the adjustment of the catalytic coefficient in the catalytic term based on the desired problem parameter may be understood as an optimization of the catalytic term.
As an alternative, determining the adjustment mode of the catalytic item according to the expected problem parameter includes one of the following:
s91, determining a target gradient of the catalytic item according to the expected problem parameter, wherein the adjustment mode comprises the target gradient;
s92, determining a target gradient and a target step length of the catalytic item according to the expected problem parameter, wherein the adjustment mode comprises the target gradient and the target step length.
Alternatively, in the present embodiment, the target gradient may be understood as the adjustment direction of the catalytic item, such as: increasing catalytic term/decreasing catalytic term.
Optionally, in this embodiment, the target gradient and the target step size of the catalytic item are determined according to the expected problem parameter, and since the expected problem parameter of each round may be different, a new target gradient and a new target step size may be obtained for each round, for example, the current expected problem parameter is larger, the target step size may be larger, and coarse adjustment is performed; the current expected problem parameters are smaller, the convergence tends to happen, and the target step size can be smaller to carry out fine tuning. If the problem parameter is not expected to converge, but instead bounces, the target gradient may be changed.
As an alternative, the catalytic item is adjusted according to the adjustment mode, including one of the following:
s101, adjusting the catalytic item to a default step length according to the target gradient when the adjustment mode comprises the target gradient;
s102, adjusting the target step length according to the target gradient when the adjustment mode comprises the target gradient and the target step length.
Optionally, in this embodiment, when the whole mode includes the target gradient, the step size of each round is a default step size.
As an alternative, receiving the expected problem parameter returned by the second computer, further includes:
s111, receiving a problem Hamiltonian expected value sent by a quantum measurement device deployed on the second computer, wherein the expected problem parameter comprises the problem Hamiltonian expected value, the problem Hamiltonian expected value is obtained by measuring an expected value of the problem Hamiltonian of the combination optimization problem in the evolution end state by the quantum measurement device, and the problem item comprises the problem Hamiltonian.
Optionally, in this embodiment, the above-mentioned problem hamiltonian expected value is the above-mentioned problem hamiltonian In state->The lower expected value->Wherein, state->For the end of evolution, the expected value +.>Is measured by a quantum measuring device.
As an alternative, before the invoking the second computer uses the catalytic term corresponding to the combination optimization problem to run the target quantum algorithm, the method further includes:
s121, converting the combination optimization problem into the problem item, and constructing an initial item, wherein the initial item is used for providing an initial state for a quantum algorithm;
s122, constructing the catalytic item according to the problem item and the initial item;
s123, constructing the problem item, the initial item and the catalytic item into the target quantum algorithm;
s124, deploying the target quantum algorithm to the second computer.
Optionally, in this embodiment, for a typical quantum annealing algorithm, it contains a problem term (e.g., the problem hamiltonian) And initial term (initial Hamiltonian amount +.>) Two parts, where the ground state of the problem hamiltonian encodes the solution of the target problem (combinatorial optimization problem), which is also the target state for the desired preparation. While the ground state of the initial hamiltonian needs to be an easy-to-prepare state, the ground state of the initial hamiltonian is used as the starting state (i.e., initial state) of the quantum-annealed-based quantum computer, and is generally selected as the brix +. >The superposition of the operators is carried out,
(2)
thus, the ground state of the initial Hamiltonian amount, i.e., the initial state of the quantum annealing algorithm (i.e., initial state), isHere +.>Represents the time of evolution,/->For the arithmetic +.>Is based on (2)A state. Quantum annealing-based quantum computer is a slave state +.>Starting from the Hamiltonian quantity->Is subjected to time evolution under the action of the (a),
(3)
wherein,function of total evolution time>Is the initial Hamiltonian amount->Evolution path function, function->Is the initial Hamiltonian amount->Evolution path function, function->And->To satisfy the relationship->,/>Is a function of any of the above. In this way, in->Driven by (a) when evolution time +>Long enough, the quantum system can be from +.>Gradually evolving to +.>In the ground state of (2), thus completing the transition from the initial state +.>Evolving into a state (target state) of the coding problem solution, i.e.>The ground state transitions. But it should be noted that the evolution time needs to satisfy the relation +.>Wherein->For +.>A minimum value of an energy gap between the transient ground state and the transient first excited state.
In solving the classical combination optimization problem, only the formula is usedThe time-containing Hamiltonian amount in (a) can generate a small energy gap index in the evolution process, which means that an index long +. >The original problem can be solved accurately. To solve this problem to some extent, the mainstream approach is to introduce a new catalyst hamiltonian term in the original time evolution path>I.e.
(4)
Wherein,function of total evolution time>Is the initial Hamiltonian amount->Evolution path function, function->Is the initial Hamiltonian amount->Evolution path function, function->Is the catalyst Hamiltonian item->Evolution path function, function->Needs to meet->Thus at the beginning and end of evolution +.>Not to function, which also ensures that the system can be controlled from +.>Gradually evolving to +.>Is in the ground state. During evolution, the catalyst Hamiltonian term +.>Plays a role in expanding the energy gap to shorten the evolution time.
Alternatively, in the present embodiment, the catalyst hamiltonian termI.e. a catalytic term, is constructed from a problem term and an initial term, the problem term and the catalytic term are constructed as the target quantum algorithm, wherein the expression form of the target quantum algorithm may be a time evolution under the driving of the hamiltonian of the formula (4).
As an alternative, the method for converting the combination optimization problem into the problem term further includes:
S131, receiving the combined optimization problem sent by a user, wherein the combined optimization problem is a problem of solving an object set which simultaneously satisfies a plurality of constraint conditions from a plurality of objects in a target scene, and the plurality of constraint conditions comprise: constraint conditions for the object and constraint conditions for the association relationship of the object in the target scene;
s132, constructing a topological structure corresponding to the combination optimization problem, wherein vertexes in the topological structure represent each object in the plurality of objects, and edges connected between the vertexes in the topological structure represent association relations of the plurality of objects in the target scene;
s133, constructing an optimization target of the combination optimization problem by using the topological structure and the constraint conditions, and constructing a quantum system corresponding to the target scene, wherein the quantum system takes each object in the objects as a quantum bit, and interaction among the quantum bits is used for representing the association relation of the objects in the target scene;
s134, converting the optimization target into the quantum system, and obtaining a problem Hamiltonian quantity corresponding to the quantum system as the problem item.
Optionally, in this embodiment, the above step of converting the combination optimization problem into the problem item is better understood, and the following description will be given with reference to an alternative embodiment, which may, but is not limited to, take the combination optimization problem as "an optimal installation scheme problem of installing a camera in an art gallery" as an example, and describe a manner of converting the combination optimization problem into the problem item:
the "optimal installation scheme problem for installing cameras in art houses" is as follows: assuming that the art museum is to show some precious drawings on different corridors, a camera needs to be installed to ensure the safety of the drawings. If a camera exists in a certain corridor, the camera can observe all the pictures in the corridor; if there is one camera at the intersection of the hallways, the camera can observe the drawing of all hallways involved. The problem to be solved is what solution minimizes the installed cameras. The problem can be represented by the concept of a graph in mathematics, which (corresponding to the topology described above) is composed of vertices and edges. The intersection of the corridor and the corridor or the end of the corridor (dead-end) is the vertex of the graph (corresponding to the vertex in the topology), while each corridor represents the edge of the graph (corresponding to the edge connected between the vertices in the topology), fig. 5 is a schematic diagram of the installation of the camera in the art gallery according to the embodiment of the application, as shown in fig. 5, the circle represents the vertex of the graph, or the place where the camera needs to be installed, the line segment represents the position of the corridor, the gray circle represents one possible installation scheme of the camera, and all the pictures can be taken care of by the three cameras.
3. Construction principle of (1) by->To represent the set of all vertices, with +.>To represent +.>Vertex(s) with->Representing a collection of edges, with +.>To indicate the presence at->Vertex and->Edges between vertices, the above problem can be abstracted to be +.>A subset is searched such that at least one vertex is located in the subset for each edge in the graph. If usedTo represent +.>If a vertex is present in the subset, then +.>Indicating that the vertex is located in the subset to be solved by +.>Indicating that the vertex is not present in the subset to be solved. Then what is to do is to have the function: />Minimum is taken while satisfying the following constraint, < ->The constraint ensures that at least one vertex is located on each edge of the graph in the subset to be solved. If penalty term parameter->Being a constant, is used under control constraints, the constrained optimization can then be converted into a function:is the minimum value of (corresponds to the above-mentioned optimization objective). />Meaning that if the side +.>The constraint is satisfied, then the contribution of the edge in the second term is 0, otherwise +.>
If usedTo represent the number of vertices of the graph, then the inclusion of +. >The mathematical model is represented by a system of quantum bits, and then a quantum system corresponding to the target scene is constructed, and the +.>Bubble of the individual qubits->OperatorEigenstates->And->To respectively represent +.>Get->And->In (2), then +.>To replaceParameter->The problem hamiltonian can be constructed, < ->The ground state of the hamiltonian is +.>In the form of>Is to say that +.>Minimum value +.>Is a value of (a). This completes the abstract process for the problem of installing cameras in the art museum. The above can be combinedCombining and similar item reduction to obtain +.>Wherein->And->To be ofCoefficient after simple, ++>Is constant. It should be noted that->The ground state problem is not considered in general because it does not work when solving it.
4. Detailed expression of->
5. Physical meaning of the individual parameters in the expression, +.>And->For simplifying the coefficients +.>Is constant. It should be noted that->The ground state problem is not considered in general because it does not work when solving it.
As an alternative, constructing the catalytic term according to the problem term and the initial term further includes:
s141, constructing a first evolution path function of a problem Hamiltonian and a second evolution path function of an initial Hamiltonian, wherein the problem item comprises the problem Hamiltonian and the initial item comprises the initial Hamiltonian;
S142, constructing a catalyst Hamiltonian amount according to the problem Hamiltonian amount, the initial Hamiltonian amount, the first evolution path function and the second evolution path function, and a third evolution path function of the catalyst Hamiltonian amount, wherein the catalysis item comprises the catalyst Hamiltonian amount.
Alternatively, in this embodiment, the first evolution path function may be a function in equation (4)The second evolution path function may be a function +.>
Alternatively, in this embodiment, according to the problem hamiltonian amount, the initial hamiltonian amount, the first evolution path function and the second evolution path function may construct a catalyst hamiltonian amount in 2 manners, one may be according toMiddle two-body Paoli->The interaction terms of the operators to construct the corresponding two-body Paulori +.>Operator and bubble->The method of constructing the catalyst hamiltonian term by using the interaction term of the operators, and the method utilizes the concept of multi-body non-localization. It should be noted that the effect of such multi-body non-localization can be further enhanced by optimization. Another way is to let the system act in +. >The construction mode of the minimum catalyst Hamiltonian amount comprises the following working amounts: />
(5)
WhileThe need to be satisfied is met,
(6)
in this context,for the catalyst item to be introduced, it should be satisfied,
(7)
wherein,is a coefficient term, i is an imaginary number, +.>,/>Is the partial derivative of t. Generally speaking, a->Comprises->A bubble sharp. However, the current easy-to-implement operations on quantum computers comprise only single-bubble and two-bubble Brix terms, so that the catalyst terms generally employed are the combination of single-bubble Brix terms and two-bubble Brix terms>In this case, the truncation error can be further offset by optimization, so that a better effect is obtained. In general, the two catalyst hamiltonian amounts described above can be written as:
(8)
wherein the method comprises the steps ofRepresenting different qubits, and +.>Then representing a different Brix, < ->Bubble operator indicating j-th qubit in gamma direction, < >>The parameters to be optimized, which represent the k-th qubit in the beta direction, are here chosen as the coefficients +_ preceding the respective Brix term in the Hamiltonian quantity of the catalyst>. In this case, the formula can be used by the quantum computer based on quantum annealing>The evolution path preparation in (a) consists of the parameters +.>Controlled parameter-containing sub-states, then measuring +. >Is +.>And optimizing the parameters by classical computer +.>
As an alternative, constructing the problem term, the initial term and the catalytic term as the target quantum algorithm, further includes:
s151, constructing the Hamiltonian quantity of the problem, the initial Hamiltonian quantity, the catalyst Hamiltonian quantity, the first evolution path function, the second evolution path function and the third evolution path function as time-containing Hamiltonian quantities serving as the target quantum algorithm, wherein the first evolution path function, the second evolution path function and the third evolution path function are functions from actual evolution time to target evolution time, the first evolution path function is 1 at initial evolution time until reaching the target evolution time and is 0, the second evolution path function is 0 at initial evolution time until reaching the target evolution time and is 1, and the third evolution path function is 0 at initial evolution time and the target evolution time.
Alternatively, in the present embodiment, the target quantum algorithm may be, but is not limited to, hamiltonian in the above formula (4)The problem hamiltonian can be +. >The initial hamiltonian amount may be +.>The catalyst Hamiltonian amount may be +.>The first evolution path function may be a function +.>The second evolution path function may be a function +.>The third evolution path function may be a function +.>
As an alternative, according to the problem hamiltonian amount, the initial hamiltonian amount, the first evolution path function and the second evolution path function construct a catalyst hamiltonian amount, and further includes:
s161, constructing the problem Hamiltonian amount, the initial Hamiltonian amount, the first evolution path function and the second evolution path function as reference Hamiltonian amounts;
s162, constructing a target Brix term as the catalyst Hamiltonian amount by using the reference Hamiltonian amount, wherein the target Brix term is an operation between a superposition coefficient and a Brix operator.
Alternatively, in the present embodiment, the reference hamiltonian amount may be, but is not limited to, that in the above formula (3)
As an alternative, the target bubble-free term is constructed using the reference hamiltonian as the catalyst hamiltonian, including one of:
S171, constructing a two-body Brix term as the catalyst Hamiltonian quantity by using the reference Hamiltonian quantity, wherein the target Brix term comprises the two-body Brix term, and the two-body Brix term comprises an operation between a superposition coefficient and two Brix operators;
s172, constructing a sum operation of a single Brilliant term and a two-body Brilliant term by using the reference Hamiltonian quantity as the catalyst Hamiltonian quantity, wherein the target Brilliant term comprises the sum operation of the single Brilliant term and the two-body Brilliant term, the single Brilliant term comprises the operation between a superposition coefficient and a single Brilliant, and the two-body Brilliant term comprises the operation between the superposition coefficient and the two Brilliant.
Alternatively, in the present embodiment, equation (8) is a general expression of the catalyst hamiltonian, where the catalyst hamiltonian includes only the two-body bubble terms, the former term of equation (8)Is 0, includes a monomer Brix term and at a catalyst Hamiltonian amountIn the case of the two-body bubble term, the former term of formula (8)>And is not 0.
As an alternative, the monomer brix term is of the form:
wherein->For the superposition coefficient in said monomer bubble interest,/->For a single Brix in the monomer Brix term, < > >Is the j-th qubit in the quantum system of the second computer +.>A bubble operator of direction, the quantum system comprising M qubits, j being a positive integer greater than or equal to 1 and less than or equal to M;
the two-body bubble term is of the following form:
wherein->For the superposition coefficient in the two-body bubble interest item,>for two Brix operators in the two-body Brix term,/I>Is the j-th qubit in the quantum system of the second computer +.>Bubble sharp operator of direction, ->Is the kth qubit in the quantum system of the second computer +.>A oriented berkovich operator, the quantum system comprising M qubits, j being a positive integer greater than or equal to 1 and less than or equal to M, k being a positive integer greater than or equal to 1 and less than or equal to M, the jth qubit and the kth qubit being different qubits in the quantum system;
the sum operation of the monomer Brix term and the two-body Brix term is as follows:
wherein->For the superposition coefficient in said monomer bubble interest,/->For a single Brix in the monomer Brix term, < >>Is the j-th qubit in the quantum system of the second computer +. >Bubble sharp operator of direction, ->For the superposition coefficient in the two-body bubble interest item,>for two Brix operators in the two-body Brix term,/I>Is the kth qubit in the quantum system of the second computer +.>The quantum system comprises M quantum bits, j is a positive integer greater than or equal to 1 and less than or equal to M, k is a positive integer greater than or equal to 1 and less than or equal to M, and the jth quantum bit and the kth quantum bit are different quantum bits in the quantum system.
Optionally, in this embodiment, in order to better understand the adjustment process of the catalytic item in the operation method of the computer provided in the present application, the adjustment process of the catalytic item is described below in conjunction with the optional embodiment, but is not limited to the technical solution of the embodiment of the present application.
In this embodiment, a method for operating a computer is provided, and fig. 6 is a schematic diagram of a flow of adjusting a catalytic item according to an embodiment of the present application, as shown in fig. 6, mainly including the following steps:
step S601: the following design was done on a classical computer. Starting from the mathematical problem of a specific solution to the actual problem, the problem is equivalent to a certain Hamiltonian amount of the problem with a specific form And->The ground state of (c) corresponds to the solution of the original problem. Meanwhile, the initial Hamiltonian amount of the quantum annealing algorithm is designed>
Step S602: designing adiabatic evolution paths of quantum annealing algorithms on classical computers, i.e. evolution path functionsAnd->Wherein->For the total annealing time, +.>Is the time of actual evolution. Needs to meet the requirements of,/>
Step S603: based on initial Hamiltonian amount on classical computersAnd the corresponding evolution path function->And problem hamiltonian->And the corresponding evolution path function->Based on these information, the Hamiltonian term of the catalyst is designedI.e. the corresponding evolution path function->Needs to meet->
Step S604: on an actual quantum computer based on quantum annealing, from the ground state of the initial Hamiltonian amountStarting from the total time-containing Hamiltonian>Is driven to evolve over time, wherein +.>For the total annealing time, the end-of-evolution state is obtained>
Step S605: measuring problem hamiltonian on quantum computerIn the end of evolution->Lower expected value->
Step S606: will expect the valueAnd the corresponding parameter +.>Returning to the classical computer, on which the +.>Minimum value is target optimization parameter +.>Is a value of (2);
step S607: if the optimization converges, output at this time And from->Extracting a solution of an original problem; otherwise according to the new +.>The value of (2) continues from step S604.
By the running method of the computer, the behavior of the quantum annealing algorithm is further improved. Due to the existence of the classical computer optimization process, the method and the system provided by the application can be used for improving the performance of the quantum computer based on quantum annealing. The method and the corresponding system for designing the catalyst item are capable of being directly combined with the previous design method, and the performance of the quantum computer is further improved through optimizing the coefficient before the catalyst item. Meanwhile, the scheme provided by the application does not relate to the technology beyond the NISQ equipment, and can directly run on the NISQ equipment. The scheme provided by the application can improve the performance of the quantum computer based on the quantum annealing algorithm in the NISQ era, and hopefully better shows the quantum advantage of the quantum computer.
Notably, in the scheme proposed in the present application, a quantum annealing algorithm may be run on a quantum computer to obtain a final state of the time-dependent evolution and to measure the expected value of the problem hamiltonian; taking the intensity items in front of the introduced catalyst Hamiltonian volume as parameters to be optimized, and repeating the classical-quantum mixing process on a classical computer by optimizing the intensity items so that the expected value of the problem Hamiltonian volume reaches the minimum value, thereby preparing the ground state of the target Hamiltonian volume. Wherein the initial state of a quantum annealing algorithm running on a quantum computer should be a simple, easy to prepare, straight-product state. The problem hamiltonian amount should not be as easy as the initial hamiltonian amount of the quantum annealing algorithm, so that the quantum annealing algorithm can get a non-trivial end-of-evolution state. The evolution time should be moderate so that the adiabatic theorem can play a role. The evolution path function of evolution should be as smooth as possible, so that the quantum annealing process can be completed with higher quality. The intensity term after optimization is not easily too large to be implemented on a NISQ device. The introduced catalyst item needs to ensure that it plays a positive role in improving the performance of the quantum computer. The quantum computer can rapidly calculate information such as gradient and the like required by classical computer optimization. A quantum-classical transmission channel is configured between the quantum computer and the classical computer, so that efficient bidirectional communication between the classical computer and the quantum computer can be realized. The quantum computer also needs to be provided with a quantum measuring device, and can accurately and rapidly give out the expected value of the physical quantity to be measured. The quantum measuring device can relieve the reading error generated in the measuring process to a certain extent. The quantum computer should also be equipped with a storage device that can store relevant data generated during the operation of the quantum computer. The process of quantum annealing on a quantum computer should construct a correspondence between the problem hamiltonian and the problem solved so that an approximate solution to the target problem can be extracted from the end-state of the time-dependent evolution. The initial hamiltonian, the problem hamiltonian and the catalyst hamiltonian should be easy to implement on a quantum computer. The quantum computer should be configured with an output device that can output an approximate solution of the problem extracted from the end-of-evolution state when the optimization reaches convergence. The quantum computer should have some degree of tuning to run a quantum annealing algorithm for the Hamiltonian term of the catalyst with an adjustable intensity term. In quantum annealing on a quantum computer, the solution of the problem of interest should correspond to the ground state of the problem hamiltonian. In the process of quantum annealing on a quantum computer, the intensity of the amount of catalyst term Ha Midu should be easily adjustable over a range on the quantum computer. The initial hamiltonian amount, the catalyst term Ha Midu amount, and the setting of the problem hamiltonian amount should take the topology of the quantum computer into full consideration, and have a simple form. Finally, when the quantum computer is provided with an error correction device, some errors generated in the process of executing the quantum annealing algorithm can be corrected.
Embodiments of the present application also provide a computer system comprising: a first computer and a second computer, wherein the first computer has a combination optimization problem to be solved, the second computer is a quantum computer deployed with a target quantum algorithm, the target quantum algorithm is a quantum algorithm with a function of solving the combination optimization problem, and the first computer is a first computer in the operation method of any one of the computers; the second computer is the second computer in the operating method of any one of the computers.
From the description of the above embodiments, it will be clear to a person skilled in the art that the method according to the above embodiments may be implemented by means of software plus the necessary general hardware platform, but of course also by means of hardware, but in many cases the former is a preferred embodiment. Based on such understanding, the technical solution of the present application may be embodied essentially or in a part contributing to the prior art in the form of a software product stored in a storage medium (such as ROM/RAM, magnetic disk, optical disk), comprising several instructions for causing a terminal device (which may be a mobile phone, a computer, a server, or a network device, etc.) to perform the method described in the embodiments of the present application.
In this embodiment, an operation device of the computer is further provided, and the device is used to implement the foregoing embodiments and preferred embodiments, and will not be described in detail. As used below, the term "module" may be a combination of software and/or hardware that implements a predetermined function. While the means described in the following embodiments are preferably implemented in software, implementation in hardware, or a combination of software and hardware, is also possible and contemplated.
Fig. 7 is a block diagram of an operating apparatus of a computer according to an embodiment of the present application, a computer system including a first computer and a second computer, the first computer being connected to the second computer, the second computer being a quantum computer in which a target quantum algorithm is deployed, the target quantum algorithm being a quantum algorithm having a function of solving a combinatorial optimization problem, the apparatus being applied to the first computer, as shown in fig. 7, the apparatus including:
a calling module 702, configured to, when receiving the combination optimization problem to be solved, call the second computer to use a catalytic term corresponding to the combination optimization problem to run a target quantum algorithm, where the catalytic term is used to accelerate an evolution speed of the target quantum algorithm;
A receiving module 704, configured to receive expected problem parameters returned by the second computer, where the expected problem parameters are used to indicate a degree of closeness between an evolution end state and a ground state of a problem term, where the evolution end state is obtained by the second computer running the target quantum algorithm using the catalytic term, the problem term is used to indicate the combination optimization problem, and the ground state of the problem term is used to indicate a solution of the combination optimization problem;
an adjustment module 706, configured to adjust the catalytic term according to the expected problem parameter until the expected problem parameter meets an exit condition of an adjustment process, to obtain a target catalytic term;
and a solving module 708, configured to extract, from the second computer, a target evolution end state corresponding to the target quantum algorithm executed by using the target catalytic term, and solve the combination optimization problem.
In one exemplary embodiment, the adjustment module includes:
the first adjusting unit is configured to adjust a first catalyst hamiltonian amount currently used by the target quantum algorithm to a second catalyst hamiltonian amount according to the expected problem parameter, where the catalytic term includes: and the Hamiltonian amount of the catalyst of the target quantum algorithm.
In an exemplary embodiment, the first adjusting unit is further configured to:
adjusting a first catalytic coefficient in the first catalyst hamiltonian to a second catalytic coefficient according to the expected problem parameter, wherein the catalytic coefficient of the catalyst hamiltonian of the target quantum algorithm is a superposition coefficient of a berkovickers in a berkovich term of the catalyst hamiltonian;
and sending the second catalytic coefficient to the second computer, wherein the second catalytic coefficient is used for instructing the second computer to construct the second catalyst hamiltonian using the second catalytic coefficient.
In an exemplary embodiment, the first adjusting unit is further configured to:
converting the second catalytic coefficient into a target construction instruction, wherein the target construction instruction is used for indicating to adjust interaction among qubits in a quantum system of the second computer so as to construct the second catalyst Hamiltonian amount;
and sending the target construction instruction to the second computer.
In one exemplary embodiment, the adjustment module includes:
a detection unit for detecting whether the expected problem parameter satisfies the exit condition;
The determining unit is used for determining the adjustment mode of the catalytic item according to the expected problem parameter under the condition that the expected problem parameter does not meet the exit condition;
and the second adjusting unit is used for adjusting the catalytic item according to the adjusting mode until the expected problem parameter meets the exit condition of the adjusting process, so as to obtain the target catalytic item.
In an exemplary embodiment, the detection unit is further configured to:
detecting a relation between a problem hamiltonian expected value and an adjustment threshold, wherein the expected problem parameter comprises the problem hamiltonian expected value, the problem hamiltonian expected value is an expected value of the problem hamiltonian of the combination optimization problem in the evolution end state, and the problem item comprises the problem hamiltonian;
and under the condition that the expected value of the Hamiltonian amount of the problem is larger than or equal to the adjustment threshold value, determining that the adjustment process does not meet the exit condition.
In an exemplary embodiment, the detection unit is further configured to:
detecting whether a problem hamiltonian expected value converges or not, wherein the expected problem parameter comprises the problem hamiltonian expected value, the problem hamiltonian expected value is an expected value of the problem hamiltonian of the combined optimization problem in the evolution end state, and the problem item comprises the problem hamiltonian;
And under the condition that the expected value of the Hamiltonian amount of the problem is not converged, determining that the adjustment process does not meet the exit condition.
In an exemplary embodiment, the detection unit is further configured to:
detecting whether the problem Hamiltonian expected value is stable or not according to the problem Hamiltonian expected value and a historical problem Hamiltonian expected value, wherein the historical problem Hamiltonian expected value is N problem Hamiltonian expected values received before the problem Hamiltonian expected value is received, and N is a positive integer;
and under the condition that the expected value of the Hamiltonian amount of the problem is unstable, determining that the expected value of the Hamiltonian amount of the problem is not converged.
In an exemplary embodiment, the determining unit is further configured to one of:
determining a target gradient of the catalytic term according to the expected problem parameter, wherein the adjustment mode comprises the target gradient;
and determining a target gradient and a target step length of the catalytic item according to the expected problem parameter, wherein the adjustment mode comprises the target gradient and the target step length.
In an exemplary embodiment, the determining unit is further configured to one of:
when the adjustment mode comprises the target gradient, adjusting the catalytic item by default step length according to the target gradient;
And under the condition that the adjustment mode comprises the target gradient and the target step length, adjusting the catalytic item according to the target gradient.
In an exemplary embodiment, the receiving module includes:
the first receiving unit is configured to receive an expected value of a problem hamiltonian volume sent by a quantum measurement device deployed on the second computer, where the expected problem parameter includes the expected value of the problem hamiltonian volume, the expected value of the problem hamiltonian volume of the combination optimization problem is measured by the quantum measurement device by using an expected value of the problem hamiltonian volume in the evolution end state, and the problem term includes the problem hamiltonian volume.
In an exemplary embodiment, the apparatus further comprises:
the conversion module is used for converting the combination optimization problem into the problem item and constructing an initial item before the second computer is called to run a target quantum algorithm by using the catalytic item corresponding to the combination optimization problem, wherein the initial item is used for providing an initial state for the quantum algorithm;
a first construction module for constructing the catalytic term from the problem term and the initial term;
The second construction module is used for constructing the problem item, the initial item and the catalytic item into the target quantum algorithm;
and the deployment module is used for deploying the target quantum algorithm to the second computer.
In one exemplary embodiment, the conversion module includes:
a second receiving unit, configured to receive the combined optimization problem sent by the user, where the combined optimization problem is a problem of solving, from a plurality of objects in a target scene, a set of objects that simultaneously satisfy a plurality of constraint conditions, where the plurality of constraint conditions include: constraint conditions for the object and constraint conditions for the association relationship of the object in the target scene;
a first construction unit, configured to construct a topology structure corresponding to the combination optimization problem, where vertices in the topology structure represent each object in the plurality of objects, and edges connected between the vertices in the topology structure represent association relationships of the plurality of objects in the target scene;
a second construction unit, configured to construct an optimization target of the combination optimization problem using the topology structure and the plurality of constraint conditions, and construct a quantum system corresponding to the target scene, where the quantum system uses each object of the plurality of objects as a qubit, and interactions between the qubits are used to represent association relationships of the plurality of objects in the target scene;
And the conversion unit is used for converting the optimization target into the quantum system to obtain the problem Hamiltonian quantity corresponding to the quantum system as the problem item.
In one exemplary embodiment, the first building block includes:
a third construction unit, configured to construct a first evolution path function of a problem hamiltonian and a second evolution path function of an initial hamiltonian, where the problem term includes the problem hamiltonian and the initial term includes the initial hamiltonian;
and the fourth construction unit is used for constructing a catalyst Hamiltonian amount according to the problem Hamiltonian amount, the initial Hamiltonian amount, the first evolution path function and the second evolution path function, and a third evolution path function of the catalyst Hamiltonian amount, wherein the catalysis item comprises the catalyst Hamiltonian amount.
In one exemplary embodiment, the second building block includes:
the fifth construction unit is configured to construct the problem hamiltonian, the initial hamiltonian, the catalyst hamiltonian, the first evolution path function, the second evolution path function and the third evolution path function as time-containing hamiltonian as the target quantum algorithm, where the first evolution path function, the second evolution path function and the third evolution path function are functions from actual evolution time to target evolution time, the first evolution path function is 1 at initial evolution time until reaching the target evolution time, the second evolution path function is 0 at initial evolution time until reaching the target evolution time, and the third evolution path function is 0 at initial evolution time and at target evolution time.
In an exemplary embodiment, the fourth building element is further configured to:
constructing the problem hamiltonian amount, the initial hamiltonian amount, the first evolution path function and the second evolution path function as reference hamiltonian amounts;
and constructing a target Brilliant term as the catalyst Hamiltonian amount by using the reference Hamiltonian amount, wherein the target Brilliant term is an operation between a superposition coefficient and a Brix operator.
In an exemplary embodiment, the fourth building element is further configured to one of:
constructing a two-body Brix term using the reference Hamiltonian amount as the catalyst Hamiltonian amount, wherein the target Brix term comprises a two-body Brix term comprising an operation between a superposition coefficient and two Brix operators;
and constructing a summation operation of a single Brilliant term and a two-body Brilliant term by using the reference Hamiltonian quantity as the catalyst Hamiltonian quantity, wherein the target Brilliant term comprises the summation operation of the single Brilliant term and the two-body Brilliant term, the single Brilliant term comprises an operation between a superposition coefficient and a single Brilliant, and the two-body Brilliant term comprises an operation between the superposition coefficient and two Brilliant.
In one exemplary embodiment, the monomer brix term is of the form:
wherein->For the superposition coefficient in said monomer bubble interest,/->For a single Brix in the monomer Brix term, < >>Is the j-th qubit in the quantum system of the second computer +.>A Brix of direction, the quantum system comprising M qubits, j being greater than orA positive integer equal to 1 and less than or equal to M;
the two-body bubble term is of the following form:
wherein->For the superposition coefficient in the two-body bubble interest item,>for two Brix operators in the two-body Brix term,/I>Is the j-th qubit in the quantum system of the second computer +.>Bubble sharp operator of direction, ->Is the kth qubit in the quantum system of the second computer +.>A oriented berkovich operator, the quantum system comprising M qubits, j being a positive integer greater than or equal to 1 and less than or equal to M, k being a positive integer greater than or equal to 1 and less than or equal to M, the jth qubit and the kth qubit being different qubits in the quantum system;
the sum operation of the monomer Brix term and the two-body Brix term is as follows:
Wherein->For the superposition coefficient in said monomer bubble interest,/->For a single Brix in the monomer Brix term, < >>Is the j-th qubit in the quantum system of the second computer +.>Bubble sharp operator of direction, ->For the superposition coefficient in the two-body bubble interest item,>for two Brix operators in the two-body Brix term,/I>Is the kth qubit in the quantum system of the second computer +.>The quantum system comprises M quantum bits, j is a positive integer greater than or equal to 1 and less than or equal to M, k is a positive integer greater than or equal to 1 and less than or equal to M, and the jth quantum bit and the kth quantum bit are different quantum bits in the quantum system.
It should be noted that each of the above modules may be implemented by software or hardware, and for the latter, it may be implemented by, but not limited to: the modules are all located in the same processor; alternatively, the above modules may be located in different processors in any combination.
Embodiments of the present application also provide a computer readable storage medium having a computer program stored therein, wherein the computer program is arranged to perform the steps of any of the method embodiments described above when run.
In one exemplary embodiment, the computer readable storage medium may include, but is not limited to: a usb disk, a Read-Only Memory (ROM), a random access Memory (Random Access Memory, RAM), a removable hard disk, a magnetic disk, or an optical disk, or other various media capable of storing a computer program.
Embodiments of the present application also provide an electronic device comprising a memory having stored therein a computer program and a processor arranged to run the computer program to perform the steps of any of the method embodiments described above.
In an exemplary embodiment, the electronic device may further include a transmission device connected to the processor, and an input/output device connected to the processor.
Specific examples in this embodiment may refer to the examples described in the foregoing embodiments and the exemplary implementation, and this embodiment is not described herein.
It will be appreciated by those skilled in the art that the modules or steps of the application described above may be implemented in a general purpose computing device, they may be concentrated on a single computing device, or distributed across a network of computing devices, they may be implemented in program code executable by computing devices, so that they may be stored in a storage device for execution by computing devices, and in some cases, the steps shown or described may be performed in a different order than that shown or described herein, or they may be separately fabricated into individual integrated circuit modules, or multiple modules or steps of them may be fabricated into a single integrated circuit module. Thus, the present application is not limited to any specific combination of hardware and software.
The foregoing description is only of the preferred embodiments of the present application and is not intended to limit the same, but rather, various modifications and variations may be made by those skilled in the art. Any modification, equivalent replacement, improvement, etc. made within the principles of the present application should be included in the protection scope of the present application.

Claims (22)

1. A method of operating a computer, the computer system comprising a first computer and a second computer, the first computer being connected to the second computer, the second computer being a quantum computer in which a target quantum algorithm is deployed, the target quantum algorithm being a quantum algorithm having a function of solving a combinatorial optimization problem, the method being applied to the first computer, the method comprising:
under the condition that the combined optimization problem to be solved is received, calling the second computer to operate a target quantum algorithm by using a catalytic term corresponding to the combined optimization problem, wherein the catalytic term is used for accelerating the evolution speed of the target quantum algorithm;
receiving expected problem parameters returned by the second computer, wherein the expected problem parameters are used for indicating the degree of approaching of an evolution end state and a ground state of a problem item, the evolution end state is obtained by the second computer through the operation of the target quantum algorithm by using the catalytic item, the problem item is used for indicating the combination optimization problem, and the ground state of the problem item is used for indicating the solution of the combination optimization problem;
Adjusting the catalytic item according to the expected problem parameter until the expected problem parameter meets the exit condition of the adjustment process, so as to obtain a target catalytic item;
and extracting a target evolution end state corresponding to the target quantum algorithm executed by adopting the target catalytic item from the second computer to solve the combination optimization problem.
2. The method of claim 1, wherein the step of determining the position of the substrate comprises,
the adjusting the catalytic term according to the desired problem parameter includes:
and adjusting the Hamiltonian amount of the first catalyst currently used by the target quantum algorithm to the Hamiltonian amount of the second catalyst according to the expected problem parameter, wherein the catalysis term comprises: and the Hamiltonian amount of the catalyst of the target quantum algorithm.
3. The method of claim 2, wherein the step of determining the position of the substrate comprises,
the adjusting the hamiltonian amount of the first catalyst currently used by the target quantum algorithm to the hamiltonian amount of the second catalyst according to the expected problem parameter includes:
adjusting a first catalytic coefficient in the first catalyst hamiltonian to a second catalytic coefficient according to the expected problem parameter, wherein the catalytic coefficient of the catalyst hamiltonian of the target quantum algorithm is a superposition coefficient of a berkovickers in a berkovich term of the catalyst hamiltonian;
And sending the second catalytic coefficient to the second computer, wherein the second catalytic coefficient is used for instructing the second computer to construct the second catalyst hamiltonian using the second catalytic coefficient.
4. The method of claim 3, wherein the step of,
the sending the second catalytic coefficient to the second computer includes:
converting the second catalytic coefficient into a target construction instruction, wherein the target construction instruction is used for indicating to adjust interaction among qubits in a quantum system of the second computer so as to construct the second catalyst Hamiltonian amount;
and sending the target construction instruction to the second computer.
5. The method of claim 1, wherein the step of determining the position of the substrate comprises,
the step of adjusting the catalytic item according to the expected problem parameter until the expected problem parameter meets the exit condition of the adjustment process, to obtain a target catalytic item, including:
detecting whether the expected problem parameter meets the exit condition;
determining an adjustment mode of the catalytic item according to the expected problem parameter under the condition that the expected problem parameter does not meet the exit condition;
And adjusting the catalytic item according to the adjustment mode until the expected problem parameter meets the exit condition of the adjustment process, so as to obtain the target catalytic item.
6. The method of claim 5, wherein the step of determining the position of the probe is performed,
the detecting whether the expected problem parameter satisfies the exit condition includes:
detecting a relation between a problem hamiltonian expected value and an adjustment threshold, wherein the expected problem parameter comprises the problem hamiltonian expected value, the problem hamiltonian expected value is an expected value of the problem hamiltonian of the combination optimization problem in the evolution end state, and the problem item comprises the problem hamiltonian;
and under the condition that the expected value of the Hamiltonian amount of the problem is larger than or equal to the adjustment threshold value, determining that the adjustment process does not meet the exit condition.
7. The method of claim 5, wherein the step of determining the position of the probe is performed,
the detecting whether the expected problem parameter satisfies the exit condition includes:
detecting whether a problem hamiltonian expected value converges or not, wherein the expected problem parameter comprises the problem hamiltonian expected value, the problem hamiltonian expected value is an expected value of the problem hamiltonian of the combined optimization problem in the evolution end state, and the problem item comprises the problem hamiltonian;
And under the condition that the expected value of the Hamiltonian amount of the problem is not converged, determining that the adjustment process does not meet the exit condition.
8. The method of claim 7, wherein the step of determining the position of the probe is performed,
the detecting whether the Hamiltonian expected value of the problem converges includes:
detecting whether the problem Hamiltonian expected value is stable or not according to the problem Hamiltonian expected value and a historical problem Hamiltonian expected value, wherein the historical problem Hamiltonian expected value is N problem Hamiltonian expected values received before the problem Hamiltonian expected value is received, and N is a positive integer;
and under the condition that the expected value of the Hamiltonian amount of the problem is unstable, determining that the expected value of the Hamiltonian amount of the problem is not converged.
9. The method of claim 5, wherein the step of determining the position of the probe is performed,
the method for determining the adjustment mode of the catalytic item according to the expected problem parameter comprises one of the following steps:
determining a target gradient of the catalytic term according to the expected problem parameter, wherein the adjustment mode comprises the target gradient;
and determining a target gradient and a target step length of the catalytic item according to the expected problem parameter, wherein the adjustment mode comprises the target gradient and the target step length.
10. The method of claim 9, wherein the step of determining the position of the substrate comprises,
said adjusting said catalytic item in said adjustment manner comprising one of:
when the adjustment mode comprises the target gradient, adjusting the catalytic item by default step length according to the target gradient;
and under the condition that the adjustment mode comprises the target gradient and the target step length, adjusting the catalytic item according to the target gradient.
11. The method of claim 1, wherein the step of determining the position of the substrate comprises,
the receiving the expected problem parameters returned by the second computer comprises the following steps:
and receiving a problem Hamiltonian expected value sent by a quantum measurement device deployed on the second computer, wherein the expected problem parameter comprises the problem Hamiltonian expected value, the problem Hamiltonian expected value is obtained by measuring an expected value of the problem Hamiltonian of the combined optimization problem in the evolution end state by the quantum measurement device, and the problem item comprises the problem Hamiltonian.
12. The method of claim 1, wherein the step of determining the position of the substrate comprises,
before the second computer is called to run the target quantum algorithm by using the catalytic term corresponding to the combination optimization problem, the method further comprises:
Converting the combination optimization problem into the problem item, and constructing an initial item, wherein the initial item is used for providing an initial state for a quantum algorithm;
constructing the catalytic term according to the problem term and the initial term;
constructing the problem item, the initial item and the catalytic item into the target quantum algorithm;
and deploying the target quantum algorithm to the second computer.
13. The method of claim 12, wherein the step of determining the position of the probe is performed,
the converting the combinatorial optimization problem into the problem term includes:
receiving the combined optimization problem sent by a user, wherein the combined optimization problem is a problem of solving an object set which simultaneously satisfies a plurality of constraint conditions from a plurality of objects in a target scene, and the plurality of constraint conditions comprise: constraint conditions for the object and constraint conditions for the association relationship of the object in the target scene;
constructing a topological structure corresponding to the combination optimization problem, wherein vertexes in the topological structure represent each object in the plurality of objects, and edges connected between the vertexes in the topological structure represent association relations of the plurality of objects in the target scene;
Constructing an optimization target of the combination optimization problem by using the topological structure and the constraint conditions, and constructing a quantum system corresponding to the target scene, wherein the quantum system takes each object in the objects as a quantum bit, and interaction among the quantum bits is used for representing the association relation of the objects in the target scene;
and converting the optimization target into the quantum system to obtain the problem Hamiltonian quantity corresponding to the quantum system as the problem item.
14. The method of claim 12, wherein the step of determining the position of the probe is performed,
said constructing said catalytic term from said problem term and said initial term comprising:
constructing a first evolution path function of a problem Hamiltonian quantity and a second evolution path function of an initial Hamiltonian quantity, wherein the problem item comprises the problem Hamiltonian quantity, and the initial item comprises the initial Hamiltonian quantity;
and constructing a catalyst Hamiltonian amount according to the problem Hamiltonian amount, the initial Hamiltonian amount, the first evolution path function and the second evolution path function, and a third evolution path function of the catalyst Hamiltonian amount, wherein the catalysis item comprises the catalyst Hamiltonian amount.
15. The method of claim 14, wherein the step of providing the first information comprises,
the constructing the problem item, the initial item and the catalytic item into the target quantum algorithm comprises the following steps:
the Hamiltonian quantity of the problem, the initial Hamiltonian quantity, the catalyst Hamiltonian quantity, the first evolution path function, the second evolution path function and the third evolution path function are constructed to be time-containing Hamiltonian quantity as the target quantum algorithm, wherein the first evolution path function, the second evolution path function and the third evolution path function are functions from actual evolution time to target evolution time, the first evolution path function is 1 at initial evolution time until reaching the target evolution time and is 0 at initial evolution time, the second evolution path function is 0 at initial evolution time until reaching the target evolution time and is 1, and the third evolution path function is 0 at initial evolution time and at target evolution time.
16. The method of claim 14, wherein the step of providing the first information comprises,
the constructing a catalyst hamiltonian according to the problem hamiltonian, the initial hamiltonian, the first evolution path function and the second evolution path function, includes:
Constructing the problem hamiltonian amount, the initial hamiltonian amount, the first evolution path function and the second evolution path function as reference hamiltonian amounts;
and constructing a target Brilliant term as the catalyst Hamiltonian amount by using the reference Hamiltonian amount, wherein the target Brilliant term is an operation between a superposition coefficient and a Brix operator.
17. The method of claim 16, wherein the step of determining the position of the probe comprises,
the constructing a target bubble-free term using the reference hamiltonian amount as the catalyst hamiltonian amount includes one of:
constructing a two-body Brix term using the reference Hamiltonian amount as the catalyst Hamiltonian amount, wherein the target Brix term comprises a two-body Brix term comprising an operation between a superposition coefficient and two Brix operators;
and constructing a summation operation of a single Brilliant term and a two-body Brilliant term by using the reference Hamiltonian quantity as the catalyst Hamiltonian quantity, wherein the target Brilliant term comprises the summation operation of the single Brilliant term and the two-body Brilliant term, the single Brilliant term comprises an operation between a superposition coefficient and a single Brilliant, and the two-body Brilliant term comprises an operation between the superposition coefficient and two Brilliant.
18. The method of claim 17, wherein the step of determining the position of the probe is performed,
the monomer bubble term is of the following form:
wherein->For the superposition coefficient in said monomer bubble interest,/->For a single Brix in the monomer Brix term, < >>Is the j-th qubit in the quantum system of the second computer +.>A bubble operator of direction, the quantum system comprising M qubits, j being a positive integer greater than or equal to 1 and less than or equal to M;
the two-body bubble term is of the following form:
wherein->For the superposition coefficient in the two-body bubble interest item,>for two Brix operators in the two-body Brix term,/I>Is the j-th qubit in the quantum system of the second computer +.>Bubble sharp operator of direction, ->Is the kth qubit in the quantum system of the second computer +.>A oriented berkovich operator, the quantum system comprising M qubits, j being a positive integer greater than or equal to 1 and less than or equal to M, k being a positive integer greater than or equal to 1 and less than or equal to M, the jth qubit and the kth qubit being different qubits in the quantum system;
the sum operation of the monomer Brix term and the two-body Brix term is as follows:
Wherein->For the superposition coefficient in said monomer bubble interest,/->For a single Brix in the monomer Brix term, < >>Is the j-th qubit in the quantum system of the second computer +.>Bubble sharp operator of direction, ->For the superposition coefficient in the two-body bubble interest item,>for two Brix operators in the two-body Brix term,/I>Quantum system for the second computerThe kth qubit in the system is +.>The quantum system comprises M quantum bits, j is a positive integer greater than or equal to 1 and less than or equal to M, k is a positive integer greater than or equal to 1 and less than or equal to M, and the jth quantum bit and the kth quantum bit are different quantum bits in the quantum system.
19. A computer system, comprising: a first computer and a second computer, wherein,
the first computer has a combinatorial optimization problem to be solved, the second computer is a quantum computer in which a target quantum algorithm is deployed, the target quantum algorithm is a quantum algorithm having a function of solving the combinatorial optimization problem,
the first computer is a first computer according to any one of claims 1 to 18;
The second computer is a second computer according to any one of claims 1 to 18.
20. An operating device of a computer is characterized in that,
the computer system includes a first computer and a second computer, the first computer is connected with the second computer, the second computer is a quantum computer deployed with a target quantum algorithm, the target quantum algorithm is a quantum algorithm with a function of solving a combination optimization problem, the apparatus is applied to the first computer, the apparatus includes:
the calling module is used for calling the second computer to operate a target quantum algorithm by using a catalytic term corresponding to the combination optimization problem under the condition that the combination optimization problem to be solved is received, wherein the catalytic term is used for accelerating the evolution speed of the target quantum algorithm;
the receiving module is used for receiving expected problem parameters returned by the second computer, wherein the expected problem parameters are used for indicating the degree of approach of an evolution end state and a ground state of a problem item, the evolution end state is obtained by the second computer through the operation of the target quantum algorithm by using the catalytic item, the problem item is used for indicating the combination optimization problem, and the ground state of the problem item is used for indicating the solution of the combination optimization problem;
The adjustment module is used for adjusting the catalytic item according to the expected problem parameter until the expected problem parameter meets the exit condition of the adjustment process, so as to obtain a target catalytic item;
and the solving module is used for extracting a target evolution end state corresponding to the target quantum algorithm executed by adopting the target catalytic item from the second computer to solve the combined optimization problem.
21. A computer-readable storage medium comprising,
the computer readable storage medium having stored therein a computer program, wherein the computer program when executed by a processor implements the steps of the method of any of claims 1 to 18.
22. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that,
the steps of the method of any one of claims 1 to 18 are carried out by a processor when executing said computer program.
CN202410134601.5A 2024-01-31 2024-01-31 Method and device for operating computer, computer system and storage medium Active CN117689031B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202410134601.5A CN117689031B (en) 2024-01-31 2024-01-31 Method and device for operating computer, computer system and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202410134601.5A CN117689031B (en) 2024-01-31 2024-01-31 Method and device for operating computer, computer system and storage medium

Publications (2)

Publication Number Publication Date
CN117689031A true CN117689031A (en) 2024-03-12
CN117689031B CN117689031B (en) 2024-04-26

Family

ID=90137437

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202410134601.5A Active CN117689031B (en) 2024-01-31 2024-01-31 Method and device for operating computer, computer system and storage medium

Country Status (1)

Country Link
CN (1) CN117689031B (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20190266213A1 (en) * 2018-02-26 2019-08-29 Microsoft Technology Licensing, Llc Short path quantum procedures for solving combinatorial optimization problems
CN110637310A (en) * 2017-05-15 2019-12-31 谷歌有限责任公司 Operator averaging within a quantum computing system
CN113408733A (en) * 2021-06-29 2021-09-17 腾讯科技(深圳)有限公司 Method, device and equipment for acquiring ground state of quantum system and storage medium
CN115577780A (en) * 2022-04-24 2023-01-06 安徽工业大学 Quantum approximation algorithm for solving constrained optimization problem

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110637310A (en) * 2017-05-15 2019-12-31 谷歌有限责任公司 Operator averaging within a quantum computing system
US20190266213A1 (en) * 2018-02-26 2019-08-29 Microsoft Technology Licensing, Llc Short path quantum procedures for solving combinatorial optimization problems
CN113408733A (en) * 2021-06-29 2021-09-17 腾讯科技(深圳)有限公司 Method, device and equipment for acquiring ground state of quantum system and storage medium
CN115577780A (en) * 2022-04-24 2023-01-06 安徽工业大学 Quantum approximation algorithm for solving constrained optimization problem

Also Published As

Publication number Publication date
CN117689031B (en) 2024-04-26

Similar Documents

Publication Publication Date Title
Yao et al. A novel reinforcement learning algorithm for virtual network embedding
Yu et al. Forecasting of hydrologic time series with ridge regression in feature space
Gu et al. Mean-field controls with Q-learning for cooperative MARL: convergence and complexity analysis
EP3935008A1 (en) Quantum variational method, apparatus, and storage medium for simulating quantum systems
AU2019297413B2 (en) Preparing superpositions of computational basis states on a quantum computer
CN112529201B (en) Entangled quantum state conversion method, device, equipment, storage medium and product
EP4350572A1 (en) Method, apparatus and system for generating neural network model, devices, medium and program product
CN114580647B (en) Quantum system simulation method, computing device, device and storage medium
CN114037084B (en) Quantum measurement equipment calibration method and device, electronic equipment and medium
Hernández-Lobato et al. Designing neural network hardware accelerators with decoupled objective evaluations
CN111343602B (en) Joint layout and task scheduling optimization method based on evolutionary algorithm
Kaushik et al. Performance evaluation of approximated artificial neural network (AANN) algorithm for reliability improvement
Han et al. GeneticKNN: A weighted KNN approach supported by genetic algorithm for photometric redshift estimation of quasars
Niu et al. An adaptive device-edge co-inference framework based on soft actor-critic
CN117689031B (en) Method and device for operating computer, computer system and storage medium
Nayak et al. A pi-sigma higher order neural network for stock index forecasting
Pozulp 1D transport using neural nets, SN, and MC
Dash DECPNN: A hybrid stock predictor model using Differential Evolution and Chebyshev Polynomial neural network
CN113517040B (en) Quantum intrinsic solver implementation method and device and electronic equipment
Zhang et al. Deep reinforcement learning based scheduling strategy for federated learning in sensor-cloud systems
CN105989407A (en) Neural network based short wave median field intensity prediction system, method and device
CA3153323A1 (en) Optimizing reservoir computers for hardware implementation
US20230409667A1 (en) Selection of pauli strings for variational quantum eigensolver
Bhuvana et al. Stopping criteria for MAPLS-AW, a hybrid multi-objective evolutionary algorithm
US11550872B1 (en) Systems and methods for quantum tomography using an ancilla

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant