Quantum AND logic gate, inverse quantum AND logic gate and logic operation circuit generation method
By introducing quantum AND logic gates and inverse quantum AND logic gates into quantum computing, the problem of difficulty in realizing fast and simple logic operations on qubits in the existing technology is solved, the computing efficiency is improved, and the synthesis of multi-qubit control gates is simplified.
Patent Information
- Application Number
- CN202111486517.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-12-07
- Publication Date
- 2024-10-18
- Estimated Expiration
- 2041-12-07
AI Technical Summary
The existing technology lacks a quantum logic gate that is simple in operation and can achieve reversible operation results. This makes it difficult to perform quick and easy logical operations on qubits in quantum computing scenarios, affecting computing efficiency.
Provide a quantum AND logic gate and an inverse quantum AND logic gate, which perform preset quantum operations by obtaining two input qubits, obtain the first output qubit for indicating the quantum state of the input qubit, and the second output qubit for Save the results of logical operations and realize the reversibility of qubits.
It realizes fast and easy logical operations on qubits, improves the efficiency of quantum computing, reduces the difficulty of logic circuit synthesis, and simplifies the synthesis process of multi-qubit control gates.
Smart Images

Figure CN114399052B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of quantum computing technology, and in particular to a quantum AND logic gate, an inverse quantum AND logic gate and a method for generating a logic operation circuit. Background Art
[0002] Quantum computing is a new computing model that can utilize properties of quantum physics such as entanglement and superposition, and has a significant advantage over classical computing efficiency in some specific problems. Quantum computing is a new interdisciplinary subject that combines quantum physics with computer science and information science. A quantum bit (Qubit) can be in a linear superposition state |ψ>=α|0>+β|1> composed of arbitrary complex coefficients of the quantum state |0> and the quantum state |1>. Quantum computing operates quantum bits through logic gates, and the corresponding logic gates used to operate quantum bits can be called quantum logic gates or quantum gates.
[0003] The AND logic operation is a basic logic operation that can be combined with other logic operations and used to implement complex logic operations, thereby realizing quantum computing for quantum bits. In the prior art, there is a lack of a quantum AND logic gate that can be used in the quantum computing process and has simple operations and reversible operation results. The problem with the prior art is that in the quantum computing scenario based on quantum bits, it is difficult to achieve fast and easy AND logic operations on quantum bits, which is not conducive to improving the simplicity of quantum bit operations, nor is it conducive to improving the computing efficiency in the process of quantum computing on quantum bits.
[0004] Therefore, the existing technology still needs to be improved and developed. Summary of the invention
[0005] The main purpose of the present invention is to provide a quantum AND logic gate, an inverse quantum AND logic gate and a logic operation circuit generation method, aiming to solve the problem in the prior art that there is a lack of a quantum AND logic gate with simple operation and reversible operation results. In the quantum computing scenario based on quantum bits, it is difficult to achieve fast and simple AND logic operations on quantum bits during the calculation of quantum bits, which is not conducive to improving the simplicity of operations on quantum bits, and thus is not conducive to improving the computing efficiency in the process of quantum computing on quantum bits.
[0006] In order to achieve the above object, the first aspect of the present invention provides a quantum AND logic gate, which performs a quantum bit AND logic operation according to the following steps:
[0007] Get two input qubits;
[0008] Based on the above-mentioned input quantum bits, a first output quantum bit and a second output quantum bit are obtained through a preset quantum operation, wherein the above-mentioned second output quantum bit is used to store the result of the AND logic operation of the two above-mentioned input quantum bits, and the above-mentioned first output quantum bit is used to indicate the quantum state of the two above-mentioned input quantum bits.
[0009] Optionally, the quantum state of the first output quantum bit is any one of at least three preset indicating quantum states, and one indicating quantum state is used to indicate a combination of the quantum states of the two input quantum bits.
[0010] Optionally, the above-mentioned preset quantum operation is implemented by a combination of a single quantum bit X gate and a quantum state exchange gate.
[0011] Optionally, the three indicating quantum states include |1>, |2> and |0>, the quantum state exchange gate is used to realize the exchange between quantum states |11> and |20>, and the input quantum bit includes a first input quantum bit and a second input quantum bit;
[0012] The preset quantum operation includes: transforming the quantum state of the first input quantum bit through the single quantum bit X gate to obtain a first intermediate quantum state, combining the first intermediate quantum state and the quantum state of the second input quantum bit to form a second intermediate quantum state, inputting the second intermediate quantum state into the quantum state exchange gate and obtaining the output of the quantum state exchange gate, and obtaining the first output quantum bit and the second output quantum bit based on the output of the quantum state exchange gate.
[0013] Optionally, when the quantum state of the first output qubit and the quantum state of the second output qubit are obtained, the quantum state of the first input qubit and the quantum state of the second input qubit are determined based on the indication of the first output qubit by the following steps:
[0014] When the quantum state of the second output quantum bit is |1>, the quantum state of the first input quantum bit and the quantum state of the second input quantum bit are both |1>;
[0015] When the quantum state of the second output quantum bit is |0>, the quantum state of the first input quantum bit and the quantum state of the second input quantum bit are determined based on the indication of the quantum state of the first output quantum bit, wherein when the quantum state of the first output quantum bit is |1>, the quantum state of the first input quantum bit and the quantum state of the second input quantum bit are both |0>, when the quantum state of the first output quantum bit is |2>, the quantum state of the first input quantum bit and the quantum state of the second input quantum bit are |0> and |1> respectively, and when the quantum state of the first output quantum bit is |0>, the quantum state of the first input quantum bit and the quantum state of the second input quantum bit are |1> and |0> respectively.
[0016] A second aspect of the present invention provides a quantum AND logic gate, wherein the quantum AND logic gate comprises: a first input end, a second input end, a quantum operation module, a first output end, and a second output end;
[0017] The first input end and the second input end are used to obtain two input quantum bits;
[0018] The quantum operation module is used to process the two input qubits through a preset quantum operation to obtain a first output qubit and a second output qubit, wherein the second output qubit is used to store the result of an AND logic operation of the two input qubits, and the first output qubit is used to indicate the quantum state of the two input qubits;
[0019] The first output end is used to output the first output quantum bit, and the second output end is used to output the second output quantum bit.
[0020] A third aspect of the present invention provides an inverse quantum AND logic gate, wherein the inverse quantum AND logic gate performs an inverse operation of the AND logic of a quantum bit according to the following steps:
[0021] Obtaining a third input quantum bit and a fourth input quantum bit;
[0022] Based on the third input qubit and the fourth input qubit, a third output qubit and a fourth output qubit indicated by the third input qubit are obtained through a preset quantum operation, wherein a result of an AND logic operation of the third output qubit and the fourth output qubit is equal to the quantum state of the fourth input qubit.
[0023] A fourth aspect of the present invention provides a method for generating a logic operation circuit, wherein the method comprises:
[0024] Obtaining operation information of a target logic operation circuit;
[0025] Based on the above operation information, a target logic gate is obtained and the above target logic operation circuit is constructed, wherein the above target logic gate includes any one of the above quantum AND logic gates and / or any one of the above inverse quantum AND logic gates.
[0026] Optionally, the target logic operation circuit includes an incrementer logic operation circuit, a constant adder logic operation circuit or an adder logic operation circuit.
[0027] A fifth aspect of the present invention provides a multi-qubit control gate circuit, wherein the multi-qubit control gate circuit includes one or more multi-qubit control gates, and at least one component module of the multi-qubit control gate includes any one of the above-mentioned quantum AND logic gates and / or any one of the above-mentioned inverse quantum AND logic gates.
[0028] As can be seen from the above, the scheme of the present invention provides a quantum AND logic gate, an inverse quantum AND logic gate and a method for generating a logic operation circuit, and the quantum AND logic gate performs a quantum bit AND logic operation according to the following steps: obtain two input quantum bits; based on the input quantum bits, obtain a first output quantum bit and a second output quantum bit through a preset quantum operation, wherein the second output quantum bit is used to save the AND logic operation result of the two input quantum bits, and the first output quantum bit is used to indicate the quantum state of the two input quantum bits. Compared with the prior art, the scheme of the present invention provides a quantum AND logic gate, and based on the quantum AND logic gate in the present invention, the AND logic operation result of the two input quantum bits can be obtained through the second output quantum bit, thereby realizing the AND logic operation of the quantum bit. At the same time, when only the output quantum bit of the quantum AND logic gate is known but not its specific input quantum bit, the specific quantum state of the two input quantum bits can be known based on the indication of the first output quantum bit, thereby realizing the reversibility of the quantum bit AND logic operation, that is, realizing the reversibility of the quantum operation corresponding to the quantum AND logic gate, and realizing the reversibility of the operation result. In this way, the above-mentioned quantum AND logic gates can be applied to quantum computing scenarios, which is conducive to realizing fast and easy AND logic operations on quantum bits, improving the simplicity of operations on quantum bits, and the above-mentioned quantum AND logic gates can be further applied to the synthesis process of logic circuits used for quantum computing, which is conducive to reducing the difficulty of logic circuit synthesis and improving the efficiency of quantum computing on quantum bits. BRIEF DESCRIPTION OF THE DRAWINGS
[0029] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.
[0030] Figure 1 It is a schematic diagram of the operation flow of a quantum AND logic gate provided by an embodiment of the present invention;
[0031] Figure 2 It is a circuit symbol of a quantum AND logic gate and a schematic diagram of its implementation method provided by an embodiment of the present invention;
[0032] Figure 3 It is a specific module schematic diagram of a quantum AND logic gate provided by an embodiment of the present invention;
[0033] Figure 4 It is a schematic diagram of the operation flow of an inverse quantum AND logic gate provided by an embodiment of the present invention;
[0034] Figure 5 It is a circuit symbol of an inverse quantum AND logic gate and a schematic diagram of its implementation method provided by an embodiment of the present invention;
[0035] Figure 6 It is a flow chart of a method for generating a logic operation circuit provided by an embodiment of the present invention;
[0036] Figure 7 It is a schematic diagram of a circuit decomposition of n-controlled Z gates on a one-dimensional quantum bit array provided by an embodiment of the present invention;
[0037] Figure 8 It is a schematic diagram of a multi-qubit controlled Z gate on a two-dimensional square qubit array provided by an embodiment of the present invention;
[0038] Fig. 9 It is a schematic diagram of a multi-qubit controlled Z gate on a tree-shaped qubit array provided by an embodiment of the present invention;
[0039] Fig.10 It is a schematic diagram of an embodiment of the present invention for efficiently decomposing an incrementer by using a quantum AND logic gate and an inverse quantum AND logic gate;
[0040] Fig.11 It is a schematic diagram of an efficient circuit decomposition of a constant adder by using a quantum AND logic gate and an inverse quantum AND logic gate provided by an embodiment of the present invention;
[0041] Fig.12It is a schematic diagram of an efficient circuit decomposition of an adder by using a quantum AND logic gate and an inverse quantum AND logic gate provided by an embodiment of the present invention;
[0042] Fig.13 It is a schematic diagram of the component modules of a multi-qubit control gate circuit provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0043] In the following description, specific details such as specific system structures, technologies, etc. are provided for the purpose of illustration rather than limitation, so as to provide a thorough understanding of the embodiments of the present invention. However, it should be clear to those skilled in the art that the present invention may be implemented in other embodiments without these specific details. In other cases, detailed descriptions of well-known systems, devices, circuits, and methods are omitted to prevent unnecessary details from obstructing the description of the present invention.
[0044] It should be understood that when used in this specification and the appended claims, the term "comprising" indicates the presence of described features, integers, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, integers, steps, operations, elements, components and / or groups thereof.
[0045] It should also be understood that the terms used in the present specification are only for the purpose of describing specific embodiments and are not intended to limit the present invention. As used in the present specification and the appended claims, the singular forms "a", "an" and "the" are intended to include plural forms unless the context clearly indicates otherwise.
[0046] It should be further understood that the term "and / or" used in the present description and the appended claims refers to and includes any and all possible combinations of one or more of the associated listed items.
[0047] As used in this specification and the appended claims, the term "if" may be interpreted as "when" or "upon" or "in response to determining" or "in response to detecting," depending on the context. Similarly, the phrases "if it is determined" or "if [described condition or event] is detected" may be interpreted as meaning "upon determination" or "in response to determining" or "upon detection of [described condition or event]" or "in response to detecting [described condition or event]," depending on the context.
[0048] The following is a clear and complete description of the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0049] In the following description, many specific details are set forth to facilitate a full understanding of the present invention, but the present invention may also be implemented in other ways different from those described herein, and those skilled in the art may make similar generalizations without violating the connotation of the present invention. Therefore, the present invention is not limited to the specific embodiments disclosed below.
[0050] Quantum computing is a new computing model that can utilize properties of quantum physics such as entanglement and superposition, and has a significant advantage over classical computing efficiency in some specific problems. Quantum computing is a new interdisciplinary subject that combines quantum physics with computer science and information science. A quantum bit (Qubit) can be in a linear superposition state |ψ>=α|0>+β|1> composed of arbitrary complex coefficients of the quantum state |0> and the quantum state |1>. Quantum computing operates quantum bits through logic gates, and the corresponding logic gates used to operate quantum bits can be called quantum logic gates or quantum gates.
[0051] Quantum information is stored in quantum bits. Affected by noise, the number of quantum bits and the accuracy of computational operations are still subject to certain limitations. Computational tasks running on quantum computers are abstracted as quantum circuits, which are generally represented as sequences of quantum gate operations acting on different quantum bits. Multi-bit gates are essential parts of many important applications such as quantum search, large integer factorization, and quantum simulation. Therefore, how to obtain an efficient, scalable, and multi-bit gate implementation solution that is suitable for current quantum computing hardware is also an urgent problem to be solved.
[0052] The AND logic operation is a basic logic operation that can be combined with other logic operations to implement complex logic operations. In the prior art, there is a lack of a quantum AND logic gate that is simple to operate and can achieve reversible operation results. The problem with the prior art is that it is difficult to achieve fast and easy AND logic operations on quantum bits, which is not conducive to improving the simplicity of quantum bit operations. At the same time, it is not conducive to the realization of multi-qubit quantum gates.
[0053] Specifically, in the prior art, there is a lack of a quantum and logic gate that is simple to operate and can achieve reversible operation results. On this basis, there are usually three methods for realizing multi-qubit control gates: one method is to perform a single-step operation on the global quantum state, which utilizes the multi-body effect naturally existing in the quantum bit system. The main problem is that the natural multi-body effect is difficult to extend to a system with more quantum bits. Another method is to use auxiliary quantum bits to store intermediate results and decompose the multi-qubit control gate into a single quantum bit gate. The main problem is that it is greatly affected by the connectivity between bits, and requires a large number of additional auxiliary bits and gate operations that act on the auxiliary bits and the operation bits, which has a large additional overhead. The third method is to use auxiliary energy level intermediate control, which uses auxiliary high energy levels to expand the operation space, and uses 2 and higher energy level states other than 0 and 1 to represent intermediate operation information, and decompose the multi-qubit control gate. The main problem is that it is necessary to implement operations of 2 and higher energy level control. The multi-level system has a higher degree of freedom, which increases the complexity of the control operation and is difficult to implement efficiently on current hardware. As can be seen from the above, the existing technology has the following shortcomings for the realization of multi-qubit control gates: it requires natural multi-body effects and is difficult to expand to more bit systems; it requires auxiliary bits, which consumes too many computing resources; the control complexity is high and difficult to achieve; it is greatly affected by the topology of the quantum bit array and cannot flexibly optimize the circuit for a variety of topologies; and the length of the final required synthetic circuit is relatively long, which is not conducive to improving the simplicity and efficiency of the calculation.
[0054] In order to solve at least one of the above-mentioned problems of the prior art, the solution of the present invention provides a quantum AND logic gate, which is conducive to realizing fast and simple AND logic operations on quantum bits, and is conducive to improving the simplicity and computational efficiency of quantum bit operations. In addition, based on the quantum AND logic gate provided in the present invention, a multi-qubit control gate can be realized more simply and efficiently, the length of the synthesis circuit of the multi-qubit control gate can be shortened, and the cost of synthesizing the multi-qubit control gate can be significantly reduced.
[0055] A first aspect of an embodiment of the present invention provides a quantum AND logic gate, specifically, Figure 1 As shown, the quantum AND logic gate performs the AND logic operation of the quantum bit according to the following steps:
[0056] Step S100, obtaining two input quantum bits.
[0057] Among them, the above two input quantum bits are quantum bits that need to perform AND logic operations. In this embodiment, the two input quantum bits are used as inputs of the quantum AND logic gate to implement AND logic operations on them, obtain the results of the AND logic operations of the two input quantum bits, and realize the AND logic operations on the quantum bits.
[0058] Step S200, based on the above-mentioned input quantum bits, obtain a first output quantum bit and a second output quantum bit through a preset quantum operation, wherein the above-mentioned second output quantum bit is used to store the result of the AND logic operation of the two above-mentioned input quantum bits, and the above-mentioned first output quantum bit is used to indicate the quantum state of the two above-mentioned input quantum bits.
[0059] Among them, the above-mentioned preset quantum operation is the operation that needs to be performed in the pre-set quantum and logic gate, which is a series of operation transformations performed on quantum bits. In one embodiment, the above-mentioned preset quantum operation can be represented by a matrix. The corresponding matrix form is not unique and is not specifically limited here. In another embodiment, the above-mentioned quantum and logic gate can actually be formed by combining multiple other existing single-qubit gates to achieve the corresponding quantum operation. At this time, the corresponding quantum operation can be represented by the form of a matrix corresponding to the corresponding single-qubit gate. The above-mentioned first output quantum bit and the second output quantum bit are the outputs of the above-mentioned quantum and logic gate, wherein the second output quantum bit is used to store the result of the AND logic operation of the two above-mentioned input quantum bits, and the other first output quantum bit is used to indicate the quantum state of the two above-mentioned input quantum bits.
[0060] Specifically, the quantum AND logic gate (QuAND gate) provided in this embodiment is a two-qubit AND logic gate, the second output qubit stores the result of the AND logic operation, and the first output qubit uses an auxiliary energy level to maintain the reversibility of the overall quantum operation. For example, there are four possible combinations of quantum states corresponding to the two input qubits, namely |00>, |01>, |10> and |11>. In an application scenario, the first output qubit can have four possible quantum states, such as |0>, |1>, |2> and |3>, to correspond to the above four combinations. In this way, the specific quantum states corresponding to the two input qubits can be obtained according to the first output qubit, and the reversibility of the overall quantum operation is maintained (that is, the input of the quantum AND logic gate can be inferred from the output of the quantum AND logic gate). Of course, the specific quantum state of the first output quantum bit and its corresponding relationship with the quantum state corresponding to the input quantum bit can be set and adjusted according to actual needs, and no specific limitation is made here. Correspondingly, the preset quantum operation can also be adjusted according to the quantum state of the first output quantum bit and its corresponding relationship with the quantum state corresponding to the input quantum bit, as long as the reversibility of the overall quantum operation can be met.
[0061] As can be seen from the above, the quantum AND logic gate provided in the embodiment of the present invention performs the AND logic operation of quantum bits according to the following steps: obtaining two input quantum bits; based on the above input quantum bits, obtaining the first output quantum bit and the second output quantum bit through a preset quantum operation, wherein the above second output quantum bit is used to save the AND logic operation result of the two above input quantum bits, and the above first output quantum bit is used to indicate the quantum state of the two above input quantum bits. Compared with the prior art, a quantum AND logic gate is provided in the scheme of the present invention, and based on the quantum AND logic gate in the present invention, the AND logic operation result of the two input quantum bits can be obtained through the second output quantum bit, thereby realizing the AND logic operation of the quantum bit. At the same time, when only the output quantum bits of the quantum AND logic gate are known but not the specific input quantum bits, the specific quantum states of the two input quantum bits can be known based on the indication of the first output quantum bit, thereby realizing the reversibility of the AND logic operation of the quantum bit, that is, realizing the reversibility of the quantum operation corresponding to the quantum AND logic gate, and realizing the reversibility of the operation result. In this way, the above-mentioned quantum AND logic gates can be applied to quantum computing scenarios, which is conducive to realizing fast and easy AND logic operations on quantum bits, improving the simplicity of operations on quantum bits, and the above-mentioned quantum AND logic gates can be further applied to the synthesis process of logic circuits used for quantum computing, which is conducive to reducing the difficulty of logic circuit synthesis and improving the efficiency of quantum computing on quantum bits.
[0062] Specifically, in this embodiment, the quantum state of the first output quantum bit is any one of at least three preset indicating quantum states, and one indicating quantum state is used to indicate a combination of the quantum states of the two input quantum bits.
[0063] It should be noted that the quantum AND logic gate in this embodiment is a two-qubit logic gate, and the corresponding two input qubits have four possible combinations, namely |00>, |01>, |10> and |11>, and the second output qubit corresponding to |11> is |1>, and the second output qubit corresponding to the other three combinations is |0>, so the reversibility of the quantum operation can be realized by combining the first output qubit and the second output qubit. At this time, it is only necessary to distinguish the three combinations of |00>, |01> and |10> according to the first output qubit. Correspondingly, the quantum state of the first output qubit needs to include three possible situations to indicate the above three combinations respectively. Of course, in an application scenario, four possible situations can also be set for the first output qubit, thereby directly indicating the corresponding four input combinations. Among them, the above-mentioned preset indication quantum state is a quantum state that the first output qubit can obtain in advance, which can be set and adjusted according to actual needs. In this embodiment, the quantum operation corresponding to the above-mentioned quantum AND logic gate can be adjusted according to the preset indication quantum state.
[0064] Specifically, in this embodiment, the above-mentioned preset quantum operation is implemented by a combination of a single quantum bit X gate and a quantum state exchange gate.
[0065] Among them, the implementation of the single quantum bit X gate and the quantum state gate is simple, and the quantum operation formed by combining the two can meet the requirements of the corresponding first output quantum bit and the second output quantum bit.
[0066] Further, the three indicating quantum states include |1>, |2> and |0>, the quantum state exchange gate is used to realize the exchange between quantum states |11> and |20>, and the input quantum bit includes a first input quantum bit and a second input quantum bit;
[0067] The preset quantum operation includes: transforming the quantum state of the first input quantum bit through the single quantum bit X gate to obtain a first intermediate quantum state, combining the first intermediate quantum state and the quantum state of the second input quantum bit to form a second intermediate quantum state, inputting the second intermediate quantum state into the quantum state exchange gate and obtaining the output of the quantum state exchange gate, and obtaining the first output quantum bit and the second output quantum bit based on the output of the quantum state exchange gate.
[0068] Figure 2 is a schematic diagram of a circuit symbol of a quantum AND logic gate and its implementation method provided by an embodiment of the present invention, such as Figure 2 As shown, in this embodiment, |A> and |B> are used to represent the first input quantum bit and the second input quantum bit, respectively, and |C> and |A&B> are used to represent the first output quantum bit and the second output quantum bit, respectively. Among them, the second output quantum bit |A&B> is used to record the AND logic result of |A> and |B>, and the first output quantum bit |C> contains three possible states: |1>, |2> and |0>, which are used to correspond to the input quantum states |00>, |01> and |10>, respectively, among which |01> represents that the quantum state of the first input quantum bit is |0>, and the quantum state of the second input quantum bit is |1>, and |10> represents that the quantum state of the first input quantum bit is |1>, and the quantum state of the second input quantum bit is |0>. According to this mapping, the reversibility of the quantum operation is guaranteed, and the inverse quantum AND logic gate can be realized by exchanging the input and output of the quantum AND logic gate, and the implementation method is simple. It should be noted that the possible states included in the above-mentioned first output quantum bit |C> may also include other states, which are not specifically limited here. In this embodiment, the three states |1>, |2> and |0> are selected for ease of implementation and avoidance of using too many quantum bit energy levels, which helps to make the implementation scheme simpler.
[0069] In this embodiment, the second output quantum bit |A&B> is called a parent bit, and the first output quantum bit |C> is called a child bit. Figure 2 In FIG. 1 , the left side of the equal sign is the circuit symbol of the quantum AND logic gate in this embodiment (i.e., the circuit symbol of the QuAND gate), such as Figure 2 As shown, the QuAND gate circuit symbol is represented by the AND logic symbol & on the parent bit and an arrow from the child bit to the parent bit, which is easy to understand. Figure 2 In the figure, the right side of the equal sign is a method for implementing a quantum AND logic gate provided by this embodiment, such as Figure 2 As shown, the quantum AND logic gate in this embodiment is realized by combining a single quantum bit X gate and a quantum state exchange gate (SWAP gate). Specifically, the QuAND gate can be decomposed into a single quantum bit X gate followed by a quantum state exchange SWAP gate between the |11> state and the |20> state. The single quantum bit X gate is used to realize the exchange of the two quantum states |1> and |0>; the quantum state exchange gate is used to realize the exchange of the two quantum states |11> and |20>; the above two quantum gates can be represented in the form of corresponding matrices, for example, the matrix corresponding to the single quantum bit X gate is At present, quantum computing hardware can also support the efficient implementation of the swap gate between the |11> state and the |20> state, so the corresponding quantum AND logic gate can also be supported by quantum computing hardware and implemented efficiently. The circuit symbol of the SWAP gate is a double cross, where the cross on the subbit is a dotted line.
[0070] Table 1 below is a truth table of a quantum AND logic gate provided by an embodiment of the present invention:
[0071] A B C A&B 0 0 1 0 0 1 2 0 1 0 0 0 1 1 0 1
[0072] Table 1
[0073] Table 1 shows that based on Figure 2 The quantum operation process corresponding to the quantum and logic gates realized by the implementation method. Specifically, combined with Figure 2 and Table 1, taking |A> and |B> as |0> and |1> respectively as examples for explanation. Specifically, the quantum state |0> of the first input quantum bit is processed by the single quantum bit X gate to obtain the first intermediate quantum state |1>, the first intermediate quantum state |1> and the quantum state |1> of the second input quantum bit are combined to form the second intermediate quantum state |11>, the above second intermediate quantum state |11> is input into the quantum state exchange gate, the quantum state exchange gate exchanges |11> with |20>, and the first output quantum bit and the second output quantum bit are obtained based on |20>, wherein the first output quantum bit is |2> and the second quantum output bit is |0>. In this way, the second quantum output bit can reflect the result of the logical AND of |A> and |B>, and the specific quantum state of the input quantum bit can be known according to the second quantum output bit.
[0074] It should be noted that the above-mentioned first intermediate quantum state and second intermediate quantum state are introduced for the convenience of explanation and are not intended as specific limitations.
[0075] Specifically, in this embodiment, when the quantum state of the first output qubit and the quantum state of the second output qubit are obtained, based on the indication of the first output qubit, the quantum state of the first input qubit and the quantum state of the second input qubit are determined by the following steps:
[0076] When the quantum state of the second output quantum bit is |1>, the quantum state of the first input quantum bit and the quantum state of the second input quantum bit are both |1>;
[0077] When the quantum state of the second output quantum bit is |0>, the quantum state of the first input quantum bit and the quantum state of the second input quantum bit are determined based on the indication of the quantum state of the first output quantum bit, wherein when the quantum state of the first output quantum bit is |1>, the quantum state of the first input quantum bit and the quantum state of the second input quantum bit are both |0>, when the quantum state of the first output quantum bit is |2>, the quantum state of the first input quantum bit and the quantum state of the second input quantum bit are |0> and |1> respectively, and when the quantum state of the first output quantum bit is |0>, the quantum state of the first input quantum bit and the quantum state of the second input quantum bit are |1> and |0> respectively.
[0078] In an application scenario, based on the above steps and according to the truth table shown in Table 1, the original two input qubits can be obtained through the known first output qubit and the second output qubit, thereby realizing the reversibility of the quantum operation of the quantum AND logic gate.
[0079] It should be noted that the mapping relationship between the states |00>, |01> and |10> of the input quantum bit |AB> and the states |1>, |2> and |0> of the first output quantum bit |C> can be an arbitrary one-to-one mapping, which is not specifically limited here.
[0080] In one embodiment, a single-qubit gate may be added. Under the premise that the state of the first output qubit |C> maintains the reversibility of the overall operation, the realization of the AND logic only requires that for the four combinations of the input two qubit values, the output corresponding to one of them is different from the outputs corresponding to the other three. For example, the corresponding mapping between the input qubit and its output may be: |00>→|1>, |01>→|0>, |10>→|1>, |11>→|1>, and further adding the corresponding single-qubit gate after the obtained output can convert the corresponding output into the correct |A&B>. The specific single-qubit gate may be set and adjusted according to actual needs and is not specifically limited here.
[0081] Specifically, the second aspect of this embodiment provides a quantum AND logic gate, such as Figure 3 As shown, the quantum AND logic gate comprises: a first input terminal 10, a second input terminal 20, a quantum operation module 30, a first output terminal 40 and a second output terminal 50;
[0082] The first input end 10 and the second input end 20 are used to obtain two input quantum bits;
[0083] The quantum operation module 30 is used to process the two input qubits through a preset quantum operation to obtain a first output qubit and a second output qubit, wherein the second output qubit is used to store the result of an AND logic operation of the two input qubits, and the first output qubit is used to indicate the quantum state of the two input qubits;
[0084] The first output terminal 40 is used to output the first output quantum bit, and the second output terminal 50 is used to output the second output quantum bit.
[0085] The input qubits include a first input qubit and a second input qubit, the first input terminal 10 is used to obtain the first input qubit, and the second input terminal 20 is used to obtain the second input qubit. The quantum state of the first output qubit is any one of at least three preset indicating quantum states, and one indicating quantum state is used to indicate a combination of the quantum states of the two input qubits.
[0086] In this embodiment, the quantum operation module 30 includes a single quantum bit X gate and a quantum state exchange gate, and the preset quantum operation is implemented by the single quantum bit X gate and the quantum state exchange gate.
[0087] The three indicating quantum states include |1>, |2> and |0>, and the quantum state exchange gate is used to realize the exchange between the quantum states |11> and |20>; the preset quantum operation includes: transforming the quantum state of the first input quantum bit through the single quantum bit X gate to obtain a first intermediate quantum state, combining the first intermediate quantum state and the quantum state of the second input quantum bit to form a second intermediate quantum state, inputting the second intermediate quantum state into the quantum state exchange gate and obtaining the output of the quantum state exchange gate, and obtaining the first output quantum bit and the second output quantum bit based on the output of the quantum state exchange gate.
[0088] It should be noted that the specific functions and implementation methods of the quantum AND logic gate and its various modules provided in the second aspect of the embodiment of the present invention can refer to the functions and implementation methods of the quantum AND logic gate provided in the first aspect of the embodiment of the present invention, and the specific circuit structure of the quantum AND logic gate provided in the second aspect of the embodiment of the present invention can also refer to Figure 2 , I will not go into details here.
[0089] Specifically, the third aspect of the embodiment of the present invention further provides an inverse quantum AND logic gate, specifically, Figure 4 As shown, the above-mentioned inverse quantum AND logic gate performs the inverse operation of the AND logic of the quantum bit according to the following steps:
[0090] Step A100, obtaining a third input quantum bit and a fourth input quantum bit.
[0091] Step A200, based on the third input quantum bit and the fourth input quantum bit, obtain the third output quantum bit and the fourth output quantum bit corresponding to the third input quantum bit through a preset quantum operation, wherein the result of the AND logic operation of the third output quantum bit and the fourth output quantum bit is equal to the quantum state of the fourth input quantum bit.
[0092] It should be noted that the above-mentioned inverse quantum and logic gate is the inverse gate corresponding to any of the above-mentioned quantum and logic gates, and the specific quantum operations of the two are correspondingly opposite. The inverse quantum and logic gate can be realized by exchanging the input and output of the quantum and logic gate, and the implementation method is simple.
[0093] Among them, the third input qubit and the fourth input qubit are the inputs of the inverse quantum AND logic gate, and are qubits that need to perform the inverse operation of the AND logic operation. In this embodiment, the inverse quantum AND logic gate is the inverse gate of the quantum AND logic gate, and realizes the inverse operation process of the quantum AND logic gate. Therefore, the third input qubit is equivalent to the first output qubit |C> of the quantum AND logic gate, the fourth input qubit is equivalent to the second output qubit |A&B> of the quantum AND logic gate, and the third output qubit and the fourth output qubit are respectively equivalent to the first input qubit |A> and the second quantum input bit |B> of the quantum AND logic gate, and their corresponding functions and implementation principles can refer to the corresponding specific description in the above-mentioned quantum AND logic gate.
[0094] It should be noted that the preset quantum operation corresponding to the above-mentioned inverse quantum AND logic gate is opposite to the preset quantum operation corresponding to the quantum AND logic gate. In one embodiment, the preset quantum operation in the inverse quantum AND logic gate can also be represented in the form of a matrix. The corresponding matrix form is not unique and is not specifically limited here. In another embodiment, the above-mentioned inverse quantum AND logic gate can actually be formed by combining multiple other existing single-qubit gates to achieve the corresponding quantum operation. In this case, the corresponding quantum operation can be represented in the form of a matrix corresponding to the corresponding single-qubit gate.
[0095] Specifically, in this embodiment, the quantum state of the third input quantum bit is any one of at least three preset indicating quantum states, and an indicating quantum state is used to indicate a combination of the quantum state of the third output quantum bit and the quantum state of the fourth output quantum bit.
[0096] Furthermore, the above-mentioned preset quantum operation is implemented by a combination of a single quantum bit X gate and a quantum state exchange gate.
[0097] It should be noted that, for the specific mapping relationship between the above-mentioned inverse quantum and logic gate or the setting of quantum operation, the corresponding setting between the above-mentioned quantum and logic gate can be referred to and corresponding or opposite settings can be made, which will not be repeated here.
[0098] Figure 5 1 is a schematic diagram of a circuit symbol and implementation method of an inverse quantum AND logic gate provided by an embodiment of the present invention. Figure 5 As shown, in this embodiment, Figure 2 The quantum and logic gates in the figure correspond to each other, and |C> and |A&B> represent the third input quantum bit and the fourth input quantum bit (where |A&B> can also be called the parent bit and |C> the child bit), and |A> and |B> represent the third output quantum bit and the fourth output quantum bit. Figure 5, the left side of the equal sign is the circuit symbol of the inverse quantum AND logic gate in this embodiment (i.e., the inverse QuAND gate circuit symbol), the inverse QuAND gate circuit symbol is represented by the AND logic symbol & on the parent bit and an arrow pointing from the parent bit to the child bit, and the QuAND gate circuit and the inverse QuAND gate circuit can be distinguished according to the direction of the corresponding arrows in the gate circuit symbol. Specifically, the arrow pointing to the AND logic symbol & is the QuAND gate circuit, and conversely, the arrow pointing in the opposite direction of the AND logic symbol & is the inverse QuAND gate circuit, which can be easily distinguished. Figure 5 In the figure, the right side of the equal sign is an implementation method of an inverse quantum AND logic gate provided by this embodiment, such as Figure 5 As shown, the inverse quantum AND logic gate in this embodiment is realized by combining a single quantum bit X gate and a quantum state exchange gate (SWAP gate). Specifically, the inverse QuAND can be decomposed into a quantum state exchange gate (SWAP gate) between the |11> state and the |20> state and a single quantum bit X gate immediately before the third output quantum bit. Among them, the single quantum bit X gate is used to realize the exchange of the two quantum states of |1> and |0>; the quantum state exchange gate is used to realize the exchange of the two quantum states of |11> and |20>.
[0099] Specifically, the truth table of the inverse quantum and logic gate can also refer to the above Table 1, combined with the above Table 1 and Figure 5 , taking |C> and |A&B> as |2> and |0> respectively as an example. Specifically, the quantum state (third intermediate quantum state) composed of |C> and |A&B> is |20>, which is converted by the SWAP gate to obtain |11> (the fourth intermediate quantum state, corresponding to the second intermediate quantum state in the quantum AND logic gate). |11> can be divided into two quantum states |1> and |1> (the fifth intermediate quantum state and the sixth intermediate quantum state), where the fourth output quantum bit directly obtains the second quantum state |1> (i.e., the sixth intermediate quantum state) as output, and the third output quantum bit obtains the first quantum state |1> (i.e., the fifth intermediate quantum state, corresponding to the first intermediate quantum state in the quantum AND logic gate) and the quantum state |0> converted by the single quantum bit X gate as output. It can be seen that the inverse quantum AND logic gate can realize the inverse operation of the quantum AND logic gate.
[0100] It should be noted that in this embodiment, multi-bit quantum gates or corresponding logic operation circuits can also be efficiently synthesized based on the above-mentioned quantum AND logic operation gates and inverse quantum AND logic operation gates, which can reduce the length of the synthesis circuit, thereby significantly reducing the cost of synthesizing multi-bit gates. For example, in a quantum processor with n bits, if its quantum bits are arranged in a one-dimensional array, only at most n layers are required without using additional auxiliary bits; if the quantum bits are arranged in a two-dimensional square array, only at most n layers are required without using additional auxiliary bits. Layer; quantum bits are arranged in a binary tree structure, and only 4log2n layers are required at most without using additional auxiliary bits.
[0101] A fourth aspect of the embodiment of the present invention further provides a method for generating a logic operation circuit, specifically, as follows: Figure 6 As shown, the above method includes:
[0102] Step B100, obtaining operation information of the target logic operation circuit.
[0103] Step B200, based on the above operation information, obtain the target logic gate and construct the above target logic operation circuit, wherein the above target logic gate includes any one of the above quantum AND logic gates and / or any one of the above inverse quantum AND logic gates.
[0104] Among them, the target logic operation circuit is the logic operation circuit that needs to be constructed. In an application scenario, the target logic circuit may be the logic circuit corresponding to the multi-qubit control gate that needs to be constructed, and the operation information is the information of the quantum operation corresponding to the multi-qubit control gate. In this embodiment, after obtaining the operation information corresponding to the target logic operation circuit, the corresponding classical logic circuit can be referred to, and the corresponding classical logic gate can be replaced by the quantum logic gate, and adaptive adjustment can be made, or the quantum logic gate and the inverse quantum logic gate can be combined to realize the construction of the corresponding target logic operation circuit, and provide a method for realizing the classical logic circuit on the quantum bit. Using the quantum logic gate and / or inverse quantum logic gate in this embodiment, the synthesis of the logic operation circuit can be realized efficiently, and the required cost can be reduced.
[0105] In one application scenario, the above quantum AND logic gate and inverse quantum AND logic gate can be directly applied to simplify the synthesis of multi-qubit control gates. Specifically, Figure 7It is a circuit decomposition diagram of n controlled Z gates on a one-dimensional quantum bit array provided by an embodiment of the present invention, using QuAND gates, controlled phase flip (CZ, Controlled-Z) gates and inverse QuAND gates, which are divided into three parts: embedding, controlled unitary change and recovery. In the embedding process, the QuAND gate is applied to the one-dimensional array from both ends inward. After the QuAND sequence, the two root parent nodes in the middle temporarily record the AND logic value results of all quantum bits from the upper and lower halves of the one-dimensional array, respectively. At this time, the CZ gate acting on these two root parent nodes is actually a phase flip operation with all quantum bits in the |1> state as the condition. The subsequent recovery process uses the inverse QuAND gate sequence to restore the high-energy state changes caused by the QuAND gate, and restore the overall quantum state to the initial binary code. This process uses a total of 2n-3 two-qubit gates, and the circuit depth (the number of two-qubit gate layers) is reduced to at most n, and the depth is n-1 when n is an even number. At the same time, an auxiliary high energy level |2> is used, which only exists in the sub-bit for temporary storage of state information (that is, the first output quantum bit in the quantum AND logic gate temporarily stores indication information). Its related quantum operation is the state exchange operation with the parent bit. Subsequent operations with other quantum bits do not involve sub-bits and high energy levels. This makes it possible to achieve optimization effects using QuAND gates in actual quantum hardware without the need for more complex operations and more complex auxiliary bits, which is conducive to simplifying the synthesis of multi-qubit control gates.
[0106] Figure 8 is a schematic diagram of a multi-qubit controlled Z gate on a two-dimensional square qubit array provided by an embodiment of the present invention. It should be noted that: Figure 8 In the figure, the circle represents the quantum bit, the arrow points from the child bit to the parent bit, representing the QuAND gate, and the two connected solid circles represent the CZ gate, which acts from the outside to the inside. Figure 8 The inverse QuAND gate used in the recovery process is omitted.
[0107] Fig. 9 is a schematic diagram of a multi-qubit controlled Z gate on a tree-shaped qubit array provided by an embodiment of the present invention, Fig. 9 In the figure, the hollow circle represents the quantum bit, the arrow points from the child bit to the parent bit, indicating the QuAND gate, and the two connected solid circles represent the CZ gate, which acts from the outside to the inside. Fig. 9 The inverse QuAND gate used in the recovery process is omitted. Fig. 9As shown in the figure, the key idea of simplifying the synthesis scheme of multi-qubit control gates is to derive a tree subgraph that is as balanced as possible on the physical topology graph of qubits, and then use QuAND gates layer by layer from leaves to roots to record the AND logic results of adjacent qubits to the parent bit. When constant factors are ignored, the circuit depth is equal to the depth of the tree, so the scheme in this embodiment has better performance results on qubit arrays with higher connectivity.
[0108] like Figure 8 and Fig. 9 As shown in the figure, the quantum circuit depth is reduced to and 4log2n, which can effectively reduce the cost of synthesizing multi-bit gates. Furthermore, the QuAND gate can also be used to efficiently synthesize other types of multi-qubit control gates, which are not specifically limited here.
[0109] At the same time, the QuAND gate (and / or the inverse QuAND gate) can also be used to construct other logic operation circuits. In this embodiment, the above-mentioned target logic operation circuit includes an incrementer logic operation circuit, a constant adder logic operation circuit or an adder logic operation circuit. Because the classical NAND gate (NAND) is a universal gate in classical circuits, any classical logic circuit can be effectively synthesized through QuAND (and / or the inverse QuAND gate) and a single quantum bit gate, so that the classical logic circuit can be referred to and the operation of the classical logic circuit on the quantum bit can be realized.
[0110] Fig.10 is a schematic diagram of an efficient circuit decomposition of an incrementer by using a quantum AND logic gate and an inverse quantum AND logic gate, provided by an embodiment of the present invention. Fig.10 In the case of n-qubit binary input |a>=|a n-1 …a1a0> is incremented and output as |a+1>, where the subscript is the index of the corresponding bit of the binary digit. Specifically, the first half of the circuit is a series of quantum AND logic gates (QuAND gates), which are used to calculate the corresponding information only, and the second half is a series of controlled-NOT (CNOT) gates and inverse quantum AND logic gates (inverse QuAND gates), which are used to restore the binary code and complete the calculation of the corresponding binary bit of the incremented result.
[0111] Fig.11 is a schematic diagram of an efficient circuit decomposition of a constant adder by using a quantum AND logic gate and an inverse quantum AND logic gate, provided by an embodiment of the present invention. Fig.11 In the case of n-qubit binary input |a>=|a n-1 …a1a0> is added with the known constant b and output as |a+b>, where the subscript is the index of the corresponding bit of the binary number. Fig.11In b0, b1, …, b n-2 is the value corresponding to the 0th to n-2th bits of the additive constant b, which are 0 or 1 respectively. G0 gate, G1 gate, G′0 gate, G′1 gate, CX0 gate and CX1 gate are quantum logic gates introduced for the convenience of description. Their specific composition is described in Fig.11 It is also shown in , and the G′0 gate is the inverse gate of the G0 gate, and the G′1 gate is the inverse gate of the G1 gate. Specifically, the G0 gate is composed of a quantum AND logic gate, and the G′0 gate is composed of an inverse quantum AND logic gate; the G1 gate is composed of a quantum AND logic gate and three single-qubit X gates, and the G′1 gate is composed of an inverse quantum AND logic gate and three single-qubit X gates. The specific composition method can be referred to Fig.11 The quantum operation corresponding to the CX0 gate is represented by a unit matrix (which can be understood as no transformation), and the CX1 gate is composed of a single quantum bit X gate. Fig.11 As shown in FIG. 1 , the first half of the constant adder circuit is a series of G0 gates or G1 gates composed of QuAND gates and single-qubit X gates, whose index value depends on the value of the corresponding bit of the addition constant b, and its function is to calculate the carry information. The second half of the constant adder circuit is a series of inverse G0 gates (i.e., G′0 gates) or inverse G1 gates (i.e., G′1 gates) and CNOT gates, which are used to restore the initial binary code and complete the addition operation.
[0112] Fig.12 is a schematic diagram of an efficient circuit decomposition of an adder by using a quantum AND logic gate and an inverse quantum AND logic gate, provided by an embodiment of the present invention. Fig.12 In the case of n-qubit binary input |a>=|a n-1 …a1a0> and |b>=|b n-1 …b1b0> are added and then output. The subscript is the index of the corresponding bit of the binary number. Fig.12 In the above, M gate and U gate are quantum logic gates introduced for the convenience of description. Their specific composition is shown in Fig.12 Specifically, Fig.12 As shown, the M gate is composed of a QuAND gate and three CNOT gates, and the U gate is composed of an inverse QuAND gate and three CNOT gates. The specific construction method can be referred to Fig.12 Specifically, the M gate calculates the carry information generated by the addition, and the U gate restores the M gate and completes the addition of two integers. In this way, the construction of the adder logic operation circuit can be realized quickly and efficiently based on the quantum AND logic gate and the inverse quantum AND logic gate.
[0113] It should be noted that Fig.10 , Fig.11 and Fig.12 In the figure, the circuit symbol composed of a black dot and a circle with a cross represents a CNOT gate.
[0114] Optionally, in addition to the above circuits, other arithmetic and Boolean logic circuits can be constructed by referring to classical circuits in a similar manner, using the above quantum AND logic gates to replace AND gates in classical circuits, and no specific limitation is made here.
[0115] Specifically, in this embodiment, auxiliary energy levels are used to construct efficient quantum AND logic gates (i.e., QuAND gates), in which the quantum bit state recording the AND logic result is still |0> or |1>, and auxiliary energy levels are used only on another quantum bit to record intermediate information to maintain the reversibility of the gate operation, and the auxiliary energy levels do not participate in additional operations. In the process of using quantum AND logic gates to construct other multi-bit quantum control gates or logic circuits, tree subgraphs are extracted from the physical topology of different quantum bit arrays, and the circuit depth of the synthetic multi-qubit gate is reduced to near-optimal by acting on the QuAND gates in parallel from the leaves of the tree graph to the root. At the same time, it is also possible to combine classical circuit optimization techniques and use QuAND to simulate classical AND gates to achieve efficient simulation of any classical logic circuit, which is conducive to improving the simplicity of performing operations on quantum bits.
[0116] Specifically, Fig.13 As shown, this embodiment also provides a multi-qubit control gate circuit, in which the multi-qubit control gate circuit includes one or more multi-qubit control gates, and at least one component module of the multi-qubit control gate includes any one of the above-mentioned quantum AND logic gates and / or any one of the above-mentioned inverse quantum AND logic gates.
[0117] It should be noted that Fig.13 This is only used for example and is not used to limit the number of multi-qubit control gates in a multi-qubit control gate circuit and their connection relationship. The specific implementation logic and functions of the above quantum AND logic gate and inverse quantum AND logic gate can be referred to the above description and will not be repeated here.
[0118] It should be understood that the serial numbers of the steps in the above embodiments do not imply a sequence of execution, and the execution sequence of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present invention.
[0119] Those skilled in the art can clearly understand that, for the convenience and simplicity of description, only the division of the above-mentioned functional units and modules is used as an example for illustration. In practical applications, the above-mentioned function allocation can be completed by different functional units and modules as needed, that is, the internal structure of the above-mentioned device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiment can be integrated in a processing unit, or each unit can exist physically separately, or two or more units can be integrated in one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of software functional units. In addition, the specific names of the functional units and modules are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of the present invention. The specific working process of the units and modules in the above-mentioned system can refer to the corresponding process in the aforementioned method embodiment, which will not be repeated here.
[0120] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described or recorded in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0121] Those skilled in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present invention.
[0122] In the embodiments provided by the present invention, it should be understood that the disclosed apparatus / terminal equipment and method can be implemented in other ways. For example, the apparatus / terminal equipment embodiments described above are only illustrative, for example, the division of the above modules or units is only a logical function division, and in actual implementation, other division methods can be used, for example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed.
[0123] If the above-mentioned integrated module / unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on such an understanding, the present invention implements all or part of the processes in the above-mentioned embodiment method, and can also be completed by instructing the relevant hardware through a computer program. The above-mentioned computer program can be stored in a computer-readable storage medium, and the computer program can implement the steps of the above-mentioned various method embodiments when executed by the processor. Among them, the above-mentioned computer program includes computer program code, and the above-mentioned computer program code can be in source code form, object code form, executable file or some intermediate form. The above-mentioned computer-readable medium may include: any entity or device capable of carrying the above-mentioned computer program code, recording medium, U disk, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), electric carrier signal, telecommunication signal and software distribution medium. It should be noted that the content contained in the above-mentioned computer-readable storage medium can be appropriately increased or decreased according to the requirements of legislation and patent practice in the jurisdiction.
[0124] The embodiments described above are only used to illustrate the technical solutions of the present invention, rather than to limit the same. Although the present invention has been described in detail with reference to the aforementioned embodiments, it should be understood by those skilled in the art that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features therein may be replaced by equivalents. However, these modifications or replacements do not deviate from the spirit and scope of the technical solutions of the embodiments of the present invention, and should be included in the protection scope of the present invention.
Claims
1. A quantum AND logic gate, characterized in that: The quantum AND logic gate performs the AND logic operation of the quantum bit according to the following steps: Get two input qubits; Based on the input qubit, a first output qubit and a second output qubit are obtained through a preset quantum operation, wherein the second output qubit is used to store an AND logic operation result of the two input qubits, and the first output qubit is used to indicate the quantum state of the two input qubits; The quantum state of the first output quantum bit is any one of at least three preset indicating quantum states, and one indicating quantum state is used to indicate a combination of quantum states of the two input quantum bits; The preset quantum operation is realized by a combination of a single quantum bit X gate and a quantum state exchange gate; The three indicating quantum states include |1>, |2> and |0>, the quantum state exchange gate is used to realize the exchange between the quantum states |11> and |20>, and the input quantum bit includes a first input quantum bit and a second input quantum bit; The preset quantum operation includes: transforming the quantum state of the first input quantum bit through the single quantum bit X gate to obtain a first intermediate quantum state, combining the first intermediate quantum state and the quantum state of the second input quantum bit to form a second intermediate quantum state, inputting the second intermediate quantum state into the quantum state exchange gate and obtaining the output of the quantum state exchange gate, and obtaining the first output quantum bit and the second output quantum bit based on the output of the quantum state exchange gate.
2. The quantum AND logic gate according to claim 1, characterized in that: When the quantum state of the first output qubit and the quantum state of the second output qubit are obtained, the quantum state of the first input qubit and the quantum state of the second input qubit are determined based on the indication of the first output qubit by the following steps: When the quantum state of the second output qubit is |1>, the quantum state of the first input qubit and the quantum state of the second input qubit are both |1>; When the quantum state of the second output qubit is |0>, the quantum state of the first input qubit and the quantum state of the second input qubit are determined based on the indication of the quantum state of the first output qubit, wherein when the quantum state of the first output qubit is |1>, the quantum state of the first input qubit and the quantum state of the second input qubit are both |0>, when the quantum state of the first output qubit is |2>, the quantum state of the first input qubit and the quantum state of the second input qubit are |0> and |1> respectively, and when the quantum state of the first output qubit is |0>, the quantum state of the first input qubit and the quantum state of the second input qubit are |1> and |0> respectively.
3. A quantum AND logic gate, characterized in that: The quantum AND logic gate comprises: a first input terminal, a second input terminal, a quantum operation module, a first output terminal and a second output terminal; The first input end and the second input end are used to obtain two input quantum bits; The quantum operation module is used to process the two input qubits through a preset quantum operation to obtain a first output qubit and a second output qubit, wherein the second output qubit is used to store an AND logic operation result of the two input qubits, and the first output qubit is used to indicate the quantum state of the two input qubits; The first output end is used to output the first output qubit, and the second output end is used to output the second output qubit; The quantum state of the first output quantum bit is any one of at least three preset indicating quantum states, and one indicating quantum state is used to indicate a combination of quantum states of the two input quantum bits; The preset quantum operation is realized by a combination of a single quantum bit X gate and a quantum state exchange gate; The three indicating quantum states include |1>, |2> and |0>, the quantum state exchange gate is used to realize the exchange between the quantum states |11> and |20>, and the input quantum bit includes a first input quantum bit and a second input quantum bit; The preset quantum operation includes: transforming the quantum state of the first input quantum bit through the single quantum bit X gate to obtain a first intermediate quantum state, combining the first intermediate quantum state and the quantum state of the second input quantum bit to form a second intermediate quantum state, inputting the second intermediate quantum state into the quantum state exchange gate and obtaining the output of the quantum state exchange gate, and obtaining the first output quantum bit and the second output quantum bit based on the output of the quantum state exchange gate.
4. An inverse quantum AND logic gate, characterized in that: The inverse quantum AND logic gate performs the inverse operation of the AND logic of the quantum bit according to the following steps: Obtaining a third input quantum bit and a fourth input quantum bit; Based on the third input qubit and the fourth input qubit, obtaining a third output qubit and a fourth output qubit indicated by the third input qubit through a preset quantum operation, wherein a result of an AND logic operation of the third output qubit and the fourth output qubit is equal to the quantum state of the fourth input qubit; The quantum state of the third input quantum bit is any one of at least three preset indicating quantum states, and one indicating quantum state is used to indicate a combination of the quantum state of the third output quantum bit and the quantum state of the fourth output quantum bit; The preset quantum operation is realized by a combination of a single quantum bit X gate and a quantum state exchange gate; The three indicating quantum states include |1>, |2> and |0>, and the quantum state exchange gate is used to realize the exchange between the quantum states |11> and |20>; The preset quantum operation includes: forming a third intermediate quantum state for inputting the quantum state exchange gate based on the quantum state of the third input quantum bit and the quantum state of the fourth input quantum bit, inputting the third intermediate quantum state into the quantum state exchange gate and obtaining a fourth intermediate quantum state output by the quantum state exchange gate, splitting the fourth intermediate quantum state into a fifth intermediate quantum state and a sixth intermediate quantum state, transforming the fifth intermediate quantum state through the single quantum bit X gate to obtain a third output quantum bit, and using the sixth intermediate quantum state as the fourth output quantum bit.
5. A method for generating a logic operation circuit, characterized in that: The method comprises: Obtaining operation information of a target logic operation circuit; Based on the operation information, a target logic gate is obtained and the target logic operation circuit is constructed, wherein the target logic gate includes the quantum AND logic gate according to any one of claims 1 to 3 and / or the inverse quantum AND logic gate according to claim 4.
6. The method for generating a logic operation circuit according to claim 5, characterized in that: The target logic operation circuit includes an incrementer logic operation circuit, a constant adder logic operation circuit or an adder logic operation circuit.
7. A multi-qubit control gate circuit, characterized in that: The multi-qubit control gate circuit includes one or more multi-qubit control gates, and at least one component module of the multi-qubit control gate includes the quantum AND logic gate as described in any one of claims 1 to 3 and / or the inverse quantum AND logic gate as described in claim 4.
Citation Information
Patent Citations
Realization method of AES encryption system hardware module based on quantum reversible logic
CN108650076A
Processing method and device for two-quantum-bit logic gate
CN113033811A
