CN114580645A  Simulation method, device and equipment for random quantum measurement and storage medium  Google Patents
Simulation method, device and equipment for random quantum measurement and storage medium Download PDFInfo
 Publication number
 CN114580645A CN114580645A CN202210185621.6A CN202210185621A CN114580645A CN 114580645 A CN114580645 A CN 114580645A CN 202210185621 A CN202210185621 A CN 202210185621A CN 114580645 A CN114580645 A CN 114580645A
 Authority
 CN
 China
 Prior art keywords
 measurement
 quantum
 target
 total
 mode
 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
Links
 238000005259 measurement Methods 0.000 title claims abstract description 692
 238000000034 method Methods 0.000 title claims abstract description 62
 238000003860 storage Methods 0.000 title claims abstract description 16
 238000004088 simulation Methods 0.000 title abstract description 62
 239000002096 quantum dot Substances 0.000 claims abstract description 105
 238000004590 computer program Methods 0.000 claims description 11
 238000009826 distribution Methods 0.000 claims description 7
 238000006243 chemical reaction Methods 0.000 claims description 6
 238000012545 processing Methods 0.000 abstract description 12
 238000005070 sampling Methods 0.000 description 30
 230000008569 process Effects 0.000 description 15
 238000010586 diagram Methods 0.000 description 11
 238000013519 translation Methods 0.000 description 11
 238000004364 calculation method Methods 0.000 description 10
 238000005457 optimization Methods 0.000 description 9
 238000004891 communication Methods 0.000 description 8
 238000012937 correction Methods 0.000 description 8
 238000007781 preprocessing Methods 0.000 description 7
 238000012163 sequencing technique Methods 0.000 description 7
 238000004422 calculation algorithm Methods 0.000 description 6
 238000005516 engineering process Methods 0.000 description 4
 230000006870 function Effects 0.000 description 3
 238000012986 modification Methods 0.000 description 3
 230000004048 modification Effects 0.000 description 3
 230000003287 optical effect Effects 0.000 description 3
 238000012360 testing method Methods 0.000 description 3
 230000009286 beneficial effect Effects 0.000 description 2
 238000002474 experimental method Methods 0.000 description 2
 230000003993 interaction Effects 0.000 description 2
 238000012805 postprocessing Methods 0.000 description 2
 238000012827 research and development Methods 0.000 description 2
 238000003491 array Methods 0.000 description 1
 238000013473 artificial intelligence Methods 0.000 description 1
 230000001413 cellular effect Effects 0.000 description 1
 230000008859 change Effects 0.000 description 1
 238000010276 construction Methods 0.000 description 1
 230000001351 cycling effect Effects 0.000 description 1
 238000013461 design Methods 0.000 description 1
 238000011161 development Methods 0.000 description 1
 230000000694 effects Effects 0.000 description 1
 238000000605 extraction Methods 0.000 description 1
 230000006872 improvement Effects 0.000 description 1
 239000004973 liquid crystal related substance Substances 0.000 description 1
 238000010801 machine learning Methods 0.000 description 1
 239000013307 optical fiber Substances 0.000 description 1
 239000004065 semiconductor Substances 0.000 description 1
 230000001953 sensory effect Effects 0.000 description 1
 238000007619 statistical method Methods 0.000 description 1
 238000006467 substitution reaction Methods 0.000 description 1
 238000009827 uniform distribution Methods 0.000 description 1
 230000000007 visual effect Effects 0.000 description 1
 238000005303 weighing Methods 0.000 description 1
Images
Classifications

 G—PHYSICS
 G06—COMPUTING; CALCULATING OR COUNTING
 G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
 G06N10/00—Quantum computing, i.e. information processing based on quantummechanical 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)
 Tests Of Electronic Circuits (AREA)
Abstract
The disclosure provides a simulation method, a simulation device, a simulation equipment and a storage medium for random quantum measurement, which relate to the field of data processing, in particular to the field of quantum computation. The specific implementation scheme is as follows: determining target measurement operation of a quantum bit to be measured indicated by current random quantum measurement, wherein the quantum bit to be measured is a quantum bit in a target quantum circuit; the target quantum circuit at least comprises a quantum gate operation part and a measurement operation part; determining a target node corresponding to a quantum bit to be measured in an output node of a total measurement mode equivalent to a target quantum circuit; under the condition that the target measurement operation of the quantum bit to be measured is different from the preset measurement operation indicated by the current measurement instruction corresponding to the target node in the total measurement mode, adjusting the current measurement instruction corresponding to the target node in the total measurement mode; and (5) simulating the adjusted total measurement mode to obtain the measurement result required by the current random quantum measurement. Thus, the simulation efficiency is improved.
Description
Technical Field
The present disclosure relates to the field of data processing technology, and more particularly, to the field of quantum computing.
Background
Quantum computing can bring significant advantages in computational efficiency for many problems. However, since quantum hardware is still in the early stage of development, many theoretical operations (e.g., quantum operations of multiple quantum bits) are difficult to implement experimentally. Therefore, how to complete the calculation task or estimate the quantum state property through the simplest operation is an important issue. Numerous documents have shown that by randomly sampling a given quantum state, e.g. by performing a random quantum measurement on the given quantum state and performing some classical data processing on the measurement results, various properties of the given quantum state can be estimated efficiently or the required calculations can be performed.
Disclosure of Invention
The present disclosure provides a simulation method, apparatus, device and storage medium for random quantum measurement.
According to an aspect of the present disclosure, there is provided a method of simulating random quantum measurement, including:
determining target measurement operation of a quantum bit to be measured indicated by current random quantum measurement, wherein the quantum bit to be measured is a quantum bit in a target quantum circuit; the target quantum circuit at least comprises a quantum gate operation part and a measurement operation part, wherein the quantum gate operation part at least represents a quantum gate required for carrying out analog evolution on the target quantum circuit; the measurement operation part at least represents measurement operation required for quantum measurement of the quantum bit in the target quantum circuit after analog evolution;
determining a target node corresponding to the quantum bit to be measured in an output node of a total measurement mode equivalent to the target quantum circuit; wherein the total measurement mode is equivalent to the target quantum circuit and meets the requirement of a 1WQC model;
under the condition that the indicated target measurement operation of the qubit to be measured is different from the preset measurement operation indicated by the current measurement instruction corresponding to the target node in the total measurement mode, adjusting the current measurement instruction corresponding to the target node in the total measurement mode;
and (5) simulating the adjusted total measurement mode to obtain the measurement result required by the current random quantum measurement.
According to another aspect of the present disclosure, there is provided an analog device of random quantum measurement, including:
the measurement operation determining unit is used for determining the target measurement operation of the quantum bit to be measured indicated by the current random quantum measurement, wherein the quantum bit to be measured is the quantum bit in the target quantum circuit; the target quantum circuit at least comprises a quantum gate operation part and a measurement operation part, wherein the quantum gate operation part at least represents a quantum gate required for carrying out analog evolution on the target quantum circuit; the measurement operation part at least represents the measurement operation required by quantum measurement on the quantum bit in the target quantum circuit after analog evolution;
a node determining unit, configured to determine, in an output node of a total measurement mode equivalent to the target quantum circuit, a target node corresponding to the qubit to be measured; wherein the total measurement mode is equivalent to the target quantum circuit and meets the requirement of a 1WQC model;
an adjusting unit, configured to adjust a current measurement instruction corresponding to the target node in the total measurement mode when the indicated target measurement operation of the qubit to be measured is different from a preset measurement operation indicated by the current measurement instruction corresponding to the target node in the total measurement mode;
and the operation unit is used for simulating the adjusted total measurement mode to obtain the measurement result required by the current random quantum measurement.
According to still another aspect of the present disclosure, there is provided an electronic device including:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein,
the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the method described above.
According to yet another aspect of the present disclosure, there is provided a nontransitory computer readable storage medium having stored thereon computer instructions for causing the computer to perform the method described above.
According to yet another aspect of the disclosure, a computer program product is provided, comprising a computer program which, when executed by a processor, implements the method described above.
Therefore, the quantum circuit simulation method and the quantum circuit simulation device can reduce the waiting time of quantum circuit simulation and improve the simulation efficiency.
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 first schematic diagram of a quantum circuit according to an embodiment of the disclosure;
FIG. 2 is a second schematic diagram of a quantum circuit according to an embodiment of the disclosure;
FIG. 3 is a schematic diagram of measurement patterns that meet the requirements of the 1WQC model according to an embodiment of the present disclosure;
FIG. 4 is a schematic flow chart illustrating an implementation of a simulation method for random quantum measurement according to an embodiment of the present disclosure;
FIG. 5 is a schematic diagram of a quantum simulation directly translating a complete quantum circuit according to an embodiment of the present disclosure;
FIG. 6 is a schematic diagram of a simulation method of random quantum measurement in a specific example, according to an embodiment of the disclosure;
FIG. 7 is a schematic diagram of a target quantum circuit in a specific example of a simulation method of random quantum measurement according to an embodiment of the disclosure;
FIG. 8 is a schematic diagram of a structure of an analog device for random quantum measurement according to an embodiment of the present disclosure;
FIG. 9 is a block diagram of an electronic device for implementing an analog method of random quantum measurement according to an embodiment of the 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 disclosure. Also, descriptions of wellknown functions and constructions are omitted in the following description for clarity and conciseness.
Different from a common sampling mode, the quantum random sampling technology needs to perform a large number of random quantum measurements on the quantum states which are subjected to evolution, and each random quantum measurement needs to use different quantum measurement operations (the scheme of the disclosure is called as measurement operations for short). For example, as shown in fig. 1, the quantum circuit includes three qubits, the initial quantum states of the three qubits are all zero states, the three qubits correspond to three qubits (i.e., qubits), and the qubit 0, the qubit 1, and the qubit 2 can be respectively marked; each small square in the last column represents a quantum measurement operation performed on the corresponding qubit. The quantum measurement operation of the last column of each quantum random sampling will be different.
Thus, although the random sampling technique reduces the requirement of physical experiment operation, it increases the difficulty of classical simulation, for example, the measurement modes (i.e. measurement operations) used for each random quantum measurement are different, that is, each random sampling changes the structure of the quantum circuit to be simulated, that is, each random sampling process needs to randomly generate a set of measurement operations (i.e. each time the measurement operation of the last column shown in fig. 1 needs to be changed), and when the quantum measurement operation in the last column changes, the whole quantum circuit changes; the changed quantum circuit (i.e. a new quantum circuit) is further operated, a measurement result is obtained, and statistical analysis can be performed on the measurement result after the operation is repeated for multiple times, obviously, the mode of reoperating the changed quantum circuit for multiple times has low efficiency; moreover, if trying to store the evolved quantum states and then perform random quantum measurement, it is difficult to simulate a quantum circuit with a scale of 30 qubits due to the limitation of the classical computer memory, and thus the simulation difficulty is increased by the conventional random sampling technique.
Based on this, this scheme of this disclosure provides the simulation scheme of the random quantum measurement more convenient in operation, can promote more highefficient, more economic to the classic simulation efficiency of random sampling skill by a wide margin.
Here, before the detailed description of the present disclosure, the basic concepts of the quantum circuit model and the oneway quantum computer (1 WQC) model will be briefly described.
Firstly, a quantum circuit model and a quantum circuit diagram; specifically, the method comprises the following steps:
the quantum circuit model is a commonly used quantum computation simulation mode, namely, the evolution of a quantum state is completed by carrying out quantum gate operation on an initial quantum state, and finally, the evolved quantum state is extracted through measurement operation, namely, a measurement result is obtained. The quantum circuit represents the whole process of simulation calculation and simulation result extraction of the quantum circuit model.
For example, as shown in fig. 2, one qubit is represented by one horizontal line for three qubits; and numbering the qubits according to a preset rule, for example, from top to bottom, which are qubit 0, qubit 1 and qubit 2, respectively. In the simulation process, the quantum circuit is read from left to right, the leftmost end represents the initial quantum state of each qubit, usually the initial quantum state of each qubit is a zero state, then the quantum gate operation as shown in fig. 2 is sequentially performed on the initial quantum state to complete the evolution of the initial quantum state, and finally, the measurement operation is performed to obtain the measurement result (also called a simulation result).
It can be understood that, in the actual measurement operation, that is, the last column may perform the quantum measurement operation only on the qubits that need to be measured, and does not need to perform the quantum measurement operation on all the qubits, which is not limited in the present disclosure.
It is to be understood that performing a quantum measurement operation on a qubit is equivalent to performing a quantum measurement operation on a qubit that is in the qubit.
Secondly, 1WQC model and measurement mode; specifically, the method comprises the following steps:
the 1WQC mode is another quantum computation simulation mode different from a quantum circuit model. The core idea of the 1WQC model is that when a part of qubits in a quantum entangled state (corresponding to a quantum system) is measured, the remaining qubits that are not measured can realize the evolution of the quantum state, and any desired evolution of the remaining qubits can be realized by controlling the measurement mode.
According to the scheme, the quantum circuit shown in FIG. 2 can be converted into a total measurement mode which meets the requirement of a 1WQC model and is equivalent to the quantum circuit; the operation of the total measurement mode equivalent to the quantum circuit shown in fig. 2 is equivalent to the evolution of the quantum system including three qubits based on the quantum circuit shown in fig. 2, so that the quantum circuit is replaced by the total measurement mode to complete the quantum computation simulation.
Here, as shown in fig. 3, the total measurement mode equivalent to the quantum circuit that satisfies the requirement of the 1WQC model, or the measurement mode equivalent to the quantum gate in the quantum circuit, mainly includes four parts, which are: computation space, input nodes, output nodes, and computation instructions, namely:
the total measurement mode (or measurement mode) P is (computation space S, input node I, output node O, computation instruction C).
Wherein the computation space characterizes a node set of all nodes involved by the current total measurement mode (which may be referred to as measurement mode for quantum gate); the input nodes represent a node set of nodes in an initial quantum state, the output nodes represent a node set of nodes in an output quantum state or a final measurement result, and the calculation instruction is an ordered set formed by the following four basic instructions (preset instructions, namely an entanglement instruction, a measurement instruction, a correction instruction X and a correction instruction Z); for example, when the instructions are executed, the basic instructions in the calculation instructions are read based on a preset instruction reading rule (e.g., from left to right), and the preset instruction reading rule provides that the basic instructions are sorted in the following order, namely, from left to right, the entanglement instructions are arranged in the first order, the measurement instructions are arranged in the second order, the correction instructions X are arranged in the third order, and the correction instructions Z are arranged in the fourth order.
It should be noted that the node described above is a node under the 1WQC model, and the node can further represent a qubit under the 1WQC model. It should be noted that the qubits in the quantum circuit do not have a onetoone correspondence with the nodes under the 1WQC model, or the qubits in the weighing subcircuit are not equivalent to the nodes under the 1WQC model, in other words, the nodes in the total measurement mode equivalent to the quantum circuit do not have a onetoone correspondence with the qubits in the quantum circuit. Moreover, the number of nodes under the 1WQC model, that is, the number of qubits under the 1WQC model, is not necessarily the same as the number of qubits in the quantum circuit.
Specifically, the nodes in the total measurement mode meeting the requirements of the 1WQC model are mapped to the 1WQC model based on preset rules and based on information such as quantum gate parameters, positions and the like of quantum gates in quantum circuits.
Here, the storage and execution modes of the four basic instructions described above can be seen in the following table. As given in the table below.
For example, for a Hadamard gate in a given quantum circuit, i.e.The measurement mode that meets the requirements of the 1WQC model can be specifically expressed as:
H→
(S＝{1,2}，I＝{1}，O＝{2}，C＝ [[E,[1,2]],[M,1,0,XY,[],[]],[X,2,[1]]])
i.e. the measurement mode H of the Hgate involves two nodes, respectively node 1 and 2, where node 1 is the input node and the initial quantum state can be assumed to be Node 2 is the output node; executing an instruction C from left to right, specifically, firstly executing an entanglement instruction, namely acting a control Z gate on a quantum bit corresponding to the node 1 and a quantum bit corresponding to the node 2; here, in practical application, if not specifically stated, at this time, the quantum states of the qubits corresponding to the nodes in the calculation instruction are all initial quantum states, that is, zero states; secondly, executing a measurement instruction, namely measuring the qubit on the node 1, wherein the measurement angle is 0, the measurement plane is an XY plane, and the domain _ s and the domain _ t are null; finally, a correction instruction X is executed, i.e. if the measurement result of node 1 is 1, then the pauli X gate is applied to the qubit on node 2, otherwise, the pauli X gate is not applied. Thus, after the above computation instruction, the output quantum state at node 2 is equivalent to the state of the qubit at node 1 after acting on the Hadamard gate, i.e., the state
It can be understood that, in practical applications, each quantum gate in the quantum circuit can be converted into an equivalent measurement mode with the quantum gate, and when two or more quantum gates exist in the quantum circuit, each quantum gate can be converted into an equivalent measurement mode to obtain two or more measurement modes, and then the two or more measurement modes are combined and sequenced to obtain a total measurement mode of the quantum circuit.
The scheme of the disclosure converts a target quantum circuit into an equivalent total measurement mode meeting the requirements of the 1WQC model based on the 1WQC model, so as to simulate a quantum computation process; on one hand, the waiting time for circuit simulation is effectively reduced, the simulation efficiency is improved, on the other hand, the scale of a quantum circuit algorithm capable of being simulated can be enhanced, and the method is more beneficial to related technology research and development and application.
Specifically, as shown in fig. 4, the simulation method of random quantum measurement according to the present disclosure includes:
step S401: determining target measurement operation of a quantum bit to be measured indicated by current random quantum measurement, wherein the quantum bit to be measured is a quantum bit in a target quantum circuit; the target quantum circuit at least comprises a quantum gate operation part and a measurement operation part, wherein the quantum gate operation part at least represents a quantum gate required for carrying out analog evolution on the target quantum circuit; the measurement operation part at least represents the measurement operation required for quantum measurement of the quantum bit in the target quantum circuit after analog evolution.
For example, the quantum circuit shown in FIG. 2 includes three qubits; meanwhile, based on the circuit structure, the quantum circuit is divided into two parts, one part is a quantum gate operation part which cannot be changed in each random quantum measurement, the other part is a measurement operation part which can be changed in each random quantum measurement, and the current random quantum measurement indicates the target measurement operation corresponding to the quantum bit to be measured in the measurement operation part, namely indicates the target measurement operation corresponding to the last column of the quantum bit to be measured, such as the target measurement operation corresponding to the quantum bit 0. Thus, a foundation is laid for avoiding the need of translating the whole quantum circuit every time of random quantum measurement.
Step S402: determining a target node corresponding to the quantum bit to be measured in an output node of a total measurement mode equivalent to the target quantum circuit; and the total measurement mode is equivalent to the target quantum circuit and meets the requirement of a 1WQC model.
Here, the overall measurement mode has the expression form as shown in fig. 3, including a computation space S, an input node I, an output node O, and a computation instruction C; for the specific form of the total measurement mode, reference may be made to the above contents, and details are not described here.
Step S403: and under the condition that the indicated target measurement operation of the qubit to be measured is different from the preset measurement operation indicated by the current measurement instruction corresponding to the target node in the total measurement mode, adjusting the current measurement instruction corresponding to the target node in the total measurement mode.
That is to say, if the target measurement operation of the qubit to be measured indicated by the current random quantum measurement is different from the preset measurement operation indicated by the current measurement instruction corresponding to the target node in the total measurement mode, the current measurement instruction corresponding to the target node in the total measurement mode needs to be adjusted, where the target node is a node in the output node and is a node corresponding to the qubit to be measured in the 1WQC model, and thus, the requirement of the current random quantum measurement can be met by finetuning the total measurement mode, the step of translating the whole quantum circuit during each random quantum measurement is effectively avoided, and support is provided for improving simulation efficiency.
Step S404: and (5) simulating the adjusted total measurement mode to obtain the measurement result required by the current random quantum measurement.
Therefore, the whole target quantum circuit is not required to be translated or converted into the equivalent total measurement mode by random quantum measurement at each time, the current measurement requirement can be completed only by finely adjusting the specific measurement instruction in the total measurement mode, the waiting time of circuit simulation is effectively reduced, and the simulation efficiency is further improved.
In a specific example of the present disclosure, the determining, in the current random quantum measurement process, a target measurement operation of a qubit (that is, a qubit to be measured) that needs to be measured may be based on the following manner, that is, the determining the target measurement operation of the qubit to be measured indicated by the current random quantum measurement described above specifically includes: randomly generating a Pauli measurement operation based on a preset probability distribution; obtaining a target measurement operation of a quantum bit to be measured in a target quantum circuit indicated by current random quantum measurement based on a randomly generated Pally measurement operation, wherein the target measurement operation is one of the following Pay measurement operations: pauli X measurement, pauli Y measurement, pauli Z measurement. For example, a set of pauli measurement operations is randomly generated based on a preset probability distribution, and a target measurement operation corresponding to each qubit to be measured is determined based on the generated set of pauli measurement operations, so as to complete quantum random sampling.
Therefore, the scheme of the disclosure provides a feasible scheme of quantum random sampling, and can realize random sampling on the basis of effectively avoiding the situation that the whole quantum circuit needs to be translated and the simulation efficiency needs to be improved during each random quantum measurement, so that technical support is provided for effectively estimating various properties of the designated quantum state or completing the required calculation.
In a specific example of the present disclosure, the adjusting the current measurement instruction corresponding to the target node in the total measurement mode specifically includes: and adjusting the current measurement instruction corresponding to the target node in the total measurement mode based on the target measurement instruction equivalent to the target measurement operation and the difference information between the current measurement instruction corresponding to the target node in the total measurement mode. That is to say, based on the difference between the currently required target measurement operation and the test operation indicated by the measurement instruction in the total measurement mode, the measurement instruction in the total measurement mode is adjusted, so as to meet the current random measurement requirement, the method is simple and feasible, and the adjustment process requires less time than retranslating the whole target quantum circuit, so that the waiting time of circuit simulation is effectively reduced, and the simulation efficiency is further effectively improved.
In a specific example of the present disclosure, the following method may be adopted to implement the adjustment, specifically, the adjusting the current measurement instruction corresponding to the target node in the total measurement mode specifically includes: adjusting one of the following information in a current measurement instruction corresponding to the target node in the total measurement mode: measuring a plane, measuring a dependency relationship and measuring an angle.
For example, the measurement instruction in the total measurement mode is expressed as [ M, while _ qubit, angle, plane, domain _ s, domain _ t ]. Wherein the which _ qubit is used to indicate one node; the node corresponds to a quantum bit under the 1WQC model; angle represents a real number, namely a preset value; the plane is used to indicate a measurement plane (e.g., XY, YZ, etc.); domain is used to indicate two types of nodes related to the node indicated by which _ qubit, e.g., characterized using domain _ s and domain _ t, respectively; the measurement instruction indicates that the measurement operation on the plane indicated by the plane is carried out on the quantum bit corresponding to the node indicated by the which _ qubit, wherein the measurement angle is determined based on angle, domain _ s and domain _ t.
At this time, the measurement plane can be adjusted by adjusting the plane in the above expression; adjusting the measurement dependency relationship by adjusting the order of two types of nodes indicated by domain in the expression, for example, domain _ s is {1,2}, and domain _ t is {3,4}, where after swapping, domain _ s is changed to {3,4} domain _ t is {1,2 }; and adjusting the measurement angle by adjusting the measurement results of the two types of nodes indicated by the domain in the expression mode and the value of the angle.
Here, in an example, based on a target measurement instruction equivalent to the target measurement operation, and difference information between a current measurement instruction corresponding to the target node in the total measurement mode, one of the following information in the current measurement instruction corresponding to the target node in the total measurement mode may be adjusted: measuring a plane, measuring a dependency relationship and measuring an angle, so that the measurement operation indicated by the measurement instruction corresponding to the adjusted target node is the target measurement operation, namely the requirement of the current random quantum measurement is met.
Therefore, the scheme provides a specific adjusting scheme, the adjusting mode is simple and feasible, and compared with the time required for retranslating the whole target quantum circuit, the time consumed by the adjusting process is short, so that the waiting time of circuit simulation is effectively reduced, and the simulation efficiency is effectively improved.
In a specific example of the present disclosure, the specific adjustment may be implemented by using the following manner, that is, the adjusting the current measurement instruction corresponding to the target node in the total measurement mode specifically includes: the adjustment is based on at least one of:
and under the condition that the target measurement operation is a Paly X measurement operation and the current measurement instruction corresponding to the target node in the total measurement mode indicates a Pay Z measurement operation, adjusting a measurement plane in the current measurement instruction corresponding to the target node in the total measurement mode to be an XY plane, and exchanging relevant information of two types of nodes associated with the target node in the current measurement instruction corresponding to the target node in the total measurement mode.
For example, continue to express the measurement instruction in the global measurement mode as [ M, while _ qubit, angle, plane, domain _ s, domain _ t]For example, in this case, the measurement operation (i.e., the target measurement operation) corresponding to the qubit i (i.e., the qubit to be measured) indicated by the current random quantum measurement is the pauli X measurement operation, and the node o in the total measurement mode is the node o_{i}(i.e., the node corresponding to the qubit i, i.e., the target node) indicates a pauli Z measurement operation, the node o in the total measurement pattern P equivalent to the target quantum circuit is updated_{i}(i.e., the node corresponding to qubit i, i.e., the target node), i.e., node o_{i}The measurement plane in the corresponding measurement order is updated to XY, and at the same time, the switching node o_{i}Domain _ s and domain _ t in the corresponding measurement command; in particular, node o in the total measurement pattern P is assigned_{i}Corresponding measurement instruction [ M, o ]_{i},0,YZ,s,t]Replacement by [ M, o_{i},0,XY,t,s]Thus, the adjustment is completed.
And under the condition that the target measurement operation is a Paly Y measurement operation and the current measurement instruction corresponding to the target node in the total measurement mode indicates a Pay Z measurement operation, adjusting a measurement plane in the current measurement instruction corresponding to the target node in the total measurement mode to be an XY plane, updating a measurement angle in the current measurement instruction corresponding to the target node in the total measurement mode to be pi/2, and exchanging relevant information of two types of nodes associated with the target node in the current measurement instruction corresponding to the target node in the total measurement mode.
For example, the measurement operation corresponding to the qubit i (i.e. the qubit to be measured) indicated in the current random quantum measurement is the Pally Y measurement, while the node o in the total measurement mode_{i}(i.e., the node corresponding to the qubit i, i.e., the target node) indicates a pauli Z measurement operation, the node o in the total measurement pattern P equivalent to the target quantum circuit is updated_{i}Corresponding measurement instructions, i.e. node o_{i}Updating the measurement plane in the corresponding measurement command to XY, and simultaneously, updating the node o_{i}The measurement angle in the corresponding measurement command is updated to pi/2, and meanwhile, the switching node o_{i}The values of domain _ s and domain _ t in the corresponding measurement command; in particular, node o in the total measurement pattern P is assigned_{i}Corresponding measurement instruction [ M, o_{i},0,YZ,s,t]Replacement by [ M, o_{i}Pi/2, XY, t, s, thus, completing the adjustment.
Therefore, the scheme provides a specific adjusting scheme, the adjusting mode is simple and feasible, and compared with the time required for retranslating the whole target quantum circuit, the time consumed by the adjusting process is short, so that the waiting time of circuit simulation is effectively reduced, and the simulation efficiency is effectively improved.
In a specific example of the disclosure, the total measurement mode may also be obtained by converting a quantum gate operation part in the target quantum circuit into a first measurement mode meeting the requirement of a 1WQC model; converting a measurement operation part in the target quantum circuit into a second measurement mode meeting the requirement of a 1WQC model, wherein a measurement instruction corresponding to an output node in the second measurement mode indicates a preset measurement operation; that is to say, the measurement operation part in the target quantum circuit is initially set as the preset measurement operation, so that a foundation is laid for avoiding the need of translating the whole quantum circuit in each followup random quantum measurement, and a foundation is laid for improving the simulation efficiency. And then obtaining a total measurement mode equivalent to the target quantum circuit based on the first measurement mode and the second measurement mode.
Therefore, the quantum gate operation part and the measurement operation part in the target quantum circuit are translated respectively and translated into equivalent measurement modes, and the equivalent measurement modes are combined to obtain the total test mode of the target quantum circuit, so that the foundation is laid for avoiding the fact that the whole quantum circuit needs to be translated in each time of random quantum measurement in the followup process, and meanwhile, the foundation is laid for improving the simulation efficiency.
In a specific example of the present disclosure, the conversion of the quantum circuit into the measurement mode may be performed in the following manner, specifically, the abovementioned conversion of the quantum gate operation part in the target quantum circuit into the first measurement mode meeting the requirement of the 1WQC model includes:
under the condition that at least two quantum gates exist in the target quantum gate circuit, generating a submeasurement mode which is equivalent to the quantum gates in the target quantum gate circuit and meets the requirement of a 1WQC model on the basis of quantum gate parameters of the quantum gates in the target quantum gate circuit;
and obtaining a first measurement mode equivalent to the quantum gate operation part of the target quantum gate circuit based on the equivalent submeasurement modes of the quantum gates in the target quantum gate circuit, for example, combining and sequencing optimization of the submeasurement modes. Here, it can be understood that after the submeasurement modes corresponding to the quantum gates are combined, basic instructions, such as an entanglement instruction, a measurement instruction, a correction instruction X, and a correction instruction Z, need to be sorted based on the requirement of the 1WQC model, that is, a preset instruction reading rule, and then the sorted total measurement mode is used as the total measurement mode equivalent to the target quantum circuit. Here, since the overall structure of the total measurement pattern obtained by the above translation and sorting is not affected by the random measurement part (only the specific instruction content affecting the specific measurement instruction), the total measurement pattern obtained in the above step is used as a reference for subsequent processing (i.e., adjustment).
Therefore, a foundation is laid for avoiding the need of translating the whole quantum circuit in each followup random quantum measurement, and a foundation is laid for improving the simulation efficiency.
In a specific example of the scheme of the present disclosure, in a case that the indicated target measurement operation of the qubit to be measured is the same as a preset measurement operation indicated by a current measurement instruction corresponding to the target node in the total measurement mode, the total measurement mode is simulated to run, and a measurement result required by current random quantum measurement is obtained. Therefore, a feasible scheme for effectively realizing random sampling is provided, the waiting time of circuit simulation can be effectively reduced, and the simulation efficiency is improved. Thereby providing technical support for effectively estimating various properties of the specified quantum state or completing the required calculation.
Thus, the scheme of the disclosure converts the target quantum circuit into the equivalent total measurement mode meeting the requirements of the 1WQC model based on the 1WQC model, and thus, simulates the quantum computation process; on one hand, the waiting time for circuit simulation is effectively reduced, the simulation efficiency is improved, on the other hand, the scale of a quantum circuit algorithm capable of being simulated can be enhanced, and the method is more beneficial to related technology research and development and application.
The following describes the present disclosure in further detail with reference to specific examples, and specifically, the present example represents the target quantum circuit as an equivalent total measurement mode satisfying the requirement of the 1WQC model, and performs simulation operation based on the equivalent total test model of the target quantum circuit, so as to accelerate the simulation computation process of the target quantum circuit including random measurement operation.
Specifically, as shown in fig. 5, for the current random quantum measurement, a group of measurement operations is randomly generated, that is, a measurement operation part (that is, a quantum measurement operation part) is obtained, and the quantum gate operation part is a target quantum circuit of the current random quantum measurement, and the whole target quantum circuit is translated into an equivalent total measurement mode in the 1WQC model, and a simulation operation is performed to obtain a measurement result (that is, a sampling result). Thus, a plurality of sampling results can be obtained by cycling the steps.
Here, since different random quantum measurements are performed by different quantum measurement operations, which results in different target quantum circuits corresponding to different random quantum measurements, that is, different measurement operation portions in the target quantum circuits, a large amount of time is inevitably consumed if the entire target quantum circuit is translated into the total measurement mode in the 1WQC model based on the manner shown in fig. 5 in each random quantum measurement. Therefore, the scheme of the disclosure adjusts the mode as shown in fig. 5 based on the structure of the target quantum circuit, namely, the target quantum circuit is divided into a measurement operation part which changes every time quantum random sampling and a quantum gate operation part which does not change every time quantum random sampling; based on this, the translation process of the target quantum circuit can be divided into two steps, as shown in fig. 6, which are:
a preprocessing step, namely performing preprocessing such as translation, sequencing optimization and the like on a quantum gate operation part in a target quantum circuit; meanwhile, after a measurement operation part in the target quantum circuit is initialized to be a preset measurement operation, preprocessing such as translation and sequencing optimization is carried out; for example, the quantum measurement operation corresponding to each qubit (also referred to as qubit) in the measurement operation section in the target quantum circuit is set as the pauli Z measurement operation, and translation, ordering optimization, and the like are performed, so that the target quantum circuit is translated into a total measurement mode satisfying the requirements of the 1WQC model.
And a postprocessing step, namely, finely adjusting a measurement operation part in a total measurement mode equivalent to the target quantum circuit according to the target measurement operation of the quantum bit to be measured indicated by the current random quantum measurement, so as to ensure that the measurement instruction in the adjusted total measurement mode is matched with the currently required random quantum measurement. That is to say, under the condition that the preprocessing step obtains the total measurement mode equivalent to the target quantum circuit, based on a group of quantum measurement operations generated randomly at present, the measurement instruction in the total measurement mode equivalent to the target quantum circuit is adjusted, so that the adjusted total measurement mode meets the requirement of the current random quantum measurement.
And finally, executing a total measurement mode obtained after the postprocessing step based on a preset simulation algorithm to obtain a sampling result, namely a measurement result.
Therefore, the simulation efficiency of the target quantum circuit comprising the random quantum measurement is improved, and the application scene of the scheme is enlarged; moreover, the structure of the target quantum circuit is fully utilized, the thought of stepbystep processing is provided, the translation time for translating the target quantum circuit into the equivalent total measurement mode in the random sampling process is reduced to the maximum extent, namely after the total measurement mode is obtained in the preprocessing step, the measurement instruction corresponding to the measurement operation part in the total measurement mode is only required to be subjected to local fine adjustment in subsequent random quantum sampling, then the simulation is carried out, and the whole target quantum circuit does not need to be translated repeatedly, so that the translation efficiency is improved, and further the simulation efficiency is improved.
Specifically, as shown in fig. 6, the specific steps of the simulation method for random quantum measurement in this example include:
step 601: pretreating; namely, translating and sequencing optimization are carried out on a quantum gate operation part in the target quantum circuit; meanwhile, after a measurement operation part in the target quantum circuit is initialized to be a preset measurement operation, translation and sequencing optimization are carried out, and a total measurement mode equivalent to the target quantum circuit is obtained.
Specifically, after acquiring the quantum gate operation part in the target quantum circuit, it is assumed that the fundamental measurement, that is, the pauli Z measurement operation, is performed on all the qubits, that is, it is assumed that the measurement operation corresponding to the measurement operation part is the pauli Z measurement operation, and then the target quantum circuit of the measurement operation corresponding to the measurement operation part is translated to obtain the equivalent total measurement mode.
Here, in practical application, after the total measurement mode equivalent to the target quantum circuit is obtained through translation, the basic instructions (such as an entanglement instruction, a measurement instruction, and a correction instruction) in the total measurement mode obtained through translation may be subjected to sequencing optimization based on a preset instruction reading rule so as to meet the requirement of the 1WQC model, and the total measurement mode after sequencing optimization is used as the total measurement mode of subsequent simulation.
In this way, since the overall structure of the total measurement pattern obtained by the above translation and sorting optimization is not affected by the random measurement part (only the specific instruction content affecting the specific measurement instruction), the total measurement pattern obtained in the above steps is used as a reference for the subsequent processing.
Step 602: posttreatment; namely, according to the target measurement operation of the quantum bit to be measured indicated by the current random quantum measurement, the measurement operation part in the total measurement mode equivalent to the target quantum circuit is finely adjusted, so as to ensure that the measurement instruction in the adjusted total measurement mode is matched with the current required random quantum measurement. That is, on the basis that the total measurement mode equivalent to the target quantum circuit is obtained in the preprocessing step, the measurement instruction in the total measurement mode equivalent to the target quantum circuit is adjusted based on a group of quantum measurement operations generated randomly at present, so that the adjusted total measurement mode meets the requirement of the current random quantum measurement.
Here, the total measurement pattern obtained in the preprocessing step may be denoted as P, and at this time, the measurement instruction in the total measurement pattern may be adjusted based on, specifically,
for the qubit i, searching the node label with the first element of the label i in the output node set in the total measurement mode P, that is, determining the node corresponding to the qubit i in the target quantum circuit in the output nodes of the total measurement mode equivalent to the target quantum circuit, that is, the node o_{i}I.e. the qubit i in the target quantum circuit (i.e. the qubit corresponding to the qubit i), and the node o in the output node of the total measurement mode equivalent to the target quantum circuit_{i}And (7) corresponding.
Under the condition that the measurement operation corresponding to the qubit i indicated by the current random quantum measurement is the Paly X measurement operation, updating the node o in the total measurement mode P equivalent to the target quantum circuit_{i}The corresponding measurement instruction is sent to the corresponding measurement device,i.e. node o_{i}The measurement plane in the corresponding measurement order is updated to XY, and at the same time, the switching node o_{i}The values of domain _ s and domain _ t in the corresponding measurement command; in particular, node o in the total measurement pattern P is assigned_{i}Corresponding measurement instruction [ M, o ]_{i},0,YZ,s,t]Replacement by [ M, o_{i},0, XY,t,s]。
Under the condition that the measurement operation corresponding to the qubit i indicated by the current random quantum measurement is the Pally Y measurement operation, the node o in the total measurement mode P equivalent to the target quantum circuit is updated_{i}Corresponding measurement instructions, i.e. node o_{i}Updating the measurement plane in the corresponding measurement command to XY, and simultaneously, updating the node o_{i}The measurement angle in the corresponding measurement command is updated to pi/2, and meanwhile, the switching node o_{i}The values of domain _ s and domain _ t in the corresponding measurement command; specifically, node o in the total measurement pattern P_{i}Corresponding measurement instruction [ M, o ]_{i},0,YZ,s,t]Replacement by [ M, o_{i},pi/2,XY,t,s]。
And under the condition that the measurement operation corresponding to the qubit i indicated by the current random quantum measurement is the Pally Z measurement operation, no adjustment is made. Therefore, at this time, the measurement operation indicated by the current random quantum measurement is the same as the quantum measurement preset by the initialization, so no adjustment is needed.
It will be appreciated that the abovedescribed basis for measurement order adjustment is derived from the difference in measurement orders in the 1WQC measurement mode for the pauli X measurement operation, the pauli Y measurement operation, and the pauli Z measurement operation.
Step 603: simulating and executing a 1WQC measurement mode based on a preset simulation algorithm to obtain a sampling result
Further, the complete process of randomly sampling the target quantum circuit is as follows:
inputting: a target quantum circuit C to be sampled (containing n qubits), a probability distribution q of the pauli measurement operation, a number of samples s.
And (3) outputting: sampling results (s quantum bit string of length n)
The specific algorithm is as follows:
the method comprises the following steps: based on the above step 601, the target quantum circuit C is translated into the total measurement pattern P satisfying the 1WQC model requirement.
Step two: based on the loop statement, the following steps are repeated s times, specifically,
2.1: and randomly generating a group of the Pally measuring operations M according to the probability distribution q of the Pally measuring operations, namely, one Pally measuring operation is corresponding to each quantum bit in the target quantum circuit.
2.2: and determining whether the measurement instruction in the total measurement mode P needs to be updated or not based on a group of randomly generated Pally measurement operations M, if so, updating based on the updating mode, otherwise, not updating.
2.3: based on the mode of step 603, the 2.2 processed overall measurement mode is run to obtain the measurement result of the current quantum random measurement as a sampling result (a bit string with length n).
Step three: and obtaining and outputting sampling results of s times.
Here, the specific experimental effect of the scheme of the present disclosure is demonstrated in conjunction with the target quantum circuit shown in fig. 7, specifically, as shown in fig. 7, the target quantum circuit includes n +1 quantum bits in total, wherein the first column to the eighth column are quantum gate operation portions, the last column, i.e., the ninth column, is a measurement operation portion, each question mark represents one quantum measurement operation, and quantum measurement operations generated by different random quantum measurements are different; specifically, in the first column, each qubit is acted upon by an Hgate; in the second, fourth, sixth and eighth columns, each qubit is acted on by an Rx swing gate; in the third and seventh columns, one Rzpassgate is active for each qubit; in the fifth column, a control Zgate is applied between two adjacent qubits, i.e. between two adjacent qubits.
Further, the Paly X measurement operation, the Paly Y measurement operation and the Paly Z measurement operation are randomly selected according to the uniform distribution for sampling 10 times, and the simulation time is recorded. As shown in the following table, the total time for simulation after translating the target quantum circuit shown in fig. 7 into the total measurement mode satisfying the requirement of the 1WQC model is given, wherein the total time t1 corresponds to the sampling idea in fig. 5, and the total time t2 corresponds to the sampling idea in fig. 6 (i.e., the core idea of the present disclosure). Furthermore, all numerical experiments were run on a common notebook (Intel i7 processor, 16G memory).
From table 1, the following two conclusions can be drawn: firstly, although a commonlyused quantum circuit simulator cannot realize the simulation of a quantum circuit with more than 30 qubits due to memory limitation, the number of qubits contained in the quantum circuit which can be simulated can be effectively increased by translating a target quantum circuit into a total measurement mode meeting the requirements of a 1WQC model and then carrying out simulation, namely, a largescale quantum circuit can be effectively simulated; secondly, the scheme of the present disclosure has higher operation efficiency than the sampling idea shown in fig. 5.
It can be understood that the above is only a specific demonstration case, and in practical application, the scheme disclosed by the present disclosure can be applied to random measurement sampling simulation of any quantum circuit, and the operation efficiency of the scheme disclosed by the present disclosure is higher than that of a general scheme.
The disclosure further provides a random quantum measurement simulation apparatus, as shown in fig. 8, including:
a measurement operation determining unit 801, configured to determine a target measurement operation of a qubit to be measured indicated by current random quantum measurement, where the qubit to be measured is a qubit in a target quantum circuit; the target quantum circuit at least comprises a quantum gate operation part and a measurement operation part, wherein the quantum gate operation part at least represents a quantum gate required for carrying out analog evolution on the target quantum circuit; the measurement operation part at least represents measurement operation required for quantum measurement of the quantum bit in the target quantum circuit after analog evolution;
a node determining unit 802, configured to determine, in an output node of a total measurement mode equivalent to the target quantum circuit, a target node corresponding to the qubit to be measured; wherein the total measurement mode is equivalent to the target quantum circuit and meets the requirement of a 1WQC model;
an adjusting unit 803, configured to adjust a current measurement instruction corresponding to the target node in the total measurement mode when the indicated target measurement operation of the qubit to be measured is different from a preset measurement operation indicated by the current measurement instruction corresponding to the target node in the total measurement mode;
and the operation unit 804 is used for simulating the adjusted total measurement mode to obtain the measurement result required by the current random quantum measurement.
In a specific example of the present disclosure, the measurement operation determination unit is specifically configured to randomly generate a pauli measurement operation based on a preset probability distribution; obtaining target measurement operation of quantum bits to be measured in a target quantum circuit indicated by current random quantum measurement based on randomly generated Pally measurement operation;
the target measurement operation is one of the following Paly measurement operations: pauli X measurement, pauli Y measurement, pauli Z measurement.
In a specific example of the disclosure, the adjusting unit is specifically configured to adjust the current measurement instruction corresponding to the target node in the total measurement mode based on a target measurement instruction equivalent to the target measurement operation and difference information between the current measurement instruction corresponding to the target node in the total measurement mode.
In a specific example of the disclosure, the adjusting unit is specifically configured to adjust one of the following information in a current measurement instruction corresponding to the target node in the total measurement mode:
measuring a plane, measuring a dependency relationship and measuring an angle.
In a specific example of the disclosure, the adjusting unit is specifically configured to adjust based on at least one of:
under the condition that the target measurement operation is a Paly X measurement operation and a current measurement instruction corresponding to the target node in the total measurement mode indicates a Pay Z measurement operation, adjusting a measurement plane in the current measurement instruction corresponding to the target node in the total measurement mode to be an XY plane, and exchanging related information of two types of nodes associated with the target node in the current measurement instruction corresponding to the target node in the total measurement mode;
and under the condition that the target measurement operation is a Paly Y measurement operation and the current measurement instruction corresponding to the target node in the total measurement mode indicates a Pay Z measurement operation, adjusting a measurement plane in the current measurement instruction corresponding to the target node in the total measurement mode to be an XY plane, updating a measurement angle in the current measurement instruction corresponding to the target node in the total measurement mode to be pi/2, and exchanging relevant information of two types of nodes associated with the target node in the current measurement instruction corresponding to the target node in the total measurement mode.
In a specific example of the present disclosure, the method further includes:
the mode conversion unit is used for converting a quantum gate operation part in the target quantum circuit into a first measurement mode meeting the requirement of a 1WQC model; converting a measurement operation part in the target quantum circuit into a second measurement mode meeting the requirement of a 1WQC model, wherein a measurement instruction corresponding to an output node in the second measurement mode indicates a preset measurement operation; and obtaining a total measurement mode equivalent to the target quantum circuit based on the first measurement mode and the second measurement mode.
In a specific example of the present disclosure, the mode conversion unit is specifically configured to, in a case that there are at least two quantum gates in the target quantum gate circuit, generate, based on quantum gate parameters of the quantum gates in the target quantum gate circuit, a submeasurement mode that satisfies 1WQC model requirements and is equivalent to the quantum gates in the target quantum gate circuit; and obtaining a first measurement mode equivalent to the quantum gate operation part of the target quantum gate circuit based on the equivalent submeasurement mode of each quantum gate in the target quantum gate circuit.
In a specific example of the disclosure, the running unit is further configured to, under a condition that the indicated target measurement operation of the qubit to be measured is the same as a preset measurement operation indicated by a current measurement instruction corresponding to the target node in the total measurement mode, simulate to run the total measurement mode, and obtain a measurement result required by current random quantum measurement.
Here, the specific structure of the apparatus can be described with reference to the above method, and is not described herein again.
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. 9 illustrates a schematic block diagram of an example electronic device 900 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. 9, the apparatus 900 includes a computing unit 901 which can perform various appropriate actions and processes in accordance with a computer program stored in a Read Only Memory (ROM)902 or a computer program loaded from a storage unit 908 into a Random Access Memory (RAM) 903. In the RAM 903, various programs and data required for the operation of the device 900 can also be stored. The calculation unit 901, ROM 902, and RAM 903 are connected to each other via a bus 904. An input/output (I/O) interface 905 is also connected to bus 904.
A number of components in the device 900 are connected to the I/O interface 905, including: an input unit 906 such as a keyboard, a mouse, and the like; an output unit 907 such as various types of displays, speakers, and the like; a storage unit 908 such as a magnetic disk, optical disk, or the like; and a communication unit 909 such as a network card, a modem, a wireless communication transceiver, and the like. The communication unit 909 allows the device 900 to exchange information/data with other devices through a computer network such as the internet and/or various telecommunication networks.
The computing unit 901 may be a variety of general and/or special purpose processing components having processing and computing capabilities. Some examples of the computing unit 901 include, but are not limited to, a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), various dedicated 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 calculation unit 901 performs the respective methods and processes described above, such as an analog method of random quantum measurement. For example, in some embodiments, the simulation method of random quantum measurement may be implemented as a computer software program tangibly embodied in a machinereadable medium, such as storage unit 908. In some embodiments, part or all of the computer program may be loaded and/or installed onto device 900 via ROM 902 and/or communications unit 909. When the computer program is loaded into RAM 903 and executed by computing unit 901, one or more steps of the above described simulation method of random quantum measurement may be performed. Alternatively, in other embodiments, the computing unit 901 may be configured by any other suitable means (e.g., by means of firmware) to perform an analog method of random quantum measurement.
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 standalone 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 machinereadable 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 machinereadable medium may be a machinereadable signal medium or a machinereadable storage medium. A machinereadable 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 machinereadable 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 readonly memory (ROM), an erasable programmable readonly memory (EPROM or flash memory), an optical fiber, a portable compact disc readonly memory (CDROM), 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 backend component (e.g., as a data server), or that includes a middleware component (e.g., an application server), or that includes a frontend 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 backend, middleware, or frontend 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 clientserver relationship to each other. The server may be a cloud server, a server of a distributed system, or a server with a combined blockchain.
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 or sequentially or in different orders, and are not limited herein as long as the desired results of the technical solutions disclosed in the present disclosure can be achieved.
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, subcombinations 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 (19)
1. A method of simulating random quantum measurements, comprising:
determining target measurement operation of a quantum bit to be measured indicated by current random quantum measurement, wherein the quantum bit to be measured is a quantum bit in a target quantum circuit; the target quantum circuit at least comprises a quantum gate operation part and a measurement operation part, wherein the quantum gate operation part at least represents a quantum gate required for carrying out analog evolution on the target quantum circuit; the measurement operation part at least represents measurement operation required for quantum measurement of the quantum bit in the target quantum circuit after analog evolution;
determining a target node corresponding to the quantum bit to be measured in an output node of a total measurement mode equivalent to the target quantum circuit; wherein the total measurement mode is equivalent to the target quantum circuit and meets the requirement of a unidirectional quantum computer 1WQC model;
under the condition that the indicated target measurement operation of the qubit to be measured is different from the preset measurement operation indicated by the current measurement instruction corresponding to the target node in the total measurement mode, adjusting the current measurement instruction corresponding to the target node in the total measurement mode;
and (5) simulating the adjusted total measurement mode to obtain the measurement result required by the current random quantum measurement.
2. The method of claim 1, wherein the determining a target measurement operation for the qubits to be measured indicated by the current random quantum measurement comprises:
randomly generating a Pauli measurement operation based on a preset probability distribution;
obtaining a target measurement operation of a quantum bit to be measured in a target quantum circuit indicated by current random quantum measurement based on a randomly generated Pally measurement operation, wherein the target measurement operation is one of the following Pay measurement operations: pauli X measurement, pauli Y measurement, pauli Z measurement.
3. The method according to claim 1 or 2, wherein the adjusting of the current measurement instruction corresponding to the target node in the total measurement mode comprises:
and adjusting the current measurement instruction corresponding to the target node in the total measurement mode based on the target measurement instruction equivalent to the target measurement operation and the difference information between the current measurement instruction corresponding to the target node in the total measurement mode.
4. The method according to any one of claims 1 to 3, wherein the adjusting the current measurement instruction corresponding to the target node in the total measurement mode comprises:
adjusting one of the following information in a current measurement instruction corresponding to the target node in the total measurement mode:
measuring a plane, measuring a dependency relationship and measuring an angle.
5. The method according to any one of claims 1 to 3, wherein the adjusting the current measurement instruction corresponding to the target node in the total measurement mode comprises:
the adjustment is based on at least one of:
under the condition that the target measurement operation is a Paly X measurement operation and a current measurement instruction corresponding to the target node in the total measurement mode indicates a Pay Z measurement operation, adjusting a measurement plane in the current measurement instruction corresponding to the target node in the total measurement mode to be an XY plane, and exchanging relevant information of two nodes associated with the target node in the current measurement instruction corresponding to the target node in the total measurement mode;
and under the condition that the target measurement operation is a Paly Y measurement operation and the current measurement instruction corresponding to the target node in the total measurement mode indicates a Pay Z measurement operation, adjusting a measurement plane in the current measurement instruction corresponding to the target node in the total measurement mode to be an XY plane, updating a measurement angle in the current measurement instruction corresponding to the target node in the total measurement mode to be pi/2, and exchanging relevant information of two types of nodes associated with the target node in the current measurement instruction corresponding to the target node in the total measurement mode.
6. The method of any of claims 1 to 5, further comprising:
converting a quantum gate operation part in the target quantum circuit into a first measurement mode meeting the requirements of a 1WQC model;
converting a measurement operation part in the target quantum circuit into a second measurement mode meeting the requirement of a 1WQC model, wherein a measurement instruction corresponding to an output node in the second measurement mode indicates a preset measurement operation;
and obtaining a total measurement mode equivalent to the target quantum circuit based on the first measurement mode and the second measurement mode.
7. The method of claim 6, wherein the converting the quantum gate operation portion of the target quantum circuit into the first measurement mode that satisfies the 1WQC model requirements comprises:
under the condition that at least two quantum gates exist in the target quantum gate circuit, generating a submeasurement mode which is equivalent to the quantum gates in the target quantum gate circuit and meets the requirement of a 1WQC model on the basis of quantum gate parameters of the quantum gates in the target quantum gate circuit;
and obtaining a first measurement mode equivalent to the quantum gate operation part of the target quantum gate circuit based on the equivalent submeasurement mode of each quantum gate in the target quantum gate circuit.
8. The method of any of claims 1 to 7, further comprising:
and under the condition that the indicated target measurement operation of the qubit to be measured is the same as the preset measurement operation indicated by the current measurement instruction corresponding to the target node in the total measurement mode, simulating to run the total measurement mode to obtain the measurement result required by the current random quantum measurement.
9. An analog device for random quantum measurement, comprising:
the measurement operation determining unit is used for determining the target measurement operation of the quantum bit to be measured indicated by the current random quantum measurement, wherein the quantum bit to be measured is the quantum bit in the target quantum circuit; the target quantum circuit at least comprises a quantum gate operation part and a measurement operation part, wherein the quantum gate operation part at least represents a quantum gate required for carrying out analog evolution on the target quantum circuit; the measurement operation part at least represents measurement operation required for quantum measurement of the quantum bit in the target quantum circuit after analog evolution;
a node determining unit, configured to determine, in an output node of a total measurement mode equivalent to the target quantum circuit, a target node corresponding to the qubit to be measured; wherein the total measurement mode is equivalent to the target quantum circuit and meets the requirement of a 1WQC model;
an adjusting unit, configured to adjust a current measurement instruction corresponding to the target node in the total measurement mode when the indicated target measurement operation of the qubit to be measured is different from a preset measurement operation indicated by the current measurement instruction corresponding to the target node in the total measurement mode;
and the operation unit is used for simulating the adjusted total measurement mode to obtain the measurement result required by the current random quantum measurement.
10. The apparatus according to claim 9, wherein the measurement operation determination unit is specifically configured to randomly generate a pauli measurement operation based on a preset probability distribution; obtaining target measurement operation of quantum bits to be measured in a target quantum circuit indicated by current random quantum measurement based on randomly generated Pally measurement operation;
the target measurement operation is one of the following Paly measurement operations: pauli X measurement, pauli Y measurement, pauli Z measurement.
11. The apparatus according to claim 9 or 10, wherein the adjusting unit is specifically configured to adjust the current measurement instruction corresponding to the target node in the total measurement mode based on a target measurement instruction equivalent to the target measurement operation and difference information between the current measurement instruction corresponding to the target node in the total measurement mode.
12. The apparatus according to any one of claims 9 to 11, wherein the adjusting unit is specifically configured to adjust one of the following information in a current measurement instruction corresponding to the target node in the total measurement mode:
measuring a plane, measuring a dependency relationship and measuring an angle.
13. The apparatus according to any one of claims 9 to 11, wherein the adjusting unit is specifically configured to adjust based on at least one of:
under the condition that the target measurement operation is a Paly X measurement operation and the current measurement instruction corresponding to the target node in the total measurement mode indicates a Pay Z measurement operation, adjusting a measurement plane in the current measurement instruction corresponding to the target node in the total measurement mode to be an XY plane, and exchanging relevant information of two types of nodes associated with the target node in the current measurement instruction corresponding to the target node in the total measurement mode;
and under the condition that the target measurement operation is a Paly Y measurement operation and the current measurement instruction corresponding to the target node in the total measurement mode indicates a Pay Z measurement operation, adjusting a measurement plane in the current measurement instruction corresponding to the target node in the total measurement mode to be an XY plane, updating a measurement angle in the current measurement instruction corresponding to the target node in the total measurement mode to be pi/2, and exchanging relevant information of two types of nodes associated with the target node in the current measurement instruction corresponding to the target node in the total measurement mode.
14. The apparatus of any of claims 9 to 13, further comprising:
the mode conversion unit is used for converting a quantum gate operation part in the target quantum circuit into a first measurement mode meeting the requirement of a 1WQC model; converting a measurement operation part in the target quantum circuit into a second measurement mode meeting the requirement of a 1WQC model, wherein a measurement instruction corresponding to an output node in the second measurement mode indicates a preset measurement operation; and obtaining a total measurement mode equivalent to the target quantum circuit based on the first measurement mode and the second measurement mode.
15. The apparatus according to claim 14, wherein the mode conversion unit is specifically configured to generate, based on the quantum gate parameters of the quantum gates in the target quantum gate circuit, a submeasurement mode that satisfies the requirements of the 1WQC model equivalent to the quantum gates in the target quantum gate circuit, in the case where at least two quantum gates are present in the target quantum gate circuit; and obtaining a first measurement mode equivalent to the quantum gate operation part of the target quantum gate circuit based on the submeasurement mode equivalent to each quantum gate in the target quantum gate circuit.
16. The apparatus according to any one of claims 9 to 15, wherein the execution unit is further configured to, in a case that the indicated target measurement operation of the qubits to be measured is the same as a preset measurement operation indicated by a current measurement instruction corresponding to the target node in the total measurement mode, simulate to execute the total measurement mode to obtain a measurement result required by current random quantum measurement.
17. An electronic device, comprising:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein,
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 18.
18. A nontransitory computer readable storage medium having stored thereon computer instructions for causing the computer to perform the method of any one of claims 18.
19. A computer program product comprising a computer program which, when executed by a processor, implements the method according to any one of claims 18.
Priority Applications (1)
Application Number  Priority Date  Filing Date  Title 

CN202210185621.6A CN114580645B (en)  20220228  20220228  Simulation method, device, equipment and storage medium for random quantum measurement 
Applications Claiming Priority (1)
Application Number  Priority Date  Filing Date  Title 

CN202210185621.6A CN114580645B (en)  20220228  20220228  Simulation method, device, equipment and storage medium for random quantum measurement 
Publications (2)
Publication Number  Publication Date 

CN114580645A true CN114580645A (en)  20220603 
CN114580645B CN114580645B (en)  20240723 
Family
ID=81771597
Family Applications (1)
Application Number  Title  Priority Date  Filing Date 

CN202210185621.6A Active CN114580645B (en)  20220228  20220228  Simulation method, device, equipment and storage medium for random quantum measurement 
Country Status (1)
Country  Link 

CN (1)  CN114580645B (en) 
Cited By (2)
Publication number  Priority date  Publication date  Assignee  Title 

CN115169566A (en) *  20220909  20221011  之江实验室  Random quantum line simulation method and device based on tensor network local sampling 
CN116167447A (en) *  20230220  20230526  北京百度网讯科技有限公司  Quantum circuit processing method and device and electronic equipment 
Citations (4)
Publication number  Priority date  Publication date  Assignee  Title 

CN112561068A (en) *  20201210  20210326  北京百度网讯科技有限公司  Simulation method, computing device, classical device, storage device and product 
CN113723613A (en) *  20210831  20211130  北京百度网讯科技有限公司  Method and device for simulating quantum circuit 
CN113723612A (en) *  20210831  20211130  北京百度网讯科技有限公司  Method and apparatus for operating a quantum system of a oneway quantum computer computing model 
US20220036230A1 (en) *  20201223  20220203  Beijing Baidu Netcom Science Technology Co., Ltd.  Quantum entangled state processing method, device, and storage medium 

2022
 20220228 CN CN202210185621.6A patent/CN114580645B/en active Active
Patent Citations (4)
Publication number  Priority date  Publication date  Assignee  Title 

CN112561068A (en) *  20201210  20210326  北京百度网讯科技有限公司  Simulation method, computing device, classical device, storage device and product 
US20220036230A1 (en) *  20201223  20220203  Beijing Baidu Netcom Science Technology Co., Ltd.  Quantum entangled state processing method, device, and storage medium 
CN113723613A (en) *  20210831  20211130  北京百度网讯科技有限公司  Method and device for simulating quantum circuit 
CN113723612A (en) *  20210831  20211130  北京百度网讯科技有限公司  Method and apparatus for operating a quantum system of a oneway quantum computer computing model 
NonPatent Citations (1)
Title 

金贻荣;: "超导与量子计算", 自然杂志, no. 04, 24 August 2020 (20200824) * 
Cited By (3)
Publication number  Priority date  Publication date  Assignee  Title 

CN115169566A (en) *  20220909  20221011  之江实验室  Random quantum line simulation method and device based on tensor network local sampling 
CN116167447A (en) *  20230220  20230526  北京百度网讯科技有限公司  Quantum circuit processing method and device and electronic equipment 
CN116167447B (en) *  20230220  20240514  北京百度网讯科技有限公司  Quantum circuit processing method and device and electronic equipment 
Also Published As
Publication number  Publication date 

CN114580645B (en)  20240723 
Similar Documents
Publication  Publication Date  Title 

CN112561068B (en)  Simulation method, computing device, classical device, storage device and product  
CN113011593B (en)  Method and system for eliminating quantum measurement noise, electronic device and 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  
CN113723613B (en)  Method and device for simulating quantum circuit  
CN114580645B (en)  Simulation method, device, equipment and storage medium for random quantum measurement  
CN115169568B (en)  Quantum calculation processing method and device and electronic equipment  
CN115577790B (en)  Hamiltonian amount simulation method, device, equipment and storage medium  
CN114418108B (en)  Unitary operator compiling method, computing device, apparatus and storage medium  
CN114970865B (en)  Quantum circuit processing method and device on quantum chip and electronic equipment  
CN115759269B (en)  Method, device, equipment and storage medium for determining characteristic information  
CN114418103B (en)  Method, device and equipment for determining ground state energy and storage medium  
CN114462614A (en)  Quantum noise intensity determination method and device, electronic device and medium  
CN114037084A (en)  Quantum measurement equipment calibration method and device, electronic equipment and medium  
CN115577789A (en)  Quantum entanglement degree determining method, device, equipment and storage medium  
CN116341454B (en)  Method, device and medium for generating couplingoff point information of superconducting quantum chip  
CN116611527B (en)  Quantum circuit processing method and device and electronic equipment  
CN116167446B (en)  Quantum computing processing method and device and electronic equipment  
CN116151381B (en)  Quantum circuit processing method and device and electronic equipment  
CN116167445A (en)  Quantum measurement mode processing method and device and electronic equipment  
CN113408304B (en)  Text translation method and device, electronic equipment and storage medium  
CN114897175A (en)  Noise elimination method and device for quantum measurement equipment, electronic equipment and medium  
CN116227607B (en)  Quantum circuit classification method, quantum circuit classification device, electronic equipment, medium and product  
CN116167447B (en)  Quantum circuit processing method and device and electronic equipment  
CN116090573B (en)  Method, device, equipment and storage medium for simulating nonlocal quantum operation 
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 