Quantum circuit generation method and device based on balanced Boolean function, and electronic equipment

By extracting the global truth table of the qubit balanced Boolean function and using the dual-controlled N/A gate, the problem of circuit complexity and high error rate during Boolean function implementation in the prior art is solved, and efficient quantum circuit generation is achieved, reducing the reduction of Resource requirements and complexity.

CN118940849AActive Publication Date: 2024-11-12UNIV OF SCI & TECH OF CHINA +1
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202411037436.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-31
Publication Date
2024-11-12
Estimated Expiration
2044-07-31

AI Technical Summary

Technical Problem

Existing quantum circuit comprehensive methods such as the XAG method and the ESOP method require auxiliary bits or a large number of multi-controlled Toffoli gates when implementing Boolean functions, resulting in high circuit complexity and error rate and low fidelity.

Method used

By extracting all possible minimum terms in the global truth table of the qubit balance Boolean function, and based on the parallelogram conditions of the geometric representation, double-control non-gate-to-integrate is used to synthesize the minimum terms as the target quantum circuit, avoiding the use of auxiliary bits and reducing circuit complexity and resource requirements.

Benefits of technology

The conversion from the input truth table to the target quantum circuit is realized, which reduces the circuit complexity and resource requirements, and can also realize complex circuit functions when the number of control bits is small, improving the fidelity of the quantum circuit.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118940849A_ABST
    Figure CN118940849A_ABST
Patent Text Reader

Abstract

The invention provides a quantum circuit generation method and device based on a balanced Boolean function and electronic equipment, and relates to the technical field of quantum information. The quantum circuit generation method based on the balanced Boolean function comprises the following steps: extracting a minimum item set from a global truth table of the balanced Boolean function; determining at least one target minimum item set based on the mapping positions of the plurality of minimum items in the Euclidean space; and mapping the at least one target minimum term set on the quantum circuit using a dual control NOT gate to generate a target quantum circuit.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the technical field of quantum information technology, and more specifically, to a quantum circuit generation method, device and electronic device based on balanced Boolean functions. Background Art

[0002] Boolean functions play a fundamental role in the design of classical computer chips. Unlike classical computers, many classical logic operations are not easy to construct in quantum circuits, such as AND operations. On the contrary, XOR operations are naturally implemented by CNOT gates. Therefore, it is very necessary to effectively implement Boolean functions.

[0003] Existing quantum circuit synthesis methods include the XAG method and the ESOP method. The XAG method uses XOR and AND logic gates to represent functions. However, the XAG method requires auxiliary bits to store intermediate results, which increases the complexity of the circuit and the possible error rate. The ESOP method usually requires a large number of multi-control Toffoli (MCT) gates and control bits. As the number of control bits increases, the complexity of the multi-control Toffoli gate operation will also increase, thereby increasing the possibility of errors. Therefore, the fidelity of these quantum gates in quantum circuits is low. Summary of the invention

[0004] In view of this, the present disclosure provides a quantum circuit generation method, device and electronic device based on balanced Boolean functions.

[0005] One aspect of the present disclosure provides a method for generating a quantum circuit based on a balanced Boolean function, comprising: extracting a minimum term set from a global truth table of the balanced Boolean function; determining at least one target minimum term set based on mapping positions of the plurality of minimum terms in the Euclidean space; and mapping the at least one target minimum term set onto the quantum circuit using a double-controlled NOT gate to generate a target quantum circuit.

[0006] According to an embodiment of the present disclosure, the above-mentioned determination of at least one target minimum term set based on the mapping positions of the above-mentioned multiple minimum terms in the Euclidean space includes: determining at least one candidate minimum term set from the above-mentioned minimum term set; in a case where the mapping positions of the four candidate minimum terms included in the above-mentioned candidate minimum term set in the above-mentioned Euclidean space do not satisfy the above-mentioned parallelogram condition, adjusting the quantum bit state included in the above-mentioned at least one candidate minimum term by using a single controlled NOT gate and / or a triple controlled NOT gate until the mapping positions of the four candidate minimum terms included in the above-mentioned candidate minimum term set in the above-mentioned Euclidean space satisfy the above-mentioned parallelogram condition; and determining the above-mentioned candidate minimum term set that satisfies the above-mentioned parallelogram condition as the target minimum term set.

[0007] According to an embodiment of the present disclosure, the above-mentioned use of a single controlled NOT gate and / or a triple controlled NOT gate to adjust the quantum bit state included in the above-mentioned at least one candidate minimum term until the mapping positions of the four candidate minimum terms included in the above-mentioned candidate minimum term set in the above-mentioned Euclidean space meet the above-mentioned parallelogram condition, including: using the above-mentioned single controlled NOT gate and / or the above-mentioned three controlled NOT gates to adjust the quantum bit state included in the above-mentioned at least one candidate minimum term to obtain the adjusted quantum bit state of the above-mentioned at least one candidate minimum term; and based on the adjusted quantum bit state of the above-mentioned at least one candidate minimum term, updating the mapping position of the above-mentioned at least one candidate minimum term in the above-mentioned Euclidean space until the mapping positions of the four candidate minimum terms included in the above-mentioned candidate minimum term set in the above-mentioned Euclidean space meet the above-mentioned parallelogram condition.

[0008] According to an embodiment of the present disclosure, the above-mentioned use of a double-controlled NOT gate to map the above-mentioned at least one target minimum term set onto the above-mentioned quantum circuit to generate a target quantum circuit includes: using a double-controlled NOT gate to map the above-mentioned at least one target minimum term set onto the above-mentioned quantum circuit to generate a first target subcircuit; based on the four target minimum terms included in the above-mentioned at least one target minimum term set, the above-mentioned minimum term set is updated to obtain an updated minimum term set, wherein the above-mentioned updated minimum term set includes the remaining minimum terms except the above-mentioned four target minimum terms; using the above-mentioned double-controlled NOT gate to map the above-mentioned updated minimum term set onto the above-mentioned quantum circuit to generate a second target subcircuit; and based on the above-mentioned first target subcircuit and the second target subcircuit, the above-mentioned target quantum circuit is obtained.

[0009] According to an embodiment of the present disclosure, the above-mentioned use of the above-mentioned double-controlled NOT gate to map the above-mentioned updated minimum term set on the above-mentioned quantum circuit to generate a second target subcircuit includes: when the mapping positions of the four remaining minimum terms included in the above-mentioned updated minimum term set in the above-mentioned Euclidean space do not satisfy the above-mentioned parallelogram condition, using the above-mentioned single-controlled NOT gate and / or the above-mentioned triple-controlled NOT gate to adjust the quantum bit state included in the above-mentioned at least one remaining minimum term until the mapping positions of the above-mentioned four remaining minimum terms in the above-mentioned Euclidean space satisfy the above-mentioned parallelogram condition; determining the above-mentioned four remaining minimum terms that satisfy the above-mentioned parallelogram condition as the target remaining minimum term set; and using the above-mentioned double-controlled NOT gate to map the above-mentioned target remaining minimum term set on the above-mentioned quantum circuit to generate the second target subcircuit.

[0010] According to an embodiment of the present disclosure, the above method also includes: according to the initial mapping relationship, mapping the combination of multiple quantum bit states included in the above global truth table respectively at multiple vertices included in the preset cube configuration in the above Euclidean space to determine the mapping positions of the multiple minimum terms included in the above minimum term set in the above Euclidean space.

[0011] According to an embodiment of the present disclosure, the method further includes: encapsulating the multiple quantum gates included in the target quantum circuit to obtain an encapsulation module of the target quantum circuit, wherein the encapsulation module is configured to provide an input / output interface of a Cirq library.

[0012] Another aspect of the present disclosure provides a quantum circuit generation device based on a balanced Boolean function, comprising: an extraction module, used to extract a minimum term set from a global truth table of the balanced Boolean function; a determination module, used to determine at least one target minimum term set based on the mapping positions of the multiple minimum terms in the Euclidean space; and a mapping module, used to map the at least one target minimum term set onto the quantum circuit using a double-controlled NOT gate to generate a target quantum circuit.

[0013] Another aspect of the present disclosure provides an electronic device, comprising: one or more processors; and a memory for storing one or more programs, wherein when the one or more programs are executed by the one or more processors, the one or more processors implement the above-mentioned method.

[0014] Another aspect of the present disclosure provides a computer-readable storage medium storing computer-executable instructions, which are used to implement the above method when executed.

[0015] Another aspect of the present disclosure provides a computer program product, the computer program product comprising computer executable instructions, and the instructions are used to implement the above method when executed.

[0016] According to the embodiments of the present disclosure, by extracting all possible minimum terms in the global truth table of the quantum bit balanced Boolean function, and based on the parallelogram condition of the geometric representation, all possible minimum terms are integrated into the target quantum circuit using double-controlled NOT gates, thereby realizing the conversion from the input truth table to the target quantum circuit without using auxiliary bits, thereby reducing the complexity and resource requirements of the circuit; in addition, complex circuit functions can also be better realized when the number of control bits is small. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] The above and other objects, features and advantages of the present disclosure will become more apparent through the following description of the embodiments of the present disclosure with reference to the accompanying drawings, in which:

[0018] Figure 1 The flowchart of the method for generating a quantum circuit based on a balanced Boolean function according to an embodiment of the present disclosure is schematically shown;

[0019] Figure 2A schematic diagram of a global truth table based on geometric representation according to a specific embodiment of the present disclosure is schematically shown;

[0020] Figure 3 A schematic diagram of a target quantum circuit according to a specific embodiment of the present disclosure is schematically shown;

[0021] Figure 4 A schematic diagram of a global truth table based on geometric representation according to a specific embodiment of the present disclosure is schematically shown;

[0022] Figure 5 The schematic diagram of a target quantum circuit according to another specific embodiment of the present disclosure is schematically shown;

[0023] Figure 6 A block diagram schematically shows a quantum circuit generation device based on a balanced Boolean function according to an embodiment of the present disclosure; and

[0024] Figure 7 A block diagram of an electronic device suitable for implementing a quantum circuit generation method based on a balanced Boolean function according to an embodiment of the present disclosure is schematically shown. DETAILED DESCRIPTION

[0025] Hereinafter, embodiments of the present disclosure will be described with reference to the accompanying drawings. However, it should be understood that these descriptions are exemplary only and are not intended to limit the scope of the present disclosure. In the following detailed description, for ease of explanation, many specific details are set forth to provide a comprehensive understanding of the embodiments of the present disclosure. However, it is apparent that one or more embodiments may also be implemented without these specific details. In addition, in the following description, descriptions of known structures and technologies are omitted to avoid unnecessary confusion of the concepts of the present disclosure.

[0026] The terms used herein are only for describing specific embodiments and are not intended to limit the present disclosure. The terms "comprise", "include", etc. used herein indicate the existence of the features, steps, operations and / or components, but do not exclude the existence or addition of one or more other features, steps, operations or components.

[0027] All terms (including technical and scientific terms) used herein have the meanings commonly understood by those skilled in the art unless otherwise defined. It should be noted that the terms used herein should be interpreted as having a meaning consistent with the context of this specification and should not be interpreted in an idealized or overly rigid manner.

[0028] When using expressions such as "at least one of A, B, and C, etc.", they should generally be interpreted according to the meaning of the expression commonly understood by those skilled in the art (for example, "a system having at least one of A, B, and C" should include but is not limited to a system having A alone, B alone, C alone, A and B, A and C, B and C, and / or A, B, C, etc.).

[0029] In a quantum computer, the execution of a quantum algorithm generally requires multiple steps, including program generation, hardware-related program compilation, and actual hardware execution. Among them, quantum program generation starts from the quantum algorithm and converts the calculation process in the algorithm into a quantum program circuit. The implementation of any quantum algorithm requires first designing the corresponding quantum functions and quantum circuits, and using appropriate quantum gates and quantum functions to implement the corresponding operations, thereby executing the corresponding algorithm.

[0030] Boolean functions play a fundamental role in the design of classical computer chips. Unlike classical computers, many classical logical operations are not easy to construct in quantum circuits, such as AND operations. On the contrary, XOR operations are naturally implemented by CNOT gates. Therefore, it is very necessary to effectively implement Boolean functions. However, due to the special nature of quantum computing, quantum gate operations have fidelity problems, quantum decoherence, and the inability to perform continuous quantum error correction. These distortion effects will be superimposed, resulting in a greater possibility of erroneous results. Therefore, it becomes particularly important to design efficient quantum circuits to implement Boolean functions.

[0031] Existing quantum circuit synthesis methods include the XOR-AND Graph (XAG) method and the Exclusive Sum of Products (ESOP) method. The XAG method uses XOR and AND logic gates to represent functions. However, the XAG method requires auxiliary bits to store intermediate results, which increases the complexity of the circuit and the possible error rate. The ESOP method usually requires a large number of multi-control Toffoli (MCT) gates and control bits. As the number of control bits increases, the complexity of the multi-control Toffoli gate operation will also increase, thereby increasing the possibility of errors. Therefore, the fidelity of these gates in quantum circuits is low.

[0032] In view of this, the embodiments of the present disclosure extract all possible minimum terms in the global truth table of the quantum bit balanced Boolean function, and based on the parallelogram condition of the geometric representation, use double-controlled NOT gates to synthesize all possible minimum terms into a target quantum circuit, thereby realizing the conversion from the input truth table to the target quantum circuit without using auxiliary bits, thereby reducing the complexity and resource requirements of the circuit; in addition, complex circuit functions can also be better realized when the number of control bits is small.

[0033] Specifically, an embodiment of the present disclosure provides a quantum circuit generation method based on a balanced Boolean function, comprising: extracting a minimum term set from a global truth table of a balanced Boolean function; determining at least one target minimum term set based on mapping positions of multiple minimum terms in Euclidean space; and mapping at least one target minimum term set onto a quantum circuit using a double-controlled NOT gate to generate a target quantum circuit.

[0034] It should be noted that the quantum circuit generation method, device and electronic device based on balanced Boolean functions determined in the embodiments of the present disclosure can be used in the field of quantum information technology, such as the field of quantum circuit mapping technology and the field of quantum computing technology. The parallel mapping method and device of quantum circuits determined in the embodiments of the present disclosure can also be used in any field other than the field of quantum information technology, and the application field of the parallel mapping method and device of quantum circuits determined in the embodiments of the present disclosure is not limited.

[0035] According to the embodiments of the present disclosure, a quantum bit is the most basic unit in quantum computing, which can represent a superposition state of 0 and 1, and a quantum logic gate is the most basic control mode in quantum computing. In quantum computing, we may use quantum logic gates and quantum circuits to construct and operate quantum bits to achieve the purpose of controlling circuits. Among them, quantum logic gates include single-bit quantum logic gates and multi-bit quantum logic gates.

[0036] According to an embodiment of the present disclosure, the numbering of quantum bits can be represented by digital subscripts in quantum algorithms or quantum programs. For example, a group of quantum bits is q0, q1, and q2, which can represent the 0th, 1st, and 2nd quantum bits respectively.

[0037] According to an embodiment of the present disclosure, a Boolean function can be used to describe and process logic problems, which accepts one or more Boolean values ​​(i.e., true or false, usually represented by 1 and 0) as input and returns a Boolean value as output. The input of a Boolean function can be one or more Boolean variables, and the output is a single Boolean value, which is calculated based on the value of the input Boolean variable. This calculation is performed through logical operators (such as AND, OR, NOT, etc.). In quantum computing, the input and output of a Boolean function can be quantum bits.

[0038] According to an embodiment of the present disclosure, a balanced Boolean function is used to characterize a Boolean function whose output is 1 and whose output is 0 are approximately equal to each other for all possible inputs. Specifically, for an n-ary Boolean function (i.e., a function that accepts n Boolean values ​​as inputs), if, among all 2^n possible input combinations, the number of times the output is 1 is equal to the number of times the output is 0, or the difference between the two does not exceed 1, then the function is called a balanced Boolean function.

[0039] Figure 1 The flowchart of the method for generating a quantum circuit based on a balanced Boolean function according to an embodiment of the present disclosure is schematically shown.

[0040] like Figure 1 As shown, the method includes operations S101 to S103.

[0041] In operation S101 , a minimum term set is extracted from a global truth table of a balanced Boolean function.

[0042] According to an embodiment of the present disclosure, the global truth table of a balanced Boolean function can be used to represent a complete list of all possible input variable combinations of the Boolean function and their corresponding calculated values, wherein the calculated values ​​can be used to represent the output result of the balanced Boolean function.

[0043] Specifically, for a balanced Boolean function with n inputs, its global truth table has 2 n Each row represents a possible combination of input variables, and each column represents a proposition or logical expression, as well as the true or false values ​​of these propositions or expressions. n Among the possible input variable combinations, the number of rows with output result of 1 is roughly equal to the number of rows with output result of 0.

[0044] According to an embodiment of the present disclosure, in quantum computing, due to the characteristics of quantum computing, the input qubit and the output qubit may not directly represent a definite value (such as 0 or 1), but are in a superposition state. By measuring the input qubit state and the output qubit state, it can be determined that the qubit state is 0 or 1. Therefore, in the global truth table corresponding to the balanced Boolean function whose input variables are multiple qubit states, each row can represent a possible combination of qubit states, and each column can represent the measurement result of a qubit state.

[0045] For example, based on a 4-qubit balanced Boolean function, the input variables are four qubits q0, q1, q2, and q3. If the states of these four qubits are measured, 16 possible combinations of qubit states and the measurement results of each qubit state can be obtained to form the global truth table of the 4-qubit balanced Boolean function. Among them, the combination of qubit states with an output result of 1 and an output result of 0 can have 8 rows each, and the combination of qubit states can be represented in binary, such as (q0, q1, q2, q3) is represented as 1111, and (q0', q1', q2', q3') is represented as 0000.

[0046] According to an embodiment of the present disclosure, in the global truth table of the balanced Boolean function, each row of the combination of quantum bit states with an output result of 1 can be used as a minimum term, and multiple combinations of quantum bit states with an output result of 1 are extracted from the global truth table as a minimum term set. In a specific embodiment of the present disclosure, the minimum term set can include all minimum terms in the global truth table.

[0047] In operation S102, at least one target minterm set is determined based on the mapping positions of the plurality of minterms in the Euclidean space.

[0048] According to an embodiment of the present disclosure, the combination of the quantum bit states of each minterm in the minterm set can be used as a mapping point in the Euclidean space, and based on the mapping positions of multiple minterms in the Euclidean space, a target minterm set that satisfies the parallelogram condition is determined. The target minterm set includes four minterms in the minterm set that satisfy the parallelogram condition, and the parallelogram condition can be used to characterize that the four minterms form a parallelogram in the Euclidean space.

[0049] According to a specific embodiment of the present disclosure, the mapping positions of multiple minimum terms in Euclidean space can be determined based on the coordinates of the mapping points, and the parallelogram condition can also include that the four minimum terms satisfy the geometric properties of the parallelogram in the Euclidean space. For example, if the coordinates of the four points A, B, C, and D corresponding to any four minimum terms in the multiple minimum terms in the Euclidean space respectively satisfy the vector relationship that vector AB is equal to vector DC, and vector BC is equal to vector AD, then these four minimum terms can be considered to satisfy the parallelogram condition.

[0050] In operation S103, at least one target minimum term set is mapped onto a quantum circuit using a double-controlled NOT gate to generate a target quantum circuit.

[0051] According to an embodiment of the present disclosure, in quantum computing, a double controlled NOT gate (also called a Toffoli gate or a CCNOT gate) is a three-qubit gate having a target bit and two control bits. The double controlled NOT gate can be used to perform a NOT gate operation on the target bit based on the states of the two control bits, i.e., flip the state of the target qubit.

[0052] According to the embodiments of the present disclosure, a double-controlled NOT gate can be used to map a target minimum term set that satisfies a parallelogram onto a quantum circuit, and a subcircuit that performs four minimum term operations in the target minimum term is synthesized until all minimum terms included in the minimum term set are synthesized into the quantum circuit to generate a target quantum circuit. Among them, a single-controlled NOT gate and a double-controlled NOT gate can also be used to combine to synthesize a target minimum term set that satisfies a parallelogram.

[0053] The embodiments of the present disclosure extract all possible minimum terms in the global truth table of the quantum bit balanced Boolean function, and based on the parallelogram condition of the geometric representation, use double-controlled NOT gates to synthesize all possible minimum terms into a target quantum circuit, thereby realizing the conversion from the input truth table to the target quantum circuit without using auxiliary bits, thereby reducing the complexity and resource requirements of the circuit; in addition, complex circuit functions can also be better realized when the number of control bits is small.

[0054] According to an embodiment of the present disclosure, based on the mapping positions of multiple minima in Euclidean space, determining at least one target minima set includes: determining at least one candidate minima set from the minima set; when the mapping positions of four candidate minima included in the candidate minima set in Euclidean space do not satisfy the parallelogram condition, adjusting the mapping position of at least one candidate minima in Euclidean space using a single-controlled NOT gate and / or a triple-controlled NOT gate until the mapping positions of the four candidate minima included in the candidate minima set in Euclidean space satisfy the parallelogram condition; and determining the candidate minima set that satisfies the parallelogram condition as the target minima set.

[0055] According to an embodiment of the present disclosure, the candidate minterm set includes four candidate minterms, and the four candidate minterms may be any four minterms included in the minterm set.

[0056] According to an embodiment of the present disclosure, a single controlled NOT gate (also called a CNOT gate) is a two-qubit gate having a target bit and a control bit. The single controlled NOT gate can perform a NOT gate operation on the target bit based on the state of the control bit, i.e., flip the state of the target bit.

[0057] According to an embodiment of the present disclosure, a three-controlled NOT gate (also called a 3-MCT gate) is a four-qubit gate having a target bit and three control bits. The three-controlled NOT gate can perform a NOT gate operation on the target bit based on the states of the three control bits, i.e., flip the state of the target bit.

[0058] According to an embodiment of the present disclosure, for each candidate minimum term set including four minimum terms, it is determined whether its mapping position in the Euclidean space satisfies the parallelogram condition. If the parallelogram condition is satisfied, the candidate minimum term set can be determined as the target minimum term set. If the parallelogram condition is not satisfied, a single controlled NOT gate and / or a triple controlled NOT gate can be used to adjust the quantum bit state included in one or more candidate minimum terms in the four candidate minimum terms.

[0059] According to an embodiment of the present disclosure, adjusting the mapping position of at least one candidate minterm in Euclidean space using a single controlled NOT gate and / or a triple controlled NOT gate until the mapping positions of four candidate minterms included in the candidate minterm set in Euclidean space meet the parallelogram condition includes: adjusting the quantum bit state included in at least one candidate minterm using a single controlled NOT gate and / or a triple controlled NOT gate to obtain the adjusted quantum bit state of at least one candidate minterm: updating the mapping position of at least one candidate minterm in Euclidean space based on the adjusted quantum bit state of at least one candidate minterm until the mapping positions of the four candidate minterms included in the candidate minterm set in Euclidean space meet the parallelogram condition.

[0060] According to an embodiment of the present disclosure, for the spatial properties of each of the four candidate minterms included in the candidate minterm set, a single controlled NOT gate and / or a triple controlled NOT gate is used to flip the state of the target quantum bit according to the state of the control quantum bit, so as to realize the conversion of the quantum bit state of one or more candidate minterms, thereby indirectly updating the mapping position of the candidate minterm in the Euclidean space.

[0061] For example, three controlled NOT gates, or a combination of a single controlled NOT gate and a double controlled NOT gate can be used to realize the conversion from the combination 1100 of the measured quantum bit state represented in binary to 0010. In this scenario, the combination of three controlled NOT gates or a single controlled NOT gate and a double controlled NOT gate can be used to represent (1100, 0010).

[0062] According to an embodiment of the present disclosure, based on the mapping position of the quantum bit state in the multidimensional space after adjustment of at least one candidate minimum term, it is determined whether the mapping positions of the four currently selected candidate minimum terms in the Euclidean space satisfy the parallelogram condition. If the parallelogram condition is not satisfied, the above steps are repeated to select another candidate minimum term for adjustment until the mapping positions of all selected candidate minimum terms in the Euclidean space satisfy the parallelogram condition.

[0063] According to an embodiment of the present disclosure, when the four candidate minterms satisfy the parallelogram condition, the quantum gate for adjusting the quantum bit state and the double-controlled NOT gate for generating the target quantum circuit can be integrated into the quantum circuit to obtain the final target quantum circuit.

[0064] The embodiments of the present disclosure use a combination of three controlled NOT gates and / or a single controlled NOT gate and a double controlled NOT gate to adjust the quantum bit state so that the candidate minimum term set satisfies the geometric constraints of a parallelogram, so that these minimum terms can be constructed into a target quantum circuit using a double controlled NOT gate, thereby improving the flexibility of quantum circuit synthesis generation and helping to reduce the number of quantum gate operations to reduce the complexity of quantum computing.

[0065] According to an embodiment of the present disclosure, mapping at least one target minimum term set onto a quantum circuit using a double-controlled NOT gate to generate a target quantum circuit includes: mapping at least one target minimum term set onto a quantum circuit using a double-controlled NOT gate to generate a first target subcircuit; updating the minimum term set based on four target minimum terms included in the at least one target minimum term set to obtain an updated minimum term set; mapping the updated minimum term set onto the quantum circuit using a double-controlled NOT gate to generate a second target subcircuit; and obtaining the target quantum circuit based on the first target subcircuit and the second target subcircuit.

[0066] According to an embodiment of the present disclosure, for a first target minterm set that satisfies the parallelogram condition, the logic functions of the four minterms in the target minterm set are mapped onto a quantum circuit using a double-controlled NOT gate or a combination of a single-controlled NOT gate and a double-controlled NOT gate to generate a first target subcircuit.

[0067] According to an embodiment of the present disclosure, after the first target subcircuit is generated, the minimum term set is updated based on the four target minimum terms included in the first target minimum term set that has been processed. Specifically, the four target minimum terms that have been implemented in the first target subcircuit can be removed from the initial minimum term set to obtain an updated minimum term set consisting of the remaining minimum terms.

[0068] According to an embodiment of the present disclosure, if the mapping positions of the four remaining minterms included in the updated minterm set in the Euclidean space do not satisfy the parallelogram condition, the quantum bit state included in at least one remaining minterm is adjusted using a single controlled NOT gate and / or a triple controlled NOT gate until the mapping positions of the four remaining minterms in the Euclidean space satisfy the parallelogram condition.

[0069] According to an embodiment of the present disclosure, four remaining minimum terms that satisfy the parallelogram condition are determined as a target remaining minimum term set.

[0070] According to an embodiment of the present disclosure, the remaining minimum terms in the target remaining minimum term set are mapped on the quantum circuit using a double-controlled NOT gate or a combination of a single-controlled NOT gate and a double-controlled NOT gate to generate a second target subcircuit, and the four target minimum terms that have been implemented in the second target subcircuit are removed from the updated minimum term set.

[0071] According to an embodiment of the present disclosure, the first target subcircuit and the second target subcircuit are combined together to form a complete target quantum circuit.

[0072] The embodiments of the present disclosure convert a target minimal term set into multiple target subcircuits until all the minimal terms included in the minimal term set are converted into target quantum circuits through continuous iteration, wherein each target subcircuit is constructed based on a set of simple minimal terms that meet specific conditions, and a complex quantum circuit is constructed in a modular way, thereby reducing the complexity of the overall circuit.

[0073] According to an embodiment of the present disclosure, the quantum circuit generation method based on balanced Boolean functions also includes: according to the initial mapping relationship, mapping the combination of multiple quantum bit states included in the global truth table to multiple vertices included in a preset cube configuration in the Euclidean space respectively, so as to determine the mapping positions of multiple minimum terms included in the minimum term set in the Euclidean space.

[0074] According to an embodiment of the present disclosure, a plurality of quantum gates included in a target quantum circuit are packaged to obtain a packaged module of the target quantum circuit.

[0075] According to an embodiment of the present disclosure, in the process of optimizing a quantum circuit, equivalent conversion of quantum gates, merging of adjacent gates, or application of quantum compilation and circuit optimization algorithms may be used to reduce the number and complexity of gates in the circuit.

[0076] According to an embodiment of the present disclosure, the optimized target quantum circuit can be encapsulated as a function or a class, which accepts input quantum bits and applies the circuit logic of the target quantum circuit, so that the function or class can be reused in other quantum algorithms.

[0077] According to an embodiment of the present disclosure, for a packaged circuit, an input / output interface for accessing a database, such as an interface of an open source Cirq library, can be provided to directly generate a circuit that can be used by it. Among them, the Cirq library provides a rich interface and functions to support the creation, simulation and execution of quantum circuits.

[0078] Figure 2 A schematic diagram of a global truth table based on geometric representation according to a specific embodiment of the present disclosure is schematically shown.

[0079] Figure 3 The figure schematically shows a schematic diagram of a target quantum circuit according to a specific embodiment of the present disclosure.

[0080] According to a specific embodiment of the present disclosure, a global truth table based on a 4-qubit balanced Boolean function is shown in Table 1. The global truth table has 16 rows, wherein the input variables are four qubit states, respectively represented as q0, q1, q2, and q3, each row can represent a possible combination of qubit states, and each column can represent a measurement result of a qubit state. q4 represents the output result of the 4-qubit balanced Boolean function.

[0081] Based on the global truth table shown in Table 1, each row in Table 1 is mapped to multiple vertices of the preset cube configuration in the Euclidean space to determine the mapping positions of multiple minimum terms included in the minimum term set in the Euclidean space. The minimum term set is {0000, 0011, 0101, 0110, 0111, 1001, 1010, 1100}, and the minimum term set is described in decimal as {0, 3, 5, 6, 7, 9, 10, 12}.

[0082] Table 1

[0083]

[0084] like Figure 2 As shown, each black vertex represents a minimum term, and the output value corresponding to its coordinates is 1, and each white vertex represents a remaining term in the global truth table, and the output value corresponding to its coordinates is 0.

[0085] For the convenience of description, the coordinates are described in decimal in the specific embodiment of the present disclosure. In the circuit of this specific embodiment, a double-controlled NOT gate (Toffoli gate) can represent 4 minimum terms, and a triple-controlled NOT gate (3-MCT gate) can represent 2 special minimum terms. The same minimum term is not selected after being covered twice.

[0086] Based on the mapping position of each minimum term included in the minimum term set in the Euclidean space, four candidate minimum terms {0, 3, 9, 10} are randomly selected from them. Since these four candidate minimum terms do not meet the parallelogram condition, a double-controlled NOT gate (Toffoli gate) and two single-controlled NOT gates (CNOT gates) can be used to construct the minimum term {0, 3, 8, 11} that meets the parallelogram condition, and then a double-controlled NOT gate (Toffoli gate) is used to construct the minimum term {8, 9, 10, 11} that meets the parallelogram condition. Since {8, 11} is covered twice, the same minimum term is covered twice, which is equivalent to not being selected. Therefore, the first target subcircuit that realizes the logic function of the minimum term {0, 3, 9, 10} is finally constructed using two single-controlled NOT gates and two double-controlled NOT gates.

[0087] Remove {0, 3, 9, 10} from the minimum term set, and the updated minimum term set is {5, 6, 7, 12}. Since the four remaining minimum terms do not meet the parallelogram condition, we can first use a three-controlled NOT gate (3-MCT gate) to represent {4, 12}, and map the minimum term 1100 with a decimal value of 12 to the mapping point of the remaining term 0100 with a decimal value of 4, so that the four remaining minimum terms can be transformed into the target minimum terms that meet the parallelogram condition. At this time, the updated minimum term set becomes {4, 5, 6, 7}, and for this set, a double-controlled NOT gate (Toffoli gate) can be used to construct it. Therefore, the second target subcircuit that realizes the logical function of the minimum term {0, 3, 9, 10} is finally constructed using a three-controlled NOT gate and two double-controlled NOT gates. Combining the first target subcircuit and the second target subcircuit, we can get the following Figure 3 The target quantum circuit is shown.

[0088] Figure 4 A schematic diagram of a global truth table based on geometric representation according to a specific embodiment of the present disclosure is schematically shown.

[0089] Figure 5 A schematic diagram of a target quantum circuit according to another specific embodiment of the present disclosure is schematically shown.

[0090] According to another specific embodiment of the present disclosure, a global truth table based on a 4-qubit balanced Boolean function is shown in Table 2.

[0091] Based on the global truth table shown in Table 2, each row in Table 2 is mapped to multiple vertices of the preset cube configuration in the Euclidean space to determine the mapping positions of multiple minimum terms included in the minimum term set in the Euclidean space. Among them, the minimum term set is {0010, 0101, 0110, 0111, 1000, 1001, 1011, 1100}, and the minimum term set is described in decimal as {2, 5, 6, 7, 8, 9, 11, 12}.

[0092] Table 2

[0093]

[0094] like Figure 4 As shown, based on the mapping position of each minimum term included in the minimum term set in the Euclidean space, four candidate minimum terms {2, 6, 8, 12} are randomly selected therein, and a double-controlled NOT gate (Toffoli gate) and two single-controlled NOT gates (CNOT gates) are used to construct a first target subcircuit to realize the logic function of the minimum term {2, 6, 8, 12}.

[0095] Remove {2, 6, 8, 12} from the minimum term set, and the updated minimum term set is {5, 7, 9, 11}. A double-controlled NOT gate (Toffoli gate) and two single-controlled NOT gates (CNOT gates) can be used to construct a second target subcircuit to implement the logic function of the minimum term {5, 7, 9, 11}. By combining the first target subcircuit and the second target subcircuit, we can get Figure 5 The target quantum circuit is shown.

[0096] According to another specific embodiment of the present disclosure, Table 3 shows the optimization effect of the quantum circuit generation method based on balanced Boolean functions, including the number of quantum gates and circuit depth in the quantum circuit of all 4-qubit balanced Boolean functions.

[0097] Table 3

[0098]

[0099] As shown in Table 3, by comparing with the current mainstream ESOP method that does not use auxiliary bits, the quantum circuit generation method based on balanced Boolean functions proposed in the embodiment of the present disclosure reduces the number of CNOT gates by 55.6%, the number of single-bit gates by 61.3%, the number of double-bit gates by 56.0%, and the circuit depth by 61.3%. By converting the global truth table of any 4-qubit balanced Boolean function into a target quantum circuit, only one triple-controlled NOT gate is required at most, and the optimal quantum circuit generation method can be achieved without using auxiliary bits, thereby saving quantum bit resources and achieving better operating results in current quantum devices.

[0100] Figure 6 A block diagram of a quantum circuit generation device based on a balanced Boolean function according to an embodiment of the present disclosure is schematically shown.

[0101] like Figure 6 As shown, the quantum circuit generation device based on balanced Boolean function includes an extraction module 610 , a determination module 620 , and a mapping module 630 .

[0102] The extraction module 610 is used to extract a minimum term set from the global truth table of the balanced Boolean function.

[0103] The determination module 620 is used to determine at least one target minimum term set based on the mapping positions of the multiple minimum terms in the Euclidean space.

[0104] The mapping module 630 is used to map at least one target minimum term set onto a quantum circuit using a double-controlled NOT gate to generate a target quantum circuit.

[0105] According to an embodiment of the present disclosure, the determination module 620 includes a first determination submodule, a first adjustment submodule, and a second determination submodule.

[0106] The first determination submodule is used to determine at least one candidate minimum item set from the minimum item set.

[0107] The first adjustment submodule is used to adjust the quantum bit state included in at least one candidate minimum term by using a single controlled NOT gate and / or a triple controlled NOT gate when the mapping positions of the four candidate minimum terms included in the candidate minimum term set in the Euclidean space do not satisfy the parallelogram condition, until the mapping positions of the four candidate minimum terms included in the candidate minimum term set in the Euclidean space satisfy the parallelogram condition.

[0108] The second determination submodule is used to determine the candidate minimum term set that meets the parallelogram condition as the target minimum term set.

[0109] According to an embodiment of the present disclosure, the first adjustment submodule includes a first adjustment unit and a first updating unit.

[0110] The first adjustment unit is used to adjust the quantum bit state included in at least one candidate minimum term by using a single controlled NOT gate and / or a triple controlled NOT gate to obtain the quantum bit state after the adjustment of the at least one candidate minimum term.

[0111] The first updating unit is used to update the mapping position of at least one candidate minimum term in the Euclidean space based on the adjusted quantum bit state of at least one candidate minimum term, until the mapping positions of four candidate minimum terms included in the candidate minimum term set in the Euclidean space meet the parallelogram condition.

[0112] According to an embodiment of the present disclosure, the mapping module 630 includes a first mapping submodule, a first updating submodule, a second mapping submodule, and a third determining submodule.

[0113] The first mapping submodule is used to map at least one target minimum term set onto a quantum circuit using a double-controlled NOT gate to generate a first target subcircuit.

[0114] The first updating submodule is used to update the minimum item set based on four target minimum items included in at least one target minimum item set to obtain an updated minimum item set.

[0115] The second mapping submodule is used to map the updated minimum term set onto the quantum circuit using a double-controlled NOT gate to generate a second target subcircuit.

[0116] The third determination submodule is used to obtain a target quantum circuit based on the first target subcircuit and the second target subcircuit.

[0117] According to an embodiment of the present disclosure, the second mapping submodule includes

[0118] The second adjustment unit is used to adjust the quantum bit state included in at least one remaining minimum term using a single controlled NOT gate and / or a triple controlled NOT gate when the mapping positions of the four remaining minimum terms included in the updated minimum term set in the Euclidean space do not satisfy the parallelogram condition, until the mapping positions of the four remaining minimum terms in the Euclidean space satisfy the parallelogram condition.

[0119] The first determining unit is used to determine four remaining minimum terms that meet the parallelogram condition as a target remaining minimum term set.

[0120] The first mapping unit is used to map the target residual minimum term set onto the quantum circuit by using a double-controlled NOT gate to generate a second target subcircuit.

[0121] According to an embodiment of the present disclosure, the quantum circuit generation device based on balanced Boolean functions further includes a mapping position determination module.

[0122] A mapping position determination module is used to map the combination of multiple quantum bit states included in the global truth table at multiple vertices included in a preset cube configuration in the Euclidean space according to an initial mapping relationship, so as to determine the mapping positions of multiple minimum terms included in the minimum term set in the Euclidean space.

[0123] According to an embodiment of the present disclosure, the quantum circuit generation device based on balanced Boolean functions further includes a packaging module.

[0124] The encapsulation module is used to encapsulate multiple quantum gates included in the target quantum circuit to obtain the encapsulation module of the target quantum circuit.

[0125] According to the embodiments of the present invention, any one or more of the modules, submodules, units, and subunits, or at least part of the functions of any one of them can be implemented in one module. According to the embodiments of the present invention, any one or more of the modules, submodules, units, and subunits can be split into multiple modules for implementation. According to the embodiments of the present invention, any one or more of the modules, submodules, units, and subunits can be at least partially implemented as hardware circuits, such as field programmable gate arrays (FPGAs), programmable logic arrays (PLAs), systems on chips, systems on substrates, systems on packages, application specific integrated circuits (ASICs), or can be implemented by hardware or firmware in any other reasonable way of integrating or packaging circuits, or can be implemented in any one of the three implementation methods of software, hardware, and firmware, or in any appropriate combination of any of them. Alternatively, according to the embodiments of the present invention, one or more of the modules, submodules, units, and subunits can be at least partially implemented as computer program modules, and when the computer program modules are run, the corresponding functions can be performed.

[0126] For example, any multiple of the extraction module 610, the determination module 620, and the mapping module 630 can be combined in one module / unit / sub-unit for implementation, or any one of the modules / units / sub-units can be split into multiple modules / units / sub-units. Alternatively, at least part of the functions of one or more of these modules / units / sub-units can be combined with at least part of the functions of other modules / units / sub-units and implemented in one module / unit / sub-unit. According to an embodiment of the present disclosure, at least one of the extraction module 610, the determination module 620, and the mapping module 630 can be at least partially implemented as a hardware circuit, such as a field programmable gate array (FPGA), a programmable logic array (PLA), a system on a chip, a system on a substrate, a system on a package, an application specific integrated circuit (ASIC), or can be implemented by hardware or firmware such as any other reasonable way of integrating or packaging the circuit, or implemented in any one of the three implementation methods of software, hardware, and firmware, or in any appropriate combination of any of them. Alternatively, at least one of the extraction module 610 , the determination module 620 , and the mapping module 630 may be at least partially implemented as a computer program module, and when the computer program module is executed, the corresponding function may be performed.

[0127] It should be noted that the part of the quantum circuit generation device based on balanced Boolean function in the embodiments of the present disclosure corresponds to the part of the quantum circuit generation method based on balanced Boolean function in the embodiments of the present disclosure. The description of the quantum circuit generation device based on balanced Boolean function specifically refers to the part of the quantum circuit generation method based on balanced Boolean function, which will not be repeated here.

[0128] Figure 7 A block diagram of an electronic device suitable for implementing a quantum circuit generation method based on a balanced Boolean function according to an embodiment of the present disclosure is schematically shown. Figure 7 The electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.

[0129] like Figure 7 As shown, the electronic device according to the embodiment of the present disclosure includes a processor 701, which can perform various appropriate actions and processes according to the program stored in the read-only memory ROM 702 or the program loaded from the storage part 708 to the random access memory RAM 703. The processor 701 may include, for example, a general-purpose microprocessor (such as a CPU), an instruction set processor and / or a related chipset and / or a special-purpose microprocessor (for example, an application-specific integrated circuit (ASIC)), etc. The processor 701 may also include an on-board memory for caching purposes. The processor 701 may include a single processing unit or multiple processing units for performing different actions of the method flow according to the embodiment of the present disclosure.

[0130] In RAM 703, various programs and data required for the operation of the electronic device are stored. The processor 701, ROM 702, and RAM 703 are connected to each other via a bus 704. The processor 701 performs various operations of the method flow according to the embodiment of the present disclosure by executing the programs in ROM 702 and / or RAM 703. It should be noted that the program may also be stored in one or more memories other than ROM 702 and RAM 703. The processor 701 may also perform various operations of the method flow according to the embodiment of the present disclosure by executing the programs stored in the one or more memories.

[0131] According to an embodiment of the present disclosure, the electronic device may further include an input / output (I / O) interface 705, which is also connected to the bus 704. The electronic device may further include one or more of the following components connected to the input / output (I / O) interface 705: an input portion 706 including a keyboard, a mouse, etc.; an output portion 707 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc.; a storage portion 708 including a hard disk, etc.; and a communication portion 709 including a network interface card such as a LAN card, a modem, etc. The communication portion 709 performs communication processing via a network such as the Internet. A drive 710 is also connected to the input / output (I / O) interface 705 as needed. A removable medium 711, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 710 as needed, so that a computer program read therefrom is installed into the storage portion 708 as needed.

[0132] According to an embodiment of the present disclosure, the method flow according to an embodiment of the present disclosure can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a computer-readable storage medium, and the computer program contains a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from the network through the communication part 709, and / or installed from the removable medium 711. When the computer program is executed by the processor 701, the above-mentioned functions defined in the system of the embodiment of the present disclosure are executed. According to an embodiment of the present disclosure, the system, equipment, device, module, unit, etc. described above can be implemented by a computer program module.

[0133] The present disclosure also provides a computer-readable storage medium, which may be included in the device / apparatus / system described in the above embodiments; or may exist independently without being assembled into the device / apparatus / system. The above computer-readable storage medium carries one or more programs, and when the above one or more programs are executed, the method according to the embodiment of the present disclosure is implemented.

[0134] According to an embodiment of the present disclosure, the computer-readable storage medium may be a non-volatile computer-readable storage medium. For example, it may include but is not limited to: a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof. In the present disclosure, a computer-readable storage medium may be any tangible medium containing or storing a program that may be used by or in combination with an instruction execution system, apparatus, or device.

[0135] For example, according to an embodiment of the present disclosure, the computer-readable storage medium may include the ROM 702 and / or the RAM 703 described above and / or one or more memories other than the ROM 702 and the RAM 703 .

[0136] An embodiment of the present disclosure also includes a computer program product, which includes a computer program, and the computer program contains a program code for executing the method provided by the embodiment of the present disclosure. When the computer program product runs on an electronic device, the program code is used to enable the electronic device to implement the quantum circuit generation method based on balanced Boolean functions provided by the embodiment of the present disclosure.

[0137] When the computer program is executed by the processor 701, the above functions defined in the system / device of the embodiment of the present disclosure are executed. According to the embodiment of the present disclosure, the system, device, module, unit, etc. described above can be implemented by a computer program module.

[0138] In one embodiment, the computer program may rely on tangible storage media such as optical storage devices, magnetic storage devices, etc. In another embodiment, the computer program may also be transmitted and distributed in the form of signals on a network medium, and downloaded and installed through the communication part 709, and / or installed from the removable medium 711. The program code contained in the computer program may be transmitted using any appropriate network medium, including but not limited to: wireless, wired, etc., or any suitable combination of the above.

[0139] According to an embodiment of the present disclosure, the program code for executing the computer program provided by the embodiment of the present disclosure can be written in any combination of one or more programming languages. Specifically, these computing programs can be implemented using high-level process and / or object-oriented programming languages, and / or assembly / machine languages. Programming languages ​​include, but are not limited to, Java, C++, python, "C" language or similar programming languages. The program code can be executed entirely on the user computing device, partially on the user device, partially on the remote computing device, or entirely on the remote computing device or server. In the case of a remote computing device, the remote computing device can be connected to the user computing device through any type of network, including a local area network (LAN) or a wide area network (WAN), or can be connected to an external computing device (for example, using an Internet service provider to connect through the Internet).

[0140] The flowcharts and block diagrams in the accompanying drawings illustrate the possible implementation architecture, functions and operations of the systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each box in the flowchart or block diagram may represent a module, a program segment, or a part of a code, and the above-mentioned module, program segment, or a part of the code contains one or more executable instructions for implementing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box may also occur in an order different from that marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram or flowchart, and the combination of boxes in the block diagram or flowchart, can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions. It can be understood by those skilled in the art that the features recorded in the various embodiments of the present disclosure can be combined and / or combined in a variety of ways, even if such a combination or combination is not explicitly recorded in the present disclosure. In particular, without departing from the spirit and teaching of the present disclosure, the features described in the various embodiments of the present disclosure may be combined and / or combined in a variety of ways. All of these combinations and / or combinations fall within the scope of the present disclosure.

[0141] The embodiments of the present disclosure are described above. However, these embodiments are only for illustrative purposes and are not intended to limit the scope of the present disclosure. Although the embodiments are described above, this does not mean that the measures in the various embodiments cannot be used in combination to advantage. Without departing from the scope of the present disclosure, those skilled in the art may make a variety of substitutions and modifications, which should all fall within the scope of the present disclosure.

Claims

1. A method for generating a quantum circuit based on a balanced Boolean function, comprising: Extracting a minimum term set from a global truth table of the balanced Boolean function, wherein the minimum term set includes a plurality of minimum terms, and the minimum term is a combination of quantum bit states whose calculated values ​​in the global truth table are 1; Determine at least one target minimum term set based on the mapping positions of the multiple minimum terms in the Euclidean space, wherein the target minimum term set includes four minimum terms in the minimum term set that satisfy a parallelogram condition, and the parallelogram condition includes that the four minimum terms form a parallelogram in the Euclidean space; and The at least one target minimum term set is mapped onto the quantum circuit using a double-controlled NOT gate to generate a target quantum circuit.

2. The method according to claim 1, wherein: Determining at least one target minimum term set based on the mapping positions of the multiple minimum terms in the Euclidean space includes: Determine at least one candidate minimum item set from the minimum item sets; In the case where the mapping positions of the four candidate minimum terms included in the candidate minimum term set in the Euclidean space do not satisfy the parallelogram condition, Using a single controlled NOT gate and / or a triple controlled NOT gate, the quantum bit state included in the at least one candidate minimum term is adjusted until the mapping positions of the four candidate minimum terms included in the candidate minimum term set in the Euclidean space satisfy the parallelogram condition; and The candidate minimum term set satisfying the parallelogram condition is determined as a target minimum term set.

3. The method according to claim 2, wherein: The step of adjusting the quantum bit state included in the at least one candidate minimum term by using a single controlled NOT gate and / or a triple controlled NOT gate until the mapping positions of the four candidate minimum terms included in the candidate minimum term set in the Euclidean space satisfy the parallelogram condition comprises: Using the single controlled NOT gate and / or the triple controlled NOT gates, adjusting the quantum bit state included in the at least one candidate minterm to obtain the adjusted quantum bit state of the at least one candidate minterm; and Based on the adjusted quantum bit state of the at least one candidate minterm, the mapping position of the at least one candidate minterm in the Euclidean space is updated until the mapping positions of the four candidate minterms included in the candidate minterm set in the Euclidean space meet the parallelogram condition.

4. The method according to claim 1, wherein: The step of mapping the at least one target minimum term set onto the quantum circuit using a double-controlled NOT gate to generate a target quantum circuit comprises: Mapping the at least one target minimum term set onto the quantum circuit using a double-controlled NOT gate to generate a first target subcircuit; Based on the four target minterms included in the at least one target minterm set, the minterm set is updated to obtain an updated minterm set, wherein the updated minterm set includes remaining minterms except the four target minterms; Mapping the updated minimum term set onto the quantum circuit using the double-controlled NOT gate to generate a second target subcircuit; and The target quantum circuit is obtained based on the first target subcircuit and the second target subcircuit.

5. The method according to claim 4, wherein: The step of mapping the updated minimum term set onto the quantum circuit using the double-controlled NOT gate to generate a second target subcircuit comprises: In the case where the mapping positions of the four remaining minimum terms included in the updated minimum term set in the Euclidean space do not satisfy the parallelogram condition, Using the single controlled NOT gate and / or the triple controlled NOT gates to adjust the quantum bit state included in the at least one remaining minimum term until the mapping positions of the four remaining minimum terms in the Euclidean space satisfy the parallelogram condition; Determining the four remaining minimum terms that satisfy the parallelogram condition as a target remaining minimum term set; and The target remaining minimum term set is mapped onto the quantum circuit using the double-controlled NOT gate to generate a second target subcircuit.

6. The method according to claim 2, wherein: The method further comprises: According to the initial mapping relationship, the combinations of multiple quantum bit states included in the global truth table are respectively mapped at multiple vertices included in the preset cube configuration in the Euclidean space to determine the mapping positions of multiple minimum terms included in the minimum term set in the Euclidean space.

7. The method according to claim 1, wherein: The method further comprises: The plurality of quantum gates included in the target quantum circuit are packaged to obtain a packaged module of the target quantum circuit, wherein the packaged module is configured to provide an input / output interface of a Cirq library.

8. A quantum circuit generation device based on a balanced Boolean function, comprising: An extraction module, configured to extract a minimum term set from a global truth table of the balanced Boolean function, wherein the minimum term set includes a plurality of minimum terms, and the minimum term is a combination of quantum bit states whose calculated values ​​in the global truth table are 1; A determination module, configured to determine at least one target minimum term set based on the mapping positions of the multiple minimum terms in the Euclidean space, wherein the target minimum term set includes four minimum terms in the minimum term set that satisfy a parallelogram condition, and the parallelogram condition includes that the four minimum terms form a parallelogram in the Euclidean space; A mapping module is used to map the at least one target minimum term set onto the quantum circuit using a double-controlled NOT gate to generate a target quantum circuit.

9. An electronic device, comprising: one or more processors; a memory for storing one or more programs, When the one or more programs are executed by the one or more processors, the one or more processors implement the method according to any one of claims 1 to 7.

10. A computer-readable storage medium having executable instructions stored thereon, which, when executed by a processor, enables the processor to implement the method according to any one of claims 1 to 7.

Citation Information

Patent Citations

  • Method and apparatus for fermi local simulation of resource optimization on quantum computer for quantum chemistry

    CN115244549A

  • XOR and graph quantum circuit synthesis method for optimizing CNOT operation

    CN118195015A

  • Method and system that produces non-stabilizer quantum states that are used in various quantum circuits and systems

    US20140280404A1

  • Method and system for decomposing single-qubit quantum circuits into a discrete basis

    US20140280427A1

  • Method of processing quantum circuit, electronic device, and storage medium

    US20230095725A1