CN114580645B - Simulation method, device, equipment and storage medium for random quantum measurement - Google Patents

Simulation method, device, equipment and storage medium for random quantum measurement Download PDF

Info

Publication number
CN114580645B
CN114580645B CN202210185621.6A CN202210185621A CN114580645B CN 114580645 B CN114580645 B CN 114580645B CN 202210185621 A CN202210185621 A CN 202210185621A CN 114580645 B CN114580645 B CN 114580645B
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.)
Active
Application number
CN202210185621.6A
Other languages
Chinese (zh)
Other versions
CN114580645A (en
Inventor
方堃
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Baidu Netcom Science and Technology Co Ltd
Original Assignee
Beijing Baidu Netcom Science and Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Baidu Netcom Science and Technology Co Ltd filed Critical Beijing Baidu Netcom Science and Technology Co Ltd
Priority to CN202210185621.6A priority Critical patent/CN114580645B/en
Publication of CN114580645A publication Critical patent/CN114580645A/en
Application granted granted Critical
Publication of CN114580645B publication Critical patent/CN114580645B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

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

Landscapes

  • Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Mathematical Analysis (AREA)
  • Data Mining & Analysis (AREA)
  • Evolutionary Computation (AREA)
  • Condensed Matter Physics & Semiconductors (AREA)
  • Computational Mathematics (AREA)
  • Mathematical Optimization (AREA)
  • Pure & Applied Mathematics (AREA)
  • Computing Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Mathematical Physics (AREA)
  • Software Systems (AREA)
  • Artificial Intelligence (AREA)
  • Tests Of Electronic Circuits (AREA)

Abstract

The disclosure provides a simulation method, a device, equipment and a storage medium for random quantum measurement, relates to the field of data processing, and particularly relates to the field of quantum computing. The specific implementation scheme is as follows: determining target measurement operation of quantum bits to be measured indicated by current random quantum measurement, wherein the quantum bits to be measured are quantum bits 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 the quantum bit to be measured in output nodes of the total measurement mode equivalent to the 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, the current measurement instruction corresponding to the target node in the total measurement mode is adjusted; and simulating the total measurement mode after the adjustment to obtain a measurement result required by the current random quantum measurement. Thus, the simulation efficiency is improved.

Description

Simulation method, device, equipment and storage medium for random quantum measurement
Technical Field
The present disclosure relates to the field of data processing technology, and in particular to the field of quantum computing.
Background
Quantum computing can bring significant advantages in computational efficiency for a number of problems. However, since the current quantum hardware is still in an early stage of development, many theoretical operations (such as quantum operations of multiple quantum bits) are difficult to realize in experiments. Therefore, how to complete the calculation task or estimate the properties of the quantum states by the simplest operation is an important issue. Numerous documents have shown that by randomly sampling a given quantum state, for example, by performing random quantum measurements on the given quantum state, and performing certain classical data processing on the measurement results, various properties of the given quantum state can be effectively estimated 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 simulation method of random quantum measurement, including:
determining target measurement operation of quantum bits to be measured indicated by current random quantum measurement, wherein the quantum bits to be measured are quantum bits 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 characterizes a quantum gate required for carrying out simulated evolution on the target quantum circuit; the measurement operation part at least characterizes the measurement operation required by 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 output nodes of the total measurement mode equivalent to the target quantum circuit; the total measurement mode is equivalent to the measurement mode which meets the requirement of a 1WQC model and is equivalent to the target quantum circuit;
Adjusting the current measurement instruction corresponding to the target node in the total measurement mode under the condition that the indicated 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;
And simulating the total measurement mode after the adjustment to obtain a 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:
A measurement operation determining unit, configured to determine a target measurement operation of a quantum bit to be measured indicated by current random quantum measurement, where 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 characterizes a quantum gate required for carrying out simulated evolution on the target quantum circuit; the measurement operation part at least characterizes the measurement operation required by quantum measurement of the quantum bit in the target quantum circuit after analog evolution;
The node determining unit is used for determining a target node corresponding to the quantum bit to be measured in output nodes of the total measurement mode equivalent to the target quantum circuit; the total measurement mode is equivalent to the measurement mode which meets the requirement of a 1WQC model and is equivalent to the target quantum circuit;
the adjusting unit is used for adjusting the current measurement instruction corresponding to the target node in the total measurement mode under the condition that the indicated 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;
and the operation unit is used for simulating and operating the adjusted total measurement mode to obtain a measurement result required by the current random quantum measurement.
According to still another aspect of the present disclosure, there is provided an electronic apparatus 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 non-transitory computer-readable storage medium storing computer instructions for causing the computer to perform the above-described method.
According to yet another aspect of the present disclosure, there is provided a computer program product comprising a computer program which, when executed by a processor, implements the method described above.
Thus, the scheme can reduce the waiting time of quantum circuit simulation and improve the simulation efficiency.
It should be understood that the description in this section is not intended to identify key or critical features of the embodiments of the disclosure, nor is it intended to be used to limit the scope of the disclosure. Other features of the present disclosure will become apparent from the following specification.
Drawings
The drawings are for a better understanding of the present solution and are not to be construed as limiting the present disclosure. Wherein:
FIG. 1 is a schematic diagram of a quantum circuit according to an embodiment of the present disclosure;
FIG. 2 is a schematic diagram II of a quantum circuit according to an embodiment of the present disclosure;
FIG. 3 is a schematic diagram of measurement modes meeting the requirements of the 1WQC model according to an embodiment of the present disclosure;
FIG. 4 is a schematic flow diagram of an implementation of a simulation method of random quantum measurement in accordance with an embodiment of the present disclosure;
FIG. 5 is a schematic diagram of a quantum simulation for directly translating a complete quantum circuit in accordance with 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 structure of a target quantum circuit in a specific example of an analog method of random quantum measurement according to an embodiment of the disclosure;
FIG. 8 is a schematic diagram of a structure of a simulation device of random quantum measurement according to an embodiment of the present disclosure;
Fig. 9 is a block diagram of an electronic device used to implement an analog method of random quantum measurement in accordance with an embodiment of the present disclosure.
Detailed Description
Exemplary embodiments of the present disclosure are described below in conjunction with the accompanying drawings, which include various details of the embodiments of the present disclosure to facilitate understanding, and should be considered as merely exemplary. Accordingly, one of ordinary skill in the art will recognize that various changes and modifications of the embodiments described herein can be made without departing from the scope and spirit of the present disclosure. Also, descriptions of well-known functions and constructions are omitted in the following description for clarity and conciseness.
Unlike the general sampling method, the quantum random sampling technology needs to perform a large number of random quantum measurements on the quantum state which completes evolution, and each random quantum measurement needs to use different quantum measurement operations (the scheme of the disclosure is abbreviated as measurement operations). 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 marked respectively; each small square in the last column represents a quantum measurement operation performed on the corresponding qubit. The last column of quantum measurement operations for each quantum random sample will be different.
Thus, although the random sampling technique reduces the requirements of physical experiment operations, the difficulty of classical simulation is increased, for example, the measurement mode (i.e., measurement operation) used in each random quantum measurement is 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 group of measurement operations (i.e., each measurement operation in the last column as 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 (namely a new quantum circuit) is further operated, a measurement result is obtained, the measurement result can be subjected to statistical analysis after repeated times, and obviously, the mode efficiency of repeatedly operating the changed quantum circuit is very low; moreover, if an attempt is made to store the evolved quantum state and then perform random quantum measurement, it is difficult to simulate a quantum circuit exceeding 30 quantum bits in scale due to the memory limitation of a classical computer, so that the conventional random sampling technology increases the difficulty of simulation.
Based on the above, the scheme provides a simulation scheme of random quantum measurement, which is more convenient to operate, can greatly improve the classical simulation efficiency of random sampling skills, and is more efficient and economical.
The basic concepts of the quantum circuit model and the one-way quantum computer (1 wqc, one-way quantum computer) model are briefly described here before describing the schemes of the present disclosure in detail.
First, a quantum circuit model and a quantum circuit diagram; specifically:
The quantum circuit model is a common quantum computing 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 by measuring operation, so that a measuring result is obtained. The quantum circuit represents the whole process of the simulation calculation and the simulation result extraction of the quantum circuit model.
For example, as shown in fig. 2, one horizontal line represents one qubit, and three qubits are total; moreover, the qubits are numbered according to a preset rule, for example, from top to bottom, respectively, qubit 0, qubit 1, and qubit 2. In the simulation process, the quantum circuit reads from left to right, the leftmost end represents the initial quantum state of each quantum bit, the initial quantum state of each quantum bit is usually in a zero state, then the quantum gate operation shown in fig. 2 is sequentially carried out on the initial quantum state to complete the evolution of the initial quantum state, and finally the measurement operation is carried out to obtain a measurement result (namely, a simulation result).
It will be appreciated that in actual measurement operations, i.e., the last column, only the qubit that needs to be measured may be subjected to the quantum measurement operation, and not all of the qubits, which is not a limitation of the present disclosure.
It is 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, a 1WQC model and a measurement mode; specifically:
The 1WQC mode is another quantum computing simulation mode than the quantum circuit model. The core idea of the 1WQC model is that when measuring a part of the quantum bits of one quantum entanglement state (i.e. corresponding to one quantum system), the rest of the quantum bits which are not measured can realize the evolution of the quantum state, and by controlling the measurement mode, any required evolution of the rest of the quantum bits can be realized.
According to the scheme disclosed by the disclosure, the quantum circuit shown in the figure 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 quantum system comprising three quantum bits is evolved based on the quantum circuit shown in fig. 2 by operating the total measurement mode equivalent to the quantum circuit shown in fig. 2, so that the quantum circuit is replaced by the total measurement mode to complete quantum computing simulation.
Here, as shown in fig. 3, the total measurement mode equivalent to the quantum circuit meeting the requirement of the 1WQC model, or the measurement mode equivalent to the quantum gate in the quantum circuit, mainly includes four parts, respectively: computation space, input node, output node, and computation instructions, namely:
total measurement pattern (or measurement pattern) p= (computation space S, input node I, output node O, computation instruction C).
Wherein the computation space characterizes a node set of all nodes involved in a current total measurement mode (which may be referred to as a measurement mode for quantum gates); the input node represents a node set of nodes of an initial quantum state, the output node represents a node set of nodes of an output quantum state or a final measurement result, and the calculation instruction is an ordered set formed by the following four basic instructions (also preset instructions, namely an entanglement instruction, a measurement instruction, a correction instruction X and a correction instruction Z respectively); 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 specifies that the basic instructions are ordered in such a manner that the entanglement instructions, the measurement instructions, the correction instructions X, and the correction instructions Z 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 above node is a node under the 1WQC model, and the node may further represent a qubit under the 1WQC model. In addition, the quantum bit in the quantum circuit does not have a one-to-one correspondence with the node under the 1WQC model, or the quantum bit in the weighing sub-circuit is not equivalent to the node under the 1WQC model, in other words, the node in the total measurement mode equivalent to the quantum circuit is not one-to-one correspondence with the quantum bit in the quantum circuit. Moreover, the number of nodes under the 1WQC model, i.e., 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 into the 1WQC model based on preset rules and based on information such as quantum gate parameters, positions and the like of quantum gates in a quantum circuit.
Here, the storage and execution manners of the four basic instructions described above can be seen from the following table. Given in the table below.
For example, for a Hadamard gate in a given quantum circuit, i.eThe measurement mode meeting the requirement 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. measurement mode H of the H gate involves two nodes, node 1 and node 2, respectively, wherein node 1 is the input node and the initial quantum state can be assumed to be Node 2 is the output node; executing the execution instruction C from left to right, specifically, firstly executing an entanglement instruction, namely, acting a control Z gate on the quantum bit corresponding to the node 1 and the quantum bit corresponding to the node 2; in practical application, if not specifically described, all quantum states of the quantum bits corresponding to the nodes in the calculation instruction are initial quantum states, namely zero states; secondly, executing a measurement instruction, namely measuring the quantum bit on the node 1, wherein the measurement angle is 0, the measurement plane is an XY plane, and domain_s and domain_t are empty; finally, a correction instruction X is executed, i.e. if the measurement result of node 1 is 1, the brix gate is applied to the qubit on node 2, otherwise, the brix gate is not applied. Thus, after the above calculation instruction, the output quantum state at node 2 is equivalent to the state of the qubit on node 1 after acting on the Hadamard gate, i.e.
It can be understood that in practical application, each quantum gate in the quantum circuit can be converted into a measurement mode equivalent to the quantum gate, and under the condition that 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 the total measurement mode of the quantum circuit.
The scheme disclosed by the disclosure is based on the 1WQC model, and a target quantum circuit is converted into an equivalent total measurement mode meeting the requirement of the 1WQC model, so that the quantum calculation process is simulated; on one hand, the waiting time for circuit simulation is effectively reduced, the simulation efficiency is improved, and on the other hand, the scale of a simulative quantum circuit algorithm can be enhanced, so that the development and application of related technologies are facilitated.
Specifically, as shown in fig. 4, the simulation method of random quantum measurement according to the scheme of the present disclosure includes:
Step S401: determining target measurement operation of quantum bits to be measured indicated by current random quantum measurement, wherein the quantum bits to be measured are quantum bits 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 characterizes a quantum gate required for carrying out simulated evolution on the target quantum circuit; the measurement operation part at least characterizes the measurement operation required by quantum measurement of the quantum bit in the target quantum circuit after analog evolution.
For example, a quantum circuit as shown in fig. 2 includes three qubits; meanwhile, based on a circuit structure, the quantum circuit is divided into two parts, one part is a quantum gate operation part which is not changed in each random quantum measurement, the other part is a measurement operation part which is changed in each random quantum measurement, and the current random quantum measurement indicates a target measurement operation corresponding to a quantum bit to be measured in the measurement operation part, namely indicates the last column, and the quantum bit to be measured, for example, a target measurement operation corresponding to a quantum bit 0. Therefore, a foundation is laid for avoiding the need of translating the whole quantum circuit for each random quantum measurement.
Step S402: determining a target node corresponding to the quantum bit to be measured in output nodes of the total measurement mode equivalent to the target quantum circuit; the total measurement mode is equivalent to the target quantum circuit and meets the requirement of a 1WQC model.
Here, the total measurement mode has the expression form as described in fig. 3, including a computation space S, an input node I, an output node O, and a computation instruction C; for a specific form of the total measurement mode, reference may be made to the above, and no further description is given here.
Step S403: and adjusting the current measurement instruction corresponding to the target node in the total measurement mode under the condition that the indicated 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.
That is, 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, so that the requirement of the current random quantum measurement can be met by fine tuning the total measurement mode, the step that translation of the whole quantum circuit is needed for each random quantum measurement is effectively avoided, and support is provided for improving the simulation efficiency.
Step S404: and simulating the total measurement mode after the adjustment to obtain a 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 without random quantum measurement, the current measurement requirement can be completed by only carrying out fine adjustment on a 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 scheme of the present disclosure, the target measurement operation of the qubit to be measured (i.e. the qubit to be measured) in the current random quantum measurement process may be determined based on the above-described target measurement operation of determining the qubit to be measured indicated by the current random quantum measurement, which specifically includes: randomly generating a bubble interest measurement operation based on a preset probability distribution; based on the randomly generated Brix measurement operation, obtaining a target measurement operation of quantum bits to be measured in a target quantum circuit indicated by current random quantum measurement, wherein the target measurement operation is one of the following Brix measurement operations: brix measurement operation, briy measurement operation, brix Z measurement operation. For example, a set of brix 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 brix measurement operations, so that quantum random sampling is completed.
Therefore, the scheme provides a feasible scheme of quantum random sampling, and can realize random sampling on the basis of effectively avoiding the need of translating the whole quantum circuit and improving the simulation efficiency during each random quantum measurement, thereby providing technical support for effectively estimating various properties of a designated quantum state or completing 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 difference information between the target measurement instruction equivalent to the target measurement operation and the current measurement instruction corresponding to the target node in the total measurement mode. That is, based on the difference between the currently required target measurement operation and the test operation indicated by the measurement instruction of the total measurement mode, the measurement instruction in the total measurement mode is adjusted, so that the current random measurement requirement is met.
In a specific example of the solution of the present disclosure, the adjustment may be implemented in the following manner, and specifically, the adjusting the current measurement instruction corresponding to the target node in the total measurement mode specifically includes: and adjusting one of the following information in a current measurement instruction corresponding to the target node in the total measurement mode: and measuring a plane, a dependency relationship and an angle.
For example, the measurement instruction in the total measurement mode is expressed in the form of [ M, whish_qubit, angle, plane, domain_s, domain_t ]. Wherein the whish_qubit is used to indicate a node; the node corresponds to one quantum bit under the 1WQC model; angle characterizes a real number, i.e. a preset value; plane is used to indicate the measurement plane (e.g., XY, YZ, etc.); domain is used to indicate two types of nodes related to the node indicated by the whish_qubit, for example, domain_s and domain_t are used for characterization respectively; the measurement instruction indicates that a measurement operation on a plane indicated by a plane is performed on a quantum bit corresponding to a node indicated by a white_qubit, wherein a measurement angle is determined based on angle, domain_s, domain_t.
At this time, the measurement plane can be adjusted by adjusting the plane in the expression mode; the measurement dependency relationship is adjusted by adjusting the sequence of two types of nodes indicated by domain in the expression mode, for example, domain_s= {1,2}, domain_t= {3,4}, and then domain_s= {3,4} domain_t= {1,2}, after the exchange; and adjusting the measurement angle by adjusting the measurement results of the two types of nodes indicated by domain in the expression mode and the numerical value of angle.
Here, in an example, based on the difference information between the target measurement instruction equivalent to the target measurement operation and the 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: and measuring the dependency relationship and the angle, so that the measurement operation indicated by the measurement instruction corresponding to the target node after adjustment is the target measurement operation, namely the requirement of current random quantum measurement is met.
In this way, the scheme of the disclosure provides a specific adjustment scheme, and the adjustment method is simple and feasible, and compared with the time required for re-translating the whole target quantum circuit, the adjustment process is short in time consumption, 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 solution of the present disclosure, the specific adjustment may be implemented by adjusting the current measurement instruction corresponding to the target node in the total measurement mode, which specifically includes: adjustment is based on at least one of:
And under the condition that the target measurement operation is a Brix measurement operation and the current measurement instruction corresponding to the target node in the total measurement mode indicates a Brix 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.
For example, continuing to take the expression mode of the measurement instruction in the total measurement mode as [ M, white_qubit, angle, plane, domain_s, domain_t ] as an example, when the measurement operation (i.e., the target measurement operation) corresponding to the qubit i indicated by the current random quantum measurement (i.e., the qubit to be measured) is the brix measurement operation, and when the measurement instruction corresponding to the node o i (i.e., the node corresponding to the qubit i, i.e., the target node) in the total measurement mode is the brix measurement operation, the measurement instruction corresponding to the node o i (i.e., the node corresponding to the qubit i, i.e., the target node) in the total measurement mode P equivalent to the target quantum circuit is updated, that is, the measurement plane in the measurement instruction corresponding to the node o i is updated to XY, and simultaneously, domains_s and domain_t in the measurement instruction corresponding to the node o i are exchanged; specifically, the measurement instruction [ M, o i, 0, yz, s, t ] corresponding to the node o i in the total measurement pattern P is replaced by [ M, o i, 0, xy, t, s ], so that adjustment is completed.
And under the condition that the target measurement operation is a Brix Y measurement operation and the current measurement instruction corresponding to the target node in the total measurement mode indicates a Brix 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 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.
For example, in the case where the measurement operation corresponding to the qubit i indicated by the current random quantum measurement (i.e., the qubit to be measured) is a bery Y measurement and the measurement instruction corresponding to the node o i (i.e., the node corresponding to the qubit i, i.e., the target node) in the total measurement mode is a bery Z measurement operation, the measurement instruction corresponding to the node o i in the total measurement mode P equivalent to the target quantum circuit is updated, that is, the measurement plane in the measurement instruction corresponding to the node o i is updated to XY, and at the same time, the measurement angle in the measurement instruction corresponding to the node o i is updated to pi/2, and at the same time, the values of domain_s and domain_t in the measurement instruction corresponding to the node o i are exchanged; specifically, the measurement instruction [ M, o i, 0, yz, s, t ] corresponding to the node o i in the total measurement pattern P is replaced by [ M, o i, pi/2, xy, t, s ], so that the adjustment is completed.
In this way, the scheme of the disclosure provides a specific adjustment scheme, and the adjustment method is simple and feasible, and compared with the time required for re-translating the whole target quantum circuit, the adjustment process is short in time consumption, 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 scheme of the disclosure, the total measurement mode may also be obtained in the following manner, specifically, the quantum gate operation part in the target quantum circuit is converted into the first measurement mode meeting the requirement of the 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, the measurement operation part in the target quantum circuit is initially a preset measurement operation, so that a foundation is laid for avoiding the need of translating the whole quantum circuit for each random quantum measurement, and meanwhile, a foundation is laid for improving the simulation efficiency. And then based on the first measurement mode and the second measurement mode, obtaining the total measurement mode equivalent to the target quantum circuit.
Therefore, the quantum gate operation part and the measurement operation part in the target quantum circuit are respectively translated and translated into equivalent measurement modes, and then the equivalent measurement modes of the quantum gate operation part and the measurement operation part are combined to obtain the total test mode of the target quantum circuit, so that a foundation is laid for avoiding the need of translating the whole quantum circuit for each random quantum measurement, and simultaneously, a foundation is laid for improving the simulation efficiency.
In a specific example of the solution of the present disclosure, the conversion from the quantum circuit to the measurement mode may be performed in the following manner, specifically, the above-described conversion of the quantum gate operation part in the target quantum circuit to the first measurement mode satisfying the requirement of the 1WQC model, including:
Under the condition that at least two quantum gates exist in the target quantum gate circuit, generating a sub-measurement mode which is equivalent to the quantum gates in the target quantum gate circuit and meets the 1WQC model requirement based on quantum gate parameters of the quantum gates in the target quantum gate circuit;
Based on sub-measurement modes equivalent to each quantum gate in the target quantum gate circuit, for example, the sub-measurement modes are combined and sequenced and optimized to obtain a first measurement mode equivalent to a quantum gate operation part of the target quantum circuit. It can be understood that after the sub-measurement modes corresponding to the quantum gates are combined, the basic instructions, such as the entanglement instruction, the measurement instruction, the correction instruction X and the correction instruction Z, are further ordered based on the requirement of the 1WQC model, that is, the preset instruction reading rule, and then the ordered total measurement mode is taken 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-described translation and sequencing is not affected by the random measurement section (only the specific instruction content of the specific measurement instruction is affected), the total measurement pattern obtained by the above-described steps is used as a reference for the subsequent processing (i.e., adjustment).
Therefore, a foundation is laid for avoiding the need of translating the whole quantum circuit in each random quantum measurement, and meanwhile, a foundation is laid for improving the simulation efficiency.
In a specific example of the disclosed scheme, when the indicated target measurement operation of the quantum bit 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, the total measurement mode is simulated to be operated, and a measurement result required by current random quantum measurement is obtained. Therefore, a feasible scheme is provided for effectively realizing random sampling, and the scheme can effectively reduce the waiting time of circuit simulation and improve the simulation efficiency. And further provides technical support for effectively estimating various properties of a specified quantum state or completing required calculation.
In this way, the scheme disclosed herein converts the target quantum circuit into an equivalent total measurement mode satisfying the requirements of the 1WQC model based on the 1WQC model, thus simulating the quantum computation process; on one hand, the waiting time for circuit simulation is effectively reduced, the simulation efficiency is improved, and on the other hand, the scale of a simulative quantum circuit algorithm can be enhanced, so that the development and application of related technologies are facilitated.
The present disclosure is further described in detail below with reference to specific examples, specifically, the present examples express a target quantum circuit as a total measurement mode equivalent thereto that satisfies the requirements of the 1WQC model, and perform a simulation operation based on the total test model equivalent thereto, thus accelerating the simulation calculation process of the target quantum circuit including the random measurement operation.
Specifically, as shown in fig. 5, for the current random quantum measurement, a set of measurement operations is randomly generated, that is, a measurement operation portion (that is, a quantum measurement operation portion) is obtained, and the quantum gate operation portion is used to obtain a target quantum circuit for the current random quantum measurement, and the whole target quantum circuit is translated into a total measurement mode in an equivalent 1WQC model, and is subjected to simulation operation 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 have different quantum measurement operations, and thus different target quantum circuits corresponding to different random quantum measurements, that is, different measurement operation portions in the target quantum circuits, if the whole target quantum circuit is translated into the total measurement mode in the 1WQC model based on the manner shown in fig. 5, a lot of time will be inevitably consumed for each random quantum measurement. For this reason, the scheme of the present disclosure adjusts the manner shown in fig. 5 based on the structure of the target quantum circuit, i.e., the target quantum circuit is divided into a measurement operation portion, which is changed every time the quantum random sampling occurs, and a quantum gate operation portion, which is not changed every time the random sampling occurs; based on this, the translation process of the target quantum circuit can be divided into two steps, as shown in fig. 6, respectively:
A preprocessing step, namely preprocessing such as translation, sequencing optimization and the like on a quantum gate operation part in a target quantum circuit; meanwhile, initializing a measurement operation part in a target quantum circuit into preset measurement operation, and then carrying out preprocessing such as translation, sequencing optimization and the like; for example, a quantum measurement operation corresponding to each qubit (which may also be referred to as a qubit) in a measurement operation section in a target quantum circuit is set as a brix Z measurement operation, and translation, order optimization, and the like are performed, so that the target quantum circuit is translated into a total measurement pattern satisfying the requirements of the 1WQC model.
And a post-processing step, namely, according to the target measurement operation of the quantum bit to be measured indicated by the current random quantum measurement, fine-tuning a measurement operation part in a total measurement mode equivalent to the target quantum circuit so as to ensure that a measurement instruction in the adjusted total measurement mode is matched with the current required random quantum measurement. That is, in the case where the preprocessing step obtains the total measurement mode equivalent to the target quantum circuit, the measurement instruction in the total measurement mode equivalent to the target quantum circuit is adjusted based on the set of quantum measurement operations currently randomly generated, so that the adjusted total measurement mode satisfies the requirement of current random quantum measurement.
And finally, based on a total measurement mode obtained after the post-processing step is executed by a preset simulation algorithm, obtaining a sampling result, namely a measurement result.
In this way, the scheme of the disclosure promotes the simulation efficiency of the target quantum circuit containing random quantum measurement, and expands the applicable scene of the scheme of the disclosure; in addition, the structure of the target quantum circuit is fully utilized, the thought of step processing is provided, the translation time for translating the target quantum circuit into the total measurement mode equivalent to the target quantum circuit 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 the subsequent random quantum sampling, then the simulation is operated, and the whole target quantum circuit is not required to be translated repeatedly, so that the translation efficiency is improved, and the simulation efficiency is further improved.
Specifically, as shown in fig. 6, the specific steps of the simulation method of random quantum measurement in this example include:
step 601: pretreatment; namely, translating and sequencing and optimizing a quantum gate operation part in a target quantum circuit; meanwhile, after initializing a measurement operation part in a target quantum circuit to a preset measurement operation, performing translation and sequencing optimization to obtain a total measurement mode equivalent to the target quantum circuit.
Specifically, after the quantum gate operation part in the target quantum circuit is acquired, it is assumed that measurement under calculation, namely, a berlite Z measurement operation is performed on all the quantum bits, namely, it is assumed that the measurement operation corresponding to the measurement operation part is berlite Z measurement operation, and then the target quantum circuit of which the measurement operation corresponding to the measurement operation part is berlite Z measurement operation is translated, so that the total measurement mode equivalent to the measurement operation is obtained.
In practical application, after the total measurement mode equivalent to the target quantum circuit is obtained through translation, basic instructions (such as entanglement instructions, measurement instructions and correction instructions) in the total measurement mode obtained through translation can be sequenced and optimized based on a preset instruction reading rule, so that the 1WQC model requirement is met, and the total measurement mode after sequencing and optimization is used as a total measurement mode of subsequent simulation.
In this way, since the overall structure of the total measurement pattern obtained by the above-described translation and sequencing optimization is not affected by the random measurement section (only the specific instruction content affecting the specific measurement instruction), the total measurement pattern obtained by the above-described steps is used as a reference for the subsequent processing.
Step 602: post-treatment; 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, based on the total measurement mode equivalent to the target quantum circuit obtained in the preprocessing step, the measurement instruction in the total measurement mode equivalent to the target quantum circuit is adjusted based on the current randomly generated set of quantum measurement operations, so that the adjusted total measurement mode meets the requirement of 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 the following manner, specifically,
For the qubit i, searching a node label with i as a first element in an output node set in the total measurement mode P, namely determining a node corresponding to the qubit i in the target quantum circuit in an output node of the total measurement mode equivalent to the target quantum circuit, namely, a node o i, namely, the qubit i (namely, the qubit corresponding to the qubit i) in the target quantum circuit, and corresponding to a node o i in an output node of the total measurement mode equivalent to the target quantum circuit.
Under the condition that the measurement operation corresponding to the qubit i indicated by the current random quantum measurement is the Paully X measurement operation, updating the measurement instruction corresponding to the node o i in the total measurement mode P equivalent to the target quantum circuit, namely updating the measurement plane in the measurement instruction corresponding to the node o i to XY, and simultaneously exchanging the values of domain_s and domain_t in the measurement instruction corresponding to the node o i; specifically, the measurement instruction [ M, o i, 0, yz, s, t ] corresponding to the node o i in the total measurement pattern P is replaced with [ M, o i, 0, XY, t, s ].
Under the condition that the measurement operation corresponding to the quantum bit i indicated by the current random quantum measurement is the Paully Y measurement operation, updating the measurement instruction corresponding to the node o i in the total measurement mode P equivalent to the target quantum circuit, namely updating the measurement plane in the measurement instruction corresponding to the node o i to XY, simultaneously updating the measurement angle in the measurement instruction corresponding to the node o i to pi/2, and simultaneously exchanging the values of domain_s and domain_t in the measurement instruction corresponding to the node o i; specifically, the measurement instruction [ M, o i, 0, YZ, s, t ] corresponding to the node o i in the total measurement pattern P is replaced by [ M, o i, pi/2, XY, t, s ].
In the case that the measurement operation corresponding to the qubit i indicated by the current random quantum measurement is the berlite 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, and therefore, no adjustment is required.
It will be appreciated that the basis for the measurement instruction adjustment described above is derived from a Brix measurement operation, a Brix Y measurement operation, and a Brix Z measurement operation to measure the difference in instructions in the 1WQC measurement mode.
Step 603: based on a preset simulation algorithm, a 1WQC measurement mode is simulated and executed to obtain a sampling result
Further, the complete process of randomly sampling the target quantum circuit is as follows:
input: the target quantum circuit C (comprising n qubit bits) to be sampled, the probability distribution q of the brix measurement operation, the number of samples s.
And (3) outputting: sampling result (s quantum bit string with length n)
The specific algorithm is as follows:
Step one: based on the above step 601, the target quantum circuit C is translated into a total measurement pattern P meeting the requirements of the 1WQC model.
Step two: the following steps are repeated s times based on the loop sentence, specifically,
2.1: A set of brix measurement operations M, one for each qubit in the target qucircuit, is randomly generated from the probability distribution q of brix measurement operations.
2.2: Based on a set of bubble-benefit measurement operations M generated randomly, determining whether the measurement instruction in the total measurement mode P needs to be updated, if so, updating based on the updating mode, otherwise, not updating.
2.3: The measurement result of the current quantum random measurement is obtained as a sampling result (a bit string of length n) based on the total measurement pattern after 2.2 processing is run in the manner of step 603.
Step three: and obtaining sampling results of s times and outputting the sampling results.
Here, specific experimental effects of the scheme of the present disclosure are shown in conjunction with the target quantum circuit shown in fig. 7, specifically, as shown in fig. 7, the target quantum circuit contains n+1 quantum bits in total, wherein the first column to the eighth column are quantum gate operation parts, the last column, i.e., the ninth column is a measurement operation part, 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 acts as an H gate; in the second, fourth, sixth and eighth columns, each qubit acts on an Rx rotation gate; in the third and seventh columns, each qubit acts as an Rz rotator gate; in the fifth column, a control Z gate is applied between two adjacent qubits, i.e., between two adjacent qubits.
Further, the Brix measurement operation, brix Y measurement operation and Brix Z measurement operation were randomly selected according to an even distribution, randomly sampled 10 times in total, and the simulation time was 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 meeting the requirement of the 1WQC model is given, where the total time t1 corresponds to the sampling concept in fig. 5 and the total time t2 corresponds to the sampling concept in fig. 6 (i.e., the core concept of the present disclosure). Moreover, all numerical experiments were run on a plain notebook (Intel i7 processor, 16G memory).
From table 1, two conclusions can be drawn: firstly, although the common quantum circuit simulator cannot realize the simulation of the quantum circuit with more than 30 quantum bits due to the memory limitation, the number of the quantum bits contained in the simulative quantum circuit can be effectively increased by translating the target quantum circuit into a total measurement mode meeting the requirement of a 1WQC model and then simulating, namely, the large-scale quantum circuit can be effectively simulated; second, the disclosed solution is more efficient than the sampling approach shown in fig. 5.
It can be appreciated that the above is only one specific illustration case, and in practical application, the scheme disclosed in the present disclosure can be applied to random measurement sampling simulation of any quantum circuit, and compared with a general scheme, the operation efficiency of the scheme disclosed in the present disclosure is higher.
The disclosed scheme also provides a simulation device for random quantum measurement, as shown in fig. 8, comprising:
A measurement operation determining unit 801, configured to determine a target measurement operation of a quantum bit to be measured indicated by current random quantum measurement, where 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 characterizes a quantum gate required for carrying out simulated evolution on the target quantum circuit; the measurement operation part at least characterizes the measurement operation required by quantum measurement of the quantum bit in the target quantum circuit after analog evolution;
A node determining unit 802, configured to determine, among output nodes of a total measurement mode equivalent to the target quantum circuit, a target node corresponding to the quantum bit to be measured; the total measurement mode is equivalent to the measurement mode which meets the requirement of a 1WQC model and is equivalent to the target quantum circuit;
An adjusting unit 803, configured to adjust, when the indicated target measurement operation of the qubit to be measured is different from a preset measurement operation indicated by a 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;
And the operation unit 804 is configured to simulate and operate the adjusted total measurement mode, so as to obtain a measurement result required by current random quantum measurement.
In a specific example of the solution of the present disclosure, the measurement operation determining unit is specifically configured to randomly generate a berliner measurement operation based on a preset probability distribution; based on the randomly generated Brix measurement operation, obtaining a target measurement operation of quantum bits to be measured in a target quantum circuit indicated by the current random quantum measurement;
the target measurement operation is one of the following berlite measurement operations: brix measurement operation, briy measurement operation, brix Z measurement operation.
In a specific example of the present disclosure, the adjusting unit is specifically configured to adjust, based on difference information between a target measurement instruction equivalent to the target measurement operation and a 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.
In a specific example of the present 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:
And measuring a plane, a dependency relationship and an angle.
In a specific example of the solution of the present disclosure, the adjusting unit is specifically configured to perform the adjustment based on at least one of the following:
When the target measurement operation is a bery X measurement operation and the current measurement instruction corresponding to the target node in the total measurement mode indicates a bery 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 Brix Y measurement operation and the current measurement instruction corresponding to the target node in the total measurement mode indicates a Brix 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 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.
In a specific example of the present disclosure, further comprising:
A mode conversion unit 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 is indicated as a preset measurement operation; and obtaining the 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 solution of the present disclosure, the mode conversion unit is specifically configured to generate, based on quantum gate parameters of a quantum gate in the target quantum gate circuit, a sub-measurement mode equivalent to the quantum gate in the target quantum gate circuit and meeting the requirement of the 1WQC model, when there are at least two quantum gates in the target quantum gate circuit; based on the sub-measurement mode equivalent to each quantum gate in the target quantum gate circuit, a first measurement mode equivalent to a quantum gate operation portion of the target quantum circuit is obtained.
In a specific example of the present disclosure, the operation unit is further configured to simulate and operate the total measurement mode when 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, so as to obtain a measurement result required by current random quantum measurement.
Here, the specific structure of the above device may be described with reference to the above method, and will not be described herein.
According to embodiments of the present disclosure, the present disclosure also provides an electronic device, a readable storage medium and a computer program product.
Fig. 9 shows a schematic block diagram of an example electronic device 900 that may 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 telephones, smartphones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions, are meant to be exemplary 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 that can perform various appropriate actions and processes according to 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 computing unit 901, the ROM 902, and the RAM 903 are connected to each other by a bus 904. An input/output (I/O) interface 905 is also connected to the bus 904.
Various components in device 900 are connected to I/O interface 905, including: an input unit 906 such as a keyboard, a mouse, or 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, an optical disk, or the like; and a communication unit 909 such as a network card, modem, wireless communication transceiver, or 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 telecommunications 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 computing unit 901 include, but are not limited to, a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), various specialized Artificial Intelligence (AI) computing chips, various computing units running machine learning model algorithms, a Digital Signal Processor (DSP), and any suitable processor, controller, microcontroller, etc. The computing unit 901 performs the respective methods and processes described above, such as a simulation 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 on a machine-readable medium, such as the storage unit 908. In some embodiments, part or all of the computer program may be loaded and/or installed onto the device 900 via the ROM 902 and/or the communication unit 909. When the computer program is loaded into RAM 903 and executed by the 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 way (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 circuit systems, field Programmable Gate Arrays (FPGAs), application Specific Integrated Circuits (ASICs), application Specific Standard Products (ASSPs), systems On 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, the one or more computer programs may be executed and/or interpreted on a programmable system including at least one programmable processor, which may be a special purpose or general-purpose programmable processor, that may receive data and instructions from, and transmit data and instructions to, a storage system, at least one input device, and at least one output device.
Program code for carrying out methods of the present disclosure may be written in any combination of one or more programming languages. These program code 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 code, when executed by the processor or controller, causes the functions/operations specified in the flowchart and/or block diagram to be implemented. The program code may execute entirely on the machine, partly on the machine, as a stand-alone software package, partly on the machine and partly on a remote machine or entirely on the remote machine or server.
In the context of this disclosure, a machine-readable medium may be a tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. The machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
To provide for interaction with a user, the systems and techniques described here can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to a user; and a keyboard and pointing device (e.g., a mouse or 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 may 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 input, speech input, or tactile input.
The systems and techniques described here can be implemented in a computing system that includes a background component (e.g., as a data server), or that includes a middleware component (e.g., an application server), or that includes a front-end component (e.g., a user computer having a graphical user interface or a web browser through which a user can interact with an implementation of the systems and techniques described here), or any combination of such background, middleware, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: local Area Networks (LANs), wide Area Networks (WANs), and the internet.
The computer system may include a client and a server. The client and server are typically remote from each other and typically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other. The server may be a cloud server, a server of a distributed system, or a server incorporating a blockchain.
It should be appreciated that various forms of the flows shown above may be used to reorder, add, or delete steps. For example, the steps recited in the present disclosure may be performed in parallel, sequentially, or in a different order, provided that the desired results of the disclosed aspects are achieved, and are not limited herein.
The above detailed description should not be taken as limiting the scope of the present disclosure. It will be apparent to those skilled in the art that various modifications, combinations, sub-combinations and alternatives are possible, depending on design requirements and other factors. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present disclosure are intended to be included within the scope of the present disclosure.

Claims (15)

1. A method of simulating random quantum measurements, comprising:
determining target measurement operation of quantum bits to be measured indicated by current random quantum measurement, wherein the quantum bits to be measured are quantum bits 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 characterizes a quantum gate required for carrying out simulated evolution on the target quantum circuit; the measurement operation part at least characterizes the measurement operation required by 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 output nodes of the total measurement mode equivalent to the target quantum circuit; the total measurement mode is equivalent to the target quantum circuit and meets the requirement of a one-way quantum computer 1WQC model;
Adjusting the current measurement instruction corresponding to the target node in the total measurement mode under the condition that the indicated 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;
simulating the total measurement mode after operation adjustment to obtain a measurement result required by current random quantum measurement;
The adjusting the current measurement instruction corresponding to the target node in the total measurement mode includes:
Based on the difference information between the target measurement instruction equivalent to the target measurement operation and the 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 is adjusted:
And measuring a plane, a dependency relationship and an angle.
2. The method of claim 1, wherein the determining the target measurement operation of the qubit to be measured indicated by the current random quantum measurement comprises:
Randomly generating a bubble interest measurement operation based on a preset probability distribution;
based on the randomly generated Brix measurement operation, obtaining a target measurement operation of quantum bits to be measured in a target quantum circuit indicated by current random quantum measurement, wherein the target measurement operation is one of the following Brix measurement operations: brix measurement operation, briy measurement operation, brix Z measurement operation.
3. The method of claim 1, wherein the adjusting one of the following information in the current measurement instruction corresponding to the target node in the total measurement mode comprises:
Adjustment is based on at least one of:
When the target measurement operation is a bery X measurement operation and the current measurement instruction corresponding to the target node in the total measurement mode indicates a bery 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 nodes associated with the target node in the current measurement instruction corresponding to the target node in the total measurement mode;
When the target measurement operation is a brix Y measurement operation and the current measurement instruction corresponding to the target node in the total measurement mode indicates a brix 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 updating a measurement angle in the current measurement instruction corresponding to the target node in the total measurement mode to be And/2, exchanging the 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.
4. A method according to any one of claims 1 to 3, further comprising:
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 is indicated as a preset measurement operation;
And obtaining the total measurement mode equivalent to the target quantum circuit based on the first measurement mode and the second measurement mode.
5. A method according to claim 4, wherein said converting the quantum gate operating portion of the target quantum circuit into a first measurement mode that satisfies the 1 WQC-model requirements comprises:
under the condition that at least two quantum gates exist in the target quantum circuit, generating a sub-measurement mode which is equivalent to the quantum gates in the target quantum circuit and meets the 1WQC model requirement based on quantum gate parameters of the quantum gates in the target quantum circuit;
Based on the sub-measurement mode equivalent to each quantum gate in the target quantum circuit, a first measurement mode equivalent to a quantum gate operation portion of the target quantum circuit is obtained.
6. A method according to any one of claims 1 to 3, further comprising:
And under the condition that the indicated target measurement operation of the quantum bit 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 and operating the total measurement mode to obtain a measurement result required by current random quantum measurement.
7. An analog device of random quantum measurement, comprising:
A measurement operation determining unit, configured to determine a target measurement operation of a quantum bit to be measured indicated by current random quantum measurement, where 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 characterizes a quantum gate required for carrying out simulated evolution on the target quantum circuit; the measurement operation part at least characterizes the measurement operation required by quantum measurement of the quantum bit in the target quantum circuit after analog evolution;
The node determining unit is used for determining a target node corresponding to the quantum bit to be measured in output nodes of the total measurement mode equivalent to the target quantum circuit; the total measurement mode is equivalent to the measurement mode which meets the requirement of a 1WQC model and is equivalent to the target quantum circuit;
the adjusting unit is used for adjusting the current measurement instruction corresponding to the target node in the total measurement mode under the condition that the indicated 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;
The operation unit is used for simulating and operating the adjusted total measurement mode to obtain a measurement result required by current random quantum measurement;
The adjusting unit is specifically configured to adjust, based on difference information between a target measurement instruction equivalent to the target measurement operation and 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:
And measuring a plane, a dependency relationship and an angle.
8. The apparatus according to claim 7, wherein the measurement operation determination unit is in particular configured to randomly generate a berliner measurement operation based on a preset probability distribution; based on the randomly generated Brix measurement operation, obtaining a target measurement operation of quantum bits to be measured in a target quantum circuit indicated by the current random quantum measurement;
The target measurement operation is one of the following berlite measurement operations: brix measurement operation, briy measurement operation, brix Z measurement operation.
9. The apparatus according to claim 7, wherein the adjusting unit is specifically configured to adjust based on at least one of:
When the target measurement operation is a bery X measurement operation and the current measurement instruction corresponding to the target node in the total measurement mode indicates a bery 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;
When the target measurement operation is a brix Y measurement operation and the current measurement instruction corresponding to the target node in the total measurement mode indicates a brix 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 updating a measurement angle in the current measurement instruction corresponding to the target node in the total measurement mode to be And/2, exchanging the 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.
10. The apparatus of any of claims 7 to 9, further comprising:
A mode conversion unit 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 is indicated as a preset measurement operation; and obtaining the total measurement mode equivalent to the target quantum circuit based on the first measurement mode and the second measurement mode.
11. The device according to claim 10, wherein the mode conversion unit is specifically configured to generate, in the case where there are at least two quantum gates in the target quantum circuit, a sub-measurement mode equivalent to the quantum gate in the target quantum circuit that satisfies the 1WQC model requirement, based on the quantum gate parameters of the quantum gate in the target quantum circuit; based on the sub-measurement mode equivalent to each quantum gate in the target quantum circuit, a first measurement mode equivalent to a quantum gate operation portion of the target quantum circuit is obtained.
12. The apparatus according to any one of claims 7 to 9, wherein the operation unit is further configured to simulate operating the total measurement mode to obtain a measurement result required by current random quantum measurement, when the indicated target measurement operation of the quantum bit 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.
13. 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 1-6.
14. A non-transitory computer readable storage medium storing computer instructions for causing the computer to perform the method of any one of claims 1-6.
15. A computer program product comprising a computer program which, when executed by a processor, implements the method according to any of claims 1-6.
CN202210185621.6A 2022-02-28 2022-02-28 Simulation method, device, equipment and storage medium for random quantum measurement Active CN114580645B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210185621.6A CN114580645B (en) 2022-02-28 2022-02-28 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) 2022-02-28 2022-02-28 Simulation method, device, equipment and storage medium for random quantum measurement

Publications (2)

Publication Number Publication Date
CN114580645A CN114580645A (en) 2022-06-03
CN114580645B true CN114580645B (en) 2024-07-23

Family

ID=81771597

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210185621.6A Active CN114580645B (en) 2022-02-28 2022-02-28 Simulation method, device, equipment and storage medium for random quantum measurement

Country Status (1)

Country Link
CN (1) CN114580645B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115169566A (en) * 2022-09-09 2022-10-11 之江实验室 Random quantum line simulation method and device based on tensor network local sampling
CN116167447B (en) * 2023-02-20 2024-05-14 北京百度网讯科技有限公司 Quantum circuit processing method and device and electronic equipment
WO2024187994A1 (en) * 2023-03-10 2024-09-19 阿里巴巴(中国)有限公司 Quantum operation processing method, apparatus, and system

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112561068A (en) * 2020-12-10 2021-03-26 北京百度网讯科技有限公司 Simulation method, computing device, classical device, storage device and product
CN113723612A (en) * 2021-08-31 2021-11-30 北京百度网讯科技有限公司 Method and apparatus for operating a quantum system of a one-way quantum computer computing model

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112529198B (en) * 2020-12-23 2021-10-01 北京百度网讯科技有限公司 Quantum entanglement state processing method, device, equipment, storage medium and product
CN113723613B (en) * 2021-08-31 2022-05-06 北京百度网讯科技有限公司 Method and device for simulating quantum circuit

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112561068A (en) * 2020-12-10 2021-03-26 北京百度网讯科技有限公司 Simulation method, computing device, classical device, storage device and product
CN113723612A (en) * 2021-08-31 2021-11-30 北京百度网讯科技有限公司 Method and apparatus for operating a quantum system of a one-way quantum computer computing model

Also Published As

Publication number Publication date
CN114580645A (en) 2022-06-03

Similar Documents

Publication Publication Date Title
CN114580645B (en) Simulation method, device, equipment and storage medium for random quantum measurement
CN114580647B (en) Quantum system simulation method, computing device, device and storage medium
CN114418103B (en) Method, device and equipment for determining ground state energy and storage medium
CN114970865B (en) Quantum circuit processing method and device on quantum chip and electronic equipment
CN112785493B (en) Model training method, style migration method, device, equipment and storage medium
CN114662694A (en) Method, device and equipment for determining characteristic information of quantum system and storage medium
CN116151384B (en) Quantum circuit processing method and device and electronic equipment
CN115577776B (en) Method, device, equipment and storage medium for determining ground state energy
CN113408304B (en) Text translation method and device, electronic equipment and storage medium
CN116611527B (en) Quantum circuit processing method and device and electronic equipment
CN116167445B (en) Quantum measurement mode processing method and device and electronic equipment
CN115577782B (en) Quantum computing method, device, equipment and storage medium
CN116341454B (en) Method, device and medium for generating coupling-off point information of superconducting quantum chip
CN116167446B (en) Quantum computing processing method and device and electronic equipment
CN115577786B (en) Quantum entropy determining method, device, equipment and storage medium
CN115577781B (en) Quantum relative entropy determining method, device, equipment and storage 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
CN116108926B (en) Quantum computing method, device, equipment and storage medium
CN113361712B (en) Training method of feature determination model, semantic analysis method, semantic analysis device and electronic equipment
CN116629370B (en) Quantum circuit processing method and device and electronic equipment
CN116090573B (en) Method, device, equipment and storage medium for simulating non-local quantum operation
CN115577788B (en) Quantum entropy determining method, device, equipment and storage medium
CN117669751A (en) Quantum circuit simulation method and device and electronic equipment
CN117521829A (en) Quantum circuit simulation method and device and electronic equipment

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