CN113379058B - Quantum simulation method and device, electronic device and storage medium - Google Patents

Quantum simulation method and device, electronic device and storage medium Download PDF

Info

Publication number
CN113379058B
CN113379058B CN202110637675.7A CN202110637675A CN113379058B CN 113379058 B CN113379058 B CN 113379058B CN 202110637675 A CN202110637675 A CN 202110637675A CN 113379058 B CN113379058 B CN 113379058B
Authority
CN
China
Prior art keywords
quantum
bit
gate
sampling
numbers
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.)
Active
Application number
CN202110637675.7A
Other languages
Chinese (zh)
Other versions
CN113379058A (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.)
Beijing Baidu Netcom Science and Technology Co Ltd
Original Assignee
Beijing Baidu Netcom Science and 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 Beijing Baidu Netcom Science and Technology Co Ltd filed Critical Beijing Baidu Netcom Science and Technology Co Ltd
Priority to CN202110637675.7A priority Critical patent/CN113379058B/en
Publication of CN113379058A publication Critical patent/CN113379058A/en
Application granted granted Critical
Publication of CN113379058B publication Critical patent/CN113379058B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N10/00Quantum computing, i.e. information processing based on quantum-mechanical phenomena

Landscapes

  • Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Mathematical Analysis (AREA)
  • Data Mining & Analysis (AREA)
  • Evolutionary Computation (AREA)
  • Condensed Matter Physics & Semiconductors (AREA)
  • Computational Mathematics (AREA)
  • Mathematical Optimization (AREA)
  • Pure & Applied Mathematics (AREA)
  • Computing Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Mathematical Physics (AREA)
  • Software Systems (AREA)
  • Artificial Intelligence (AREA)
  • Superconductor Devices And Manufacturing Methods Thereof (AREA)

Abstract

The disclosure discloses a quantum simulation method and device, electronic equipment and a storage medium, and relates to the technical field of quantum computing, in particular to the technical field of quantum simulation. The specific implementation scheme is as follows: generating a probability distribution based on a plurality of real numbers; generating a plurality of sampling numbers according to the probability distribution; generating a Hamiltonian according to a plurality of real numbers, and constructing a plurality of quantum channels based on the Hamiltonian and a plurality of sampling numbers; an initial quantum state is generated and a plurality of quantum channels are applied over the initial quantum state to generate a target quantum state. The quantum simulation method and the quantum simulation system can reduce the consumption of quantum resources required by quantum simulation and the construction of a quantum circuit, and are easy to realize on a quantum computer.

Description

Quantum simulation method and device, electronic device and storage medium
Technical Field
The present disclosure relates to the field of quantum computing technologies, and in particular, to the field of quantum simulation technologies.
Background
Devices that do quantum simulation have some noise that can limit the available quantum circuit depth, assist quantum bit, etc. resources. In the related art, the quantum algorithm for quantum simulation can reduce the influence caused by noise, but when a quantum computer runs the quantum algorithm, a large number of auxiliary quantum bits and complex quantum tools are often needed, so that the scale of a quantum circuit is enlarged, and the calculation amount is increased.
Disclosure of Invention
The disclosure provides a quantum simulation method and device, an electronic device and a storage medium.
According to an aspect of the present disclosure, there is provided a quantum simulation method including:
generating a probability distribution based on a plurality of real numbers;
generating a plurality of sampling numbers according to the probability distribution;
generating a Hamiltonian according to a plurality of real numbers, and constructing a plurality of quantum channels based on the Hamiltonian and a plurality of sampling numbers;
an initial quantum state is generated and a plurality of quantum channels are applied over the initial quantum state to generate a target quantum state.
The present disclosure can reduce the consumption of quantum resources and the construction of quantum circuits required for quantum simulation, making it easy to implement on a quantum computer.
According to another aspect of the present disclosure, there is provided a quantum simulation apparatus including:
a first generation module to generate a probability distribution based on a plurality of real numbers;
a second generating module for generating a plurality of sampling numbers according to the probability distribution;
a constructing module, configured to generate a Hamiltonian according to a plurality of real numbers, and construct a plurality of quantum channels based on the Hamiltonian and a plurality of sampling numbers;
and the processing module is used for generating an initial quantum state and applying a plurality of quantum channels to the initial quantum state to generate a target quantum state.
According to another aspect of the present disclosure, there is provided an electronic device comprising at least one processor, and
a memory communicatively coupled to the at least one processor; wherein the content of the first and second substances,
the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the quantum simulation method of the first aspect of the present disclosure.
According to another aspect of the present disclosure, there is provided a non-transitory computer readable storage medium storing computer instructions for causing a computer to perform the quantum simulation method of the first aspect of the present disclosure.
According to another aspect of the present disclosure, there is provided a computer program product comprising a computer program which, when executed by a processor, implements the steps of the quantum simulation method according to an embodiment of the first aspect of the present disclosure.
It should be understood that the statements in this section do not necessarily identify key or critical features of the embodiments of the present disclosure, nor do they limit the scope of the present disclosure. Other features of the present disclosure will become apparent from the following description.
Drawings
The drawings are included to provide a better understanding of the present solution and are not to be construed as limiting the present disclosure. Wherein:
FIG. 1 is a flow diagram of a quantum simulation method according to one embodiment of the present disclosure;
FIG. 2 is a schematic diagram of a quantum simulation method according to one embodiment of the present disclosure;
FIG. 3 is a flow diagram of a quantum simulation method according to another embodiment of the present disclosure;
FIG. 4 is a schematic diagram of a quantum simulation method according to another embodiment of the present disclosure;
FIG. 5 is a flow diagram of a quantum simulation method according to another embodiment of the present disclosure;
FIG. 6 is a block diagram of a quantum simulation device according to one embodiment of the present disclosure;
fig. 7 is a block diagram of an electronic device for implementing the quantum simulation method of an embodiment of the present disclosure.
Detailed Description
Exemplary embodiments of the present disclosure are described below with reference to the accompanying drawings, in which various details of the embodiments of the disclosure are included to assist understanding, and which are to be considered as merely exemplary. Accordingly, those of ordinary skill in the art will recognize that various changes and modifications of the embodiments described herein can be made without departing from the scope and spirit of the present disclosure. Also, descriptions of well-known functions and constructions are omitted in the following description for clarity and conciseness.
The following briefly describes the technical field to which the disclosed solution relates:
quantum computing: the quantum computation is a novel computation mode for regulating and controlling quantum information units to perform computation according to a quantum mechanics law. Compared with the traditional general computer, the theoretical model of the computer is a general turing machine; the theory model of the general quantum computer is a general turing machine which is re-explained by the quantum mechanics law. From the point of view of computability, quantum computers can only solve the problems that can be solved by traditional computers, but from the point of view of computational efficiency, due to the existence of quantum mechanical superposition, certain known quantum algorithms are faster than the traditional general purpose computers in the problem processing speed.
Quantum simulation: quantum simulation is the main objective of the research of quantum computers and is one of its most important applications. The field of quantum computing is currently developing towards the direction of scale and practicality. In such a context, it is of paramount importance to study quantum simulation and implement quantum simulation on recent quantum computers.
Quantum simulation is one of the core applications of quantum computing, and can even solve the problem that the classical computer is difficult to solve. The application fields of quantum simulation are very wide, including but not limited to quantum physics, quantum chemistry, and the like. In addition, quantum simulation can also be used for solving a linear equation set, preparing a Gibbs state and the like. The quantum simulation can simulate the evolution of a micro-world quantum system, so that the quantum simulation method has a good application prospect in the aspects of quantum chemistry, such as the research and development of new drugs, batteries and the like, and can assist in the research and development of new materials or the simulation of the chemical properties of the new materials and the like.
The quantum simulation method and apparatus, the electronic device, and the storage medium provided in the present application are described in detail below with reference to the accompanying drawings.
Fig. 1 is a flow chart of a quantum simulation method according to one embodiment of the present disclosure, as shown in fig. 1, the method comprising the steps of:
s101, probability distribution is generated based on a plurality of real numbers.
Probability distribution refers to a probability law used to express the value of a random variable. The probability of an event indicates the degree of probability that a result of quantum simulation will occur. To fully understand the quantum computation results, it is necessary to know all possible results of the quantum simulation and the probability of occurrence of each possible result, i.e., the probability distribution. In the embodiment of the application, a problem to be solved is firstly obtained, and L real numbers h larger than 0 are obtained according to the problemlWherein i is greater than or equal to 1 and less than or equal to L, and L is a positive integer greater than 1. For example, the problem to be solved may be a chemical problem, a physical problem, or the like.
Obtaining L real numbers h larger than 0lAfter based on hlAnd the sum of all real numbers greater than 0, a probability distribution is generated. Alternatively, the probability distribution may be expressed using the following formula:
Figure GDA0003460779960000041
wherein the content of the first and second substances,
Figure GDA0003460779960000042
representing a normalization constant. Optionally, every hlDetermining each h by taking the ratio of the sum of all real numbers greater than 0lThe corresponding probability value. On a per h basislCorresponding probability values, a probability distribution P is generated.
S102, generating a plurality of sampling numbers according to the probability distribution.
To improve the accuracy of the quantum simulation, the candidate data and the probability distribution may be combined for sampling. That is, based on a plurality of probability values in the generated probability distribution, a plurality of samples are taken in the candidate data such as {1, 2, …, L } to sample a plurality of integers from the candidate data, for example, N samples may be taken to obtain N integers, which may be denoted as L1,l2,...,lN
S103, a Hamiltonian is generated according to a plurality of real numbers, and a plurality of quantum channels are constructed based on the Hamiltonian and a plurality of sampling numbers.
The Hamiltonian is a physical word and is an operator describing the total energy of the system. In the embodiment of the present disclosure, a hamiltonian is generated based on the real number and the kurley matrix, and a process of generating the hamiltonian is further described as follows: and carrying out tensor product operation on the bubble-ridge matrixes in each matrix set in the matrix sets to obtain tensor products of the bubble-ridge matrixes, multiplying the real numbers by the tensor products of the bubble-ridge matrixes for each real number in the real numbers to obtain a bubble-ridge operator corresponding to the real number, and finally generating the Hamiltonian based on all the bubble-ridge operators.
Alternatively, in some implementations, all of the bubble operators may be summed to generate a Hamiltonian, that is, the input Hamiltonian is in the form of a combination of bubble operators. Then the generation of the hamiltonian from the constructed real numbers of the probability distribution can be expressed as:
Figure GDA0003460779960000043
wherein H is Hamiltonian, HlHlAs the first Pally operator, HlIs the tensor product of the ith pauli matrix, L being an integer greater than 0 and less than L.
Randomly selecting an initial quantum channel
Figure GDA0003460779960000044
Further, based on probability distribution and Hamiltonian, quantum circuit unit is constructed, and unitary operator A of quantum channel is generated1Determining the unitary operator A of each quantum channel1Then, based on each unitary operator A1Generating a corresponding quantum channel:
Figure GDA0003460779960000045
and S104, generating an initial quantum state, and applying a plurality of quantum channels to the initial quantum state to generate a target quantum state.
A quantum state refers to an oscillating energy level at which a particle (e.g., an electron) bound to another particle (such as an atom) is confined to be discrete (i.e., quantized). In the dirac symbol (also known as the left-right vector symbol), these states are designated as |0>, |1>, |2>, |3>, etc., where |0> corresponds to the lowest energy level known as the ground state.
Obtaining initial quantum state
Figure GDA0003460779960000051
Wherein, |00>And<00| respectively represent pure states in different directions,
Figure GDA0003460779960000052
is a tensor product, an algorithm for matrices. Preparation of pure state |00 at auxiliary register anc>Preparing quantum state rho on work register workwork(ii) a Will be provided with
Figure GDA0003460779960000053
Applied to the initial quantum state sigma to output the target quantum state
Figure GDA0003460779960000054
Wherein, trancIndicating that the ancillary qubits are deskewed.
In the implementation, a plurality of quantum channels are cascaded, the initial quantum state is input into the first quantum channel, and the initial quantum state is processed step by step through the plurality of quantum channels to generate the target quantum state.
FIG. 2 is a schematic diagram of a quantum simulation, as shown in FIG. 2, of an initial quantum state, namely pure state |00 prepared from auxiliary registers anc1, anc2, according to one embodiment of the present disclosure>And preparing quantum state rho on the working registerworkThrough quantum channels
Figure GDA0003460779960000055
Then, quantum state is output
Figure GDA0003460779960000056
From a statistical point of view, due to random sampling, the expectation of the output quantum state approximates the ideal quantum state μ (ρ). Can be expressed by the following formula:
Figure GDA0003460779960000057
wherein E represents expectation. That is, the initial quantum state σ, after evolution of a plurality of quantum channels, exactly approximates the ideal quantum state μ (ρ) in the portion of the working register. Thus, the scheme provides for the random selection of quantum channels
Figure GDA0003460779960000058
The ideal quantum channel mu is simulated.
The quantum simulation method provided by the embodiment of the disclosure generates probability distribution based on a plurality of real numbers, generates a plurality of sampling numbers according to the probability distribution, generates a Hamiltonian according to the plurality of real numbers, constructs a plurality of quantum channels based on the Hamiltonian and the plurality of sampling numbers, generates an initial quantum state, and applies the plurality of quantum channels to the initial quantum state to generate a target quantum state. The construction of a plurality of quantum channels can be realized through the Hamiltonian quantity and a plurality of sampling numbers, and the consumption of quantum resources required by quantum simulation and construction of a quantum circuit is reduced, so that the construction is easy to realize on a quantum computer.
To adapt to a quantum computer and reduce the operation cost, the quantum simulation method of the embodiments of the present disclosure is further explained below.
Fig. 3 is a flowchart of a quantum simulation method according to another embodiment of the present disclosure, and as shown in fig. 3, on the basis of the above embodiment, a plurality of quantum channels are constructed based on a hamiltonian and a plurality of sampling numbers, and the method further includes the following steps:
s301, obtaining a probability value in probability distribution corresponding to any sampling number, and obtaining a real number corresponding to the probability value.
As for the description of step S301, it can be seen from the related contents of the above embodiments that, since the sampling number is generated by the probability value corresponding to the real number, similarly, the probability value in the probability distribution corresponding to the sampling number can be obtained according to the sampling number, and then the real number corresponding to the probability value is obtained.
In some implementations, the number of samples is L, and the probability value in its corresponding probability distribution is hLA/Λ is obtained from the probability value, and the real number corresponding to the sampling number is hL
S302, determining a bubble-sharp operator corresponding to any sampling number from the Hamiltonian according to the real number corresponding to the probability value, and forming a two-quantum-bit controlled gate and a single-bit rotating gate of any quantum channel based on the bubble-sharp operator corresponding to any sampling number.
Optionally, a real number hlThe corresponding Pally operator is hlHlAnd then according to the Paglie operator corresponding to any sampling number, a two-quantum-bit controlled gate and a single-bit rotating gate of any quantum channel are formed.
Alternatively, in some implementations, the two-qubit controlled gate may be a controlled pauli gate. FIG. 4 is a schematic diagram of a quantum channel, shown in FIG. 4, with a controlled gate V, according to one embodiment of the present disclosure1=-iHlWherein i is an imaginary number. The controlled form of the quantum channel can be decomposed into a controlled pauli gate, which is also a two-qubit gate. For example, suppose
Figure GDA0003460779960000061
The controlled door is then:
Figure GDA0003460779960000062
wherein X, Y are different Pally operators, and I is a 1-bit identity matrix.
And S303, forming a quantum circuit unit corresponding to any quantum channel by the single-bit rotating gate and the two-quantum-bit controlled gate.
The quantum circuit unit is composed of controlled gates. In some implementations, the quantum circuit cell includes a first single-bit spin gate, a second single-bit spin gate, and a third single-bit spin gate, and a two-qubit controlled gate, wherein the third single-bit spin gate is configured to counter-rotate an output of the second single-bit spin gate, and the two-qubit controlled gate is configured to control the first single-bit spin gate and the second single-bit spin gate.
Optionally, the input ends of the first single-bit revolving gate and the second single-bit revolving gate are respectively connected to the two auxiliary registers in the initial quantum state, the input end of the second single-bit revolving gate is further connected to the output end of the first single-bit revolving gate, the input ends of the two quantum-bit controlled gates are respectively connected to the working register in the initial quantum state and the output end of the second single-bit revolving gate, and the input end of the third single-bit revolving gate is connected to the output end of the second single-bit revolving gate.
S304, constructing a unitary operator of any quantum channel based on the quantum circuit unit, and constructing any quantum channel based on the unitary operator of any quantum channel.
As shown in fig. 4, in some implementations, there is one unitary operator a for each quantum channel1Wherein the unitary operator A1The expression of (a) is:
A1=-W1RW1 +RW1
wherein
Figure GDA0003460779960000071
Wherein, W1Being quantum circuit cells, W1 +Is W1Inverse ofA sub-circuit unit, R is a universal single-bit revolving gate applicable to all quantum channels, Z is a universal Pagli matrix applicable to all quantum channels, I is a unit matrix of 1 bit, InIs an n-bit identity matrix.
In the embodiment of the disclosure, each quantum channel corresponds to a unitary operator, and the quantum simulation aims to realize the unitary operator through a quantum circuit, so that the corresponding quantum channel can be constructed based on the obtained unitary operator of the quantum channel.
In some implementations, a sampling order of the plurality of samples may be obtained, and a concatenation order of the plurality of quantum channels may be determined based on the sampling order, that is, for each of the plurality of quantum channels, a connection order thereof is determined by a sampling order of the corresponding samples of the quantum channels.
According to the quantum simulation method provided by the embodiment of the disclosure, when quantum simulation is performed, the quantum circuit unit comprises the single-quantum-bit gate and the two-quantum-bit controlled gate, and only two auxiliary quantum bits are used, so that the cost for constructing the quantum circuit can be reduced, and the quantum simulation can be realized by using a simple quantum circuit.
In order to improve the accuracy of quantum simulation, the controlled gate needs to satisfy certain constraint conditions. Fig. 5 is a flowchart of a quantum simulation method according to another embodiment of the present disclosure, and as shown in fig. 5, the quantum simulation method is further described on the basis of the above embodiment:
s501, for each quantum channel of the multiple quantum channels, generating constraints of a first single-bit rotation gate and a second single-bit rotation gate based on the evolution time and the initial quantum state of the quantum channel.
Determining a constraint parameter based on the evolution time and the sum of a plurality of real numbers
Figure GDA0003460779960000072
In the embodiment of the application, N may be large enough to improve the accuracy.
Continuing with FIG. 4, a first constraint of a first single-bit passgate is determined based on an initial quantum state and constraint parameters in a first auxiliary register coupled to the first single-bit passgate:
Figure GDA0003460779960000073
determining a second constraint for the second single-bit passgate based on the initial quantum state and the constraint parameter in a second auxiliary register coupled to the second single-bit passgate:
Figure GDA0003460779960000081
and S502, controlling the first single-bit revolving door and the second single-bit revolving door to meet constraint conditions.
After the first single-bit revolving door and the second single-bit revolving door are controlled to meet the constraint condition, when the given precision belongs to the E>0,N≤C(Λt)2/. epsilon, where C is a fixed constant, the target quantum state tr of the outputancN(σ)) has a trace distance from the ideal quantum state μ (ρ) of less than e.
In the disclosed embodiments, for each quantum channel of a plurality of quantum channels, constraints for a first single-bit spin gate and a second single-bit spin gate are generated based on an evolution time and an initial quantum state of the quantum channel; and controlling the first single-bit revolving gate and the second single-bit revolving gate to meet constraint conditions so as to improve the precision of quantum simulation and enable the trace distance between the target quantum state and the ideal quantum state to be within a required error range.
Fig. 6 is a block diagram of a quantum analog device according to an embodiment of the present disclosure, and as shown in fig. 6, the quantum analog device 600 includes:
a first generating module 610 for generating a probability distribution based on a plurality of real numbers;
a second generating module 620, configured to generate a plurality of sampling numbers according to the probability distribution;
a constructing module 630, configured to generate a hamiltonian from a plurality of real numbers and construct a plurality of quantum channels based on the hamiltonian and a plurality of sample numbers;
a processing module 640 for generating an initial quantum state and applying a plurality of quantum channels onto the initial quantum state to generate a target quantum state.
The quantum simulation method provided by the embodiment of the disclosure generates probability distribution based on a plurality of real numbers, generates a plurality of sampling numbers according to the probability distribution, generates a Hamiltonian according to the plurality of real numbers, constructs a plurality of quantum channels based on the Hamiltonian and the plurality of sampling numbers, generates an initial quantum state, and applies the plurality of quantum channels to the initial quantum state to generate a target quantum state. The construction of a plurality of quantum channels can be realized through the Hamiltonian quantity and a plurality of sampling numbers, and the consumption of quantum resources required by quantum simulation and construction of a quantum circuit is reduced, so that the construction is easy to realize on a quantum computer.
It should be noted that the foregoing explanation of the quantum simulation method embodiment is also applicable to the quantum simulation apparatus of this embodiment, and details are not repeated here.
Further, in a possible implementation manner of the embodiment of the present disclosure, the second generating module 620 is further configured to: obtaining an integer sequence; the integer sequence is sampled according to a probability distribution to generate a plurality of sample numbers.
Further, in a possible implementation manner of the embodiment of the present disclosure, the module is further configured to: carrying out tensor product operation on the pauli matrixes in each matrix set to obtain tensor products of the pauli matrixes; multiplying the real number by the tensor product of the Paglie matrix for each real number in the plurality of real numbers to obtain a Paglie operator corresponding to the real number; based on all the Powerh operators, a Hamiltonian is generated.
Further, in a possible implementation manner of the embodiment of the present disclosure, the constructing module 630 is further configured to: acquiring a probability value in probability distribution corresponding to any sampling number, and acquiring a real number corresponding to the probability value; determining a bubble-sharp operator corresponding to any sampling number from the Hamiltonian according to the real number corresponding to the probability value, and forming a two-quantum-bit controlled gate and a single-bit revolving gate of any quantum channel based on the bubble-sharp operator corresponding to any sampling number; a single-bit revolving gate and two quantum bit controlled gates form a quantum circuit unit corresponding to any quantum channel; and constructing a unitary operator of any quantum channel based on the quantum circuit unit, and constructing any quantum channel based on the unitary operator of any quantum channel.
Further, in a possible implementation manner of the embodiment of the present disclosure, each quantum channel corresponds to one unitary operator a1Wherein the unitary operator A1Is expressed as A1=-W1RW1 +RW1Wherein
Figure GDA0003460779960000091
Wherein, W1Being quantum circuit cells, W1 +Is W1R is a universal single-bit rotary gate applicable to all quantum channels, Z is a universal Pagli matrix applicable to all quantum channels, I is a unit matrix of 1 bitnIs an n-bit identity matrix.
Further, in a possible implementation manner of the embodiment of the present disclosure, the quantum circuit unit includes a first single-bit rotation gate, a second single-bit rotation gate, a third single-bit rotation gate, and a two-qubit controlled gate, where the third single-bit rotation gate is used to perform inverse rotation on an output of the second single-bit rotation gate, and the two-qubit controlled gate is used to control the first single-bit rotation gate and the second single-bit rotation gate.
Further, in a possible implementation manner of the embodiment of the present disclosure, input ends of the first single-bit revolving gate and the second single-bit revolving gate are respectively connected to the two auxiliary registers in the initial quantum state, an input end of the second single-bit revolving gate is further connected to an output end of the first single-bit revolving gate, input ends of the two qubit controlled gates are respectively connected to the working register in the initial quantum state and an output end of the second single-bit revolving gate, and an input end of the third single-bit revolving gate is connected to an output end of the second single-bit revolving gate.
Further, in a possible implementation manner of the embodiment of the present disclosure, the processing module 640 is further configured to: generating constraints for a first single-bit spin gate and a second single-bit spin gate for each quantum channel of a plurality of quantum channels based on an evolution time and an initial quantum state of the quantum channel; and controlling the first single-bit revolving door and the second single-bit revolving door to meet the constraint condition.
Further, in a possible implementation manner of the embodiment of the present disclosure, the processing module 640 is further configured to: determining a constraint parameter according to the evolution time and the sum of the plurality of real numbers; determining a first constraint condition for the first single-bit passgate based on the initial quantum state and a constraint parameter in a first auxiliary register coupled to the first single-bit passgate; a second constraint of the second single-bit passgate is determined based on the initial quantum state and the constraint parameter in a second auxiliary register coupled to the second single-bit passgate.
Further, in a possible implementation manner of the embodiment of the present disclosure, the constructing module 630 is further configured to: a sampling order of the plurality of sample numbers is obtained, and a cascade order of the plurality of quantum channels is determined based on the sampling order.
Further, in a possible implementation manner of the embodiment of the present disclosure, the two-qubit controlled gate is a controlled pauli gate.
The present disclosure also provides an electronic device, a readable storage medium, and a computer program product according to embodiments of the present disclosure.
FIG. 7 illustrates a schematic block diagram of an example electronic device 700 that can be used to implement embodiments of the present disclosure. Electronic devices are intended to represent various forms of digital computers, such as laptops, desktops, workstations, personal digital assistants, servers, blade servers, mainframes, and other appropriate computers. The electronic device may also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions, are meant to be examples only, and are not meant to limit implementations of the disclosure described and/or claimed herein.
As shown in fig. 7, the device 700 comprises a computing unit 701, which may perform various suitable actions and processes according to a computer program stored in a Read Only Memory (ROM)702 or a computer program loaded from a storage unit 708 into a Random Access Memory (RAM) 703. In the RAM 703, various programs and data required for the operation of the device 700 can also be stored. The computing unit 701, the ROM 702, and the RAM 703 are connected to each other by a bus 704. An input/output (I/O) interface 705 is also connected to bus 704.
Various components in the device 700 are connected to the I/O interface 705, including: an input unit 706 such as a keyboard, a mouse, or the like; an output unit 707 such as various types of displays, speakers, and the like; a storage unit 708 such as a magnetic disk, optical disk, or the like; and a communication unit 709 such as a network card, modem, wireless communication transceiver, etc. The communication unit 709 allows the device 700 to exchange information/data with other devices via a computer network, such as the internet, and/or various telecommunication networks.
Computing unit 701 may be a variety of general purpose and/or special purpose processing components with processing and computing capabilities. Some examples of the computing unit 701 include, but are not limited to, a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), various specialized Artificial Intelligence (AI) computing chips, various computing units running machine learning model algorithms, a Digital Signal Processor (DSP), and any suitable processor, controller, microcontroller, and so forth. The computing unit 701 performs the various methods and processes described above, such as a quantum simulation method. For example, in some embodiments, the quantum simulation method may be implemented as a computer software program tangibly embodied in a machine-readable medium, such as storage unit 708. In some embodiments, part or all of a computer program may be loaded onto and/or installed onto device 700 via ROM 702 and/or communications unit 709. When the computer program is loaded into RAM 703 and executed by computing unit 701, one or more steps of the quantum simulation method described above may be performed. Alternatively, in other embodiments, the computing unit 701 may be configured to perform the quantum simulation method by any other suitable means (e.g., by means of firmware).
Various implementations of the systems and techniques described here above may be implemented in digital electronic circuitry, integrated circuitry, Field Programmable Gate Arrays (FPGAs), Application Specific Integrated Circuits (ASICs), Application Specific Standard Products (ASSPs), system on a chip (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and/or combinations thereof. These various embodiments may include: implemented in one or more computer programs that are executable and/or interpretable on a programmable system including at least one programmable processor, which may be special or general purpose, receiving data and instructions from, and transmitting data and instructions to, a storage system, at least one input device, and at least one output device.
Program code for implementing the methods of the present disclosure may be written in any combination of one or more programming languages. These program codes may be provided to a processor or controller of a general purpose computer, special purpose computer, or other programmable data processing apparatus, such that the program codes, when executed by the processor or controller, cause the functions/operations specified in the flowchart and/or block diagram to be performed. The program code may execute entirely on the machine, partly on the machine, as a stand-alone software package partly on the machine and partly on a remote machine or entirely on the remote machine or server.
In the context of this disclosure, a machine-readable medium may be a tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
To provide for interaction with a user, the systems and techniques described here can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to a user; and a keyboard and a pointing device (e.g., a mouse or a trackball) by which a user can provide input to the computer. Other kinds of devices may also be used to provide for interaction with a user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form, including acoustic, speech, or tactile input.
The systems and techniques described here can be implemented in a computing system that includes a back-end component (e.g., as a data server), or that includes a middleware component (e.g., an application server), or that includes a front-end component (e.g., a user computer having a graphical user interface or a web browser through which a user can interact with an implementation of the systems and techniques described here), or any combination of such back-end, middleware, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: local Area Networks (LANs), Wide Area Networks (WANs), and the Internet.
The computer system may include clients and servers. A client and server are generally remote from each other and typically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other. According to an embodiment of the present disclosure, there is also provided a computer program product comprising a computer program which, when executed by a processor, implements a quantum simulation method according to an embodiment of the present disclosure.
It should be understood that various forms of the flows shown above may be used, with steps reordered, added, or deleted. For example, the steps described in the present disclosure may be executed in parallel, sequentially, or in different orders, as long as the desired results of the technical solutions disclosed in the present disclosure can be achieved, and the present disclosure is not limited herein.
The above detailed description should not be construed as limiting the scope of the disclosure. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions may be made in accordance with design requirements and other factors. Any modification, equivalent replacement, and improvement made within the spirit and principle of the present disclosure should be included in the scope of protection of the present disclosure.

Claims (22)

1. A quantum simulation method, comprising:
generating a probability distribution based on a plurality of real numbers;
generating a plurality of sampling numbers according to the probability distribution;
generating a Hamiltonian from the plurality of real numbers and constructing a plurality of quantum channels based on the Hamiltonian and the plurality of sample numbers, comprising:
acquiring a probability value in probability distribution corresponding to any sampling number, and acquiring a real number corresponding to the probability value;
determining a bubble-sharp operator corresponding to any sampling number from the Hamiltonian according to a real number corresponding to the probability value, and forming a two-quantum-bit controlled gate and a single-bit rotating gate of any quantum channel based on the bubble-sharp operator corresponding to any sampling number;
the single-bit revolving gate and the two-quantum-bit controlled gate form a quantum circuit unit corresponding to any quantum channel;
constructing a unitary operator of any quantum channel based on the quantum circuit unit, and constructing any quantum channel based on the unitary operator of any quantum channel;
an initial quantum state is generated and the plurality of quantum channels are applied over the initial quantum state to generate a target quantum state.
2. The method of claim 1, wherein the generating a plurality of sample numbers from the probability distribution comprises:
obtaining an integer sequence;
sampling the integer sequence according to the probability distribution to generate the plurality of sampling numbers.
3. The method of claim 1, wherein the generating a Hamiltonian from the plurality of real numbers comprises:
carrying out tensor product operation on the pauli matrixes in each matrix set to obtain tensor products of the pauli matrixes;
for each real number in the plurality of real numbers, multiplying the real number by a tensor product of the Pally matrix to obtain a Pally operator corresponding to the real number;
generating the Hamiltonian based on all of the Pockel operators.
4. The method of claim 1, wherein each of the quantum channels corresponds to a unitary operator a1Wherein the unitary operator A1Is expressed as A1=-W1RW1 +RW1Wherein
Figure FDA0003460779950000021
Wherein, W1Is a quantum circuit unit, the W1 +Is the said W1R is a common single-bit revolving gate applicable to all quantum channels, Z is a common pauli matrix applicable to all quantum channels, I is a unit matrix of 1 bit, InIs an n-bit identity matrix.
5. The method of claim 1, wherein the quantum circuit unit comprises a first single-bit spin gate, a second single-bit spin gate, and a third single-bit spin gate, wherein the third single-bit spin gate is used to counter-spin an output of the second single-bit spin gate, and a two-qubit controlled gate, wherein the two-qubit controlled gate is used to control the first single-bit spin gate and the second single-bit spin gate.
6. The method of claim 5, wherein the inputs of the first and second single-bit rotation gates are connected to the two auxiliary registers of the initial quantum state, respectively, the input of the second single-bit rotation gate is further connected to the output of the first single-bit rotation gate, the inputs of the two qubit controlled gates are connected to the working register of the initial quantum state and the output of the second single-bit rotation gate, respectively, and the input of the third single-bit rotation gate is connected to the output of the second single-bit rotation gate.
7. The method of claim 5 or 6, wherein the method further comprises:
generating constraints for the first single-bit spin gate and the second single-bit spin gate based on the evolution time of the quantum channel and the initial quantum state for each of the plurality of quantum channels;
controlling the first single-bit turnstile and the second single-bit turnstile to satisfy the constraint condition.
8. The method of claim 7, wherein the generating constraints for the first and second single-bit spin gates based on the evolution time of the quantum channel and the initial quantum state comprises:
determining a constraint parameter according to the evolution time and the sum of the plurality of real numbers;
determining a first constraint condition for the first single-bit passgate based on an initial quantum state in a first auxiliary register coupled to the first single-bit passgate and the constraint parameter;
determining a second constraint for the second single-bit passgate based on the initial quantum state in a second auxiliary register coupled to the second single-bit passgate and the constraint parameter.
9. The method of claim 1, wherein the method further comprises: and acquiring the sampling sequence of the plurality of sampling numbers, and determining the cascade sequence of the plurality of quantum channels based on the sampling sequence.
10. The method of any of claims 1-6 or 9, wherein the two qubit controlled gate is a controlled pauli gate.
11. A quantum simulation apparatus comprising:
a first generation module to generate a probability distribution based on a plurality of real numbers;
a second generating module, configured to generate a plurality of sampling numbers according to the probability distribution;
a constructing module, configured to generate a hamiltonian from the plurality of real numbers, and construct a plurality of quantum channels based on the hamiltonian and the plurality of sample numbers;
the construction module is further configured to:
acquiring a probability value in probability distribution corresponding to any sampling number, and acquiring a real number corresponding to the probability value;
determining a bubble-sharp operator corresponding to any sampling number from the Hamiltonian according to a real number corresponding to the probability value, and forming a two-quantum-bit controlled gate and a single-bit rotating gate of any quantum channel based on the bubble-sharp operator corresponding to any sampling number;
the single-bit revolving gate and the two-quantum-bit controlled gate form a quantum circuit unit corresponding to any quantum channel;
constructing a unitary operator of any quantum channel based on the quantum circuit unit, and constructing any quantum channel based on the unitary operator of any quantum channel;
a processing module to generate an initial quantum state and to apply the plurality of quantum channels onto the initial quantum state to generate a target quantum state.
12. The apparatus of claim 11, wherein the second generating means is further configured to:
obtaining an integer sequence;
sampling the integer sequence according to the probability distribution to generate the plurality of sampling numbers.
13. The apparatus of claim 11, wherein the configuration module is further configured to:
carrying out tensor product operation on the pauli matrixes in each matrix set to obtain tensor products of the pauli matrixes;
for each real number in the plurality of real numbers, multiplying the real number by a tensor product of the Pally matrix to obtain a Pally operator corresponding to the real number;
generating the Hamiltonian based on all of the Pockel operators.
14. The apparatus of claim 11, wherein each of the quantum channels corresponds to a unitary operator a1Wherein the unitary operator A1Is expressed as A1=-W1RW1 +RW1Wherein
Figure FDA0003460779950000041
Wherein, W1Is a quantum circuit unit, the W1 +Is the said W1R is a common single-bit rotary gate applicable to all quantum channels, Z is a common pauli matrix applicable to all quantum channels, and I is a unit moment of 1 bitArray, InIs an n-bit identity matrix.
15. The apparatus of claim 11, wherein the quantum circuit unit comprises a first single-bit spin gate, a second single-bit spin gate, and a third single-bit spin gate, wherein the third single-bit spin gate is configured to counter-rotate an output of the second single-bit spin gate, and a two-qubit controlled gate configured to control the first single-bit spin gate and the second single-bit spin gate.
16. The apparatus of claim 15, wherein the inputs of the first and second single-bit rotation gates are connected to the two auxiliary registers of the initial quantum state, respectively, the input of the second single-bit rotation gate is further connected to the output of the first single-bit rotation gate, the inputs of the two qubit controlled gates are connected to the working register of the initial quantum state and the output of the second single-bit rotation gate, respectively, and the input of the third single-bit rotation gate is connected to the output of the second single-bit rotation gate.
17. The apparatus of claim 15 or 16, wherein the processing module is further configured to:
generating constraints for the first single-bit spin gate and the second single-bit spin gate based on the evolution time of the quantum channel and the initial quantum state for each of the plurality of quantum channels;
controlling the first single-bit turnstile and the second single-bit turnstile to satisfy the constraint condition.
18. The apparatus of claim 17, wherein the processing module is further configured to:
determining a constraint parameter according to the evolution time and the sum of the plurality of real numbers;
determining a first constraint condition for the first single-bit passgate based on an initial quantum state in a first auxiliary register coupled to the first single-bit passgate and the constraint parameter;
determining a second constraint for the second single-bit passgate based on the initial quantum state in a second auxiliary register coupled to the second single-bit passgate and the constraint parameter.
19. The apparatus of claim 11, wherein the configuration module is further configured to: and acquiring the sampling sequence of the plurality of sampling numbers, and determining the cascade sequence of the plurality of quantum channels based on the sampling sequence.
20. The apparatus of any of claims 11-16 or 19, wherein the two qubit controlled gate is a controlled pauli gate.
21. An electronic device, comprising:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein the content of the first and second substances,
the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the method of any one of claims 1-10.
22. A non-transitory computer readable storage medium having stored thereon computer instructions for causing the computer to perform the method of any one of claims 1-10.
CN202110637675.7A 2021-06-08 2021-06-08 Quantum simulation method and device, electronic device and storage medium Active CN113379058B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110637675.7A CN113379058B (en) 2021-06-08 2021-06-08 Quantum simulation method and device, electronic device and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110637675.7A CN113379058B (en) 2021-06-08 2021-06-08 Quantum simulation method and device, electronic device and storage medium

Publications (2)

Publication Number Publication Date
CN113379058A CN113379058A (en) 2021-09-10
CN113379058B true CN113379058B (en) 2022-04-01

Family

ID=77576465

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110637675.7A Active CN113379058B (en) 2021-06-08 2021-06-08 Quantum simulation method and device, electronic device and storage medium

Country Status (1)

Country Link
CN (1) CN113379058B (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113807525B (en) * 2021-09-22 2022-05-27 北京百度网讯科技有限公司 Quantum circuit operation method and device, electronic device and medium
CN115983391A (en) * 2022-02-07 2023-04-18 上海图灵智算量子科技有限公司 Graph attention machine mechanism realization device based on quantum circuit
CN114580647B (en) * 2022-02-24 2023-08-01 北京百度网讯科技有限公司 Quantum system simulation method, computing device, device and storage medium
CN116245187A (en) * 2022-12-27 2023-06-09 北京百度网讯科技有限公司 Quantum simulation method, device, equipment and storage medium
CN116187456A (en) * 2022-12-27 2023-05-30 北京百度网讯科技有限公司 Quantum simulation method, device, equipment and storage medium

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2019078907A1 (en) * 2017-10-18 2019-04-25 Google Llc Simulation of quantum circuits
CN110224763B (en) * 2019-06-28 2022-02-15 中南大学 Novel quantum state transfer method based on Hamiltonian learning
CN112561068B (en) * 2020-12-10 2021-09-07 北京百度网讯科技有限公司 Simulation method, computing device, classical device, storage device and product

Also Published As

Publication number Publication date
CN113379058A (en) 2021-09-10

Similar Documents

Publication Publication Date Title
CN113379058B (en) Quantum simulation method and device, electronic device and storage medium
CN114580647B (en) Quantum system simulation method, computing device, device and storage medium
CN113496285A (en) Data processing method and device based on quantum circuit, electronic device and medium
CN113807525B (en) Quantum circuit operation method and device, electronic device and medium
CN114492814B (en) Method, device and medium for calculating energy of simulation target system based on quanta
CN114841352B (en) Quantum computing processing method and device and electronic equipment
US20230054391A1 (en) Calibration of quantum measurement device
CN113705793B (en) Decision variable determination method and device, electronic equipment and medium
CN115345309A (en) Method and device for determining system characteristic information, electronic equipment and medium
CN114492815B (en) Method, device and medium for calculating target system energy based on quantum chemistry
CN113902118B (en) Quantum measurement equipment calibration method and device, electronic equipment and medium
CN114528996A (en) Method, device and medium for determining initial parameters of target system test state
CN114580648A (en) Method and device for eliminating generalized amplitude damping noise, electronic equipment and medium
CN113098802B (en) Inverse mapping decomposition method and device for quantum noise channel, electronic device, and medium
CN114512194B (en) Method and device for acquiring target system test state in quantum chemistry simulation
CN114580649A (en) Method and device for eliminating quantum Pagli noise, electronic equipment and medium
CN114512193A (en) Method for preparing system test state based on spin symmetry and equivalent particle characteristics
CN114519429A (en) Method, apparatus and medium for obtaining observability of target system
CN116362341B (en) Quantum device unitary transformation degree determining method and device, electronic device and medium
CN114897175B (en) Noise elimination method and device of quantum measurement equipment, electronic equipment and medium
CN114462614B (en) Quantum noise intensity determination method and device, electronic equipment and medium
CN114997407B (en) Noise elimination method and device of quantum measurement equipment, electronic equipment and medium
CN115329971B (en) Method and device for eliminating amplitude damping noise, electronic equipment and medium
CN116739099B (en) Quantum state fidelity determination method and device, electronic equipment and medium
WO2022249785A1 (en) Solution-finding device, solution-finding method, and program

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