Dirty quantum constant comparator, dirty quantum variable comparator, and quantum computer

By designing a dirty quantum constant comparator and a dirty quantum variable comparator, the magnitude of the quantum state and the constant are compared using dirty qubits, which solves the problem of low utilization efficiency of dirty qubits and realizes the rational utilization and effective comparison of qubit resources.

CN119494414BActive Publication Date: 2025-12-09ORIGIN QUANTUM COMPUTING TECH (HEFEI) CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202311037865.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-08-17
Publication Date
2025-12-09
Estimated Expiration
2043-08-17

AI Technical Summary

Technical Problem

In existing quantum computing technologies, dirty qubits are inefficiently utilized, leading to resource waste and making it impossible to efficiently compare the size of a quantum state with a constant or compare the size of different quantum states.

Method used

A dirty quantum constant comparator and a dirty quantum variable comparator are designed. Using dirty qubits and clean qubits, the magnitude comparison between the quantum state and the constant is realized through subtraction and addition modules. The module includes a dirty quantum subtraction module and a dirty quantum addition module. The dirty qubits are used to perform borrow and carry judgment to realize the restoration of the quantum state.

Benefits of technology

This improves the utilization efficiency of quantum bit resources, saves clean quantum bits, enables an effective comparison between quantum state and constant size, and enhances the resource rationality of quantum computers.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119494414B_ABST
    Figure CN119494414B_ABST
Patent Text Reader

Abstract

The application provides a dirty quantum constant comparator, a dirty quantum variable comparator and a quantum computer. The dirty quantum constant comparator, the dirty quantum variable comparator and the quantum computer can compare quantum states with constants and compare two quantum states in size based on dirty quantum bits and clean quantum bits. In the process of implementing the function of the quantum comparator, the dirty quantum bits are used, so that the clean quantum bits can be saved, and the quantum bit resources are more reasonably utilized.
Need to check novelty before this filing date? Find Prior Art

Claims

1. A dirty quantum constant comparator, comprising: The method comprises the following steps: A first dirty quantum increment submodule is configured to perform an increment operation on a high bit part of the first quantum state using dirty quantum bits and clean quantum bits, and obtain a fourth quantum state, in a case where a quantum state of a quantum bit representing a borrow result satisfies an increment operation; or output the first quantum state as the fourth quantum state, in a case where the quantum state of the quantum bit representing the borrow result does not satisfy the increment operation; A first series of X gate submodules is configured to perform a NOT logic operation on a high bit part of the fourth quantum state, and obtain a fifth quantum state; A first dirty quantum constant carry-in device is configured to perform a borrow judgment on a low bit of the fifth quantum state and a low bit of a first constant using dirty quantum bits and clean quantum bits, and apply a borrow result to a quantum bit representing the borrow result; A second dirty quantum increment submodule is configured to perform an increment operation on a high bit part of the fifth quantum state using dirty quantum bits and clean quantum bits, and obtain a sixth quantum state, in a case where a quantum state of a quantum bit representing a borrow result satisfies an increment operation; or output the fifth quantum state as the sixth quantum state, in a case where the quantum state of the quantum bit representing the borrow result does not satisfy the increment operation; A second series of X gate submodules is configured to perform a NOT logic operation on a high bit part of the sixth quantum state, and obtain a seventh quantum state; A second dirty quantum constant carry-in device is configured to perform a borrow judgment on a low bit of the seventh quantum state and a low bit of a first constant using dirty quantum bits and clean quantum bits, and apply a borrow result to a quantum bit representing the borrow result; A first dirty quantum addition submodule is configured to perform a subtraction operation on a high bit of the seventh quantum state and a high bit of the first constant, and perform a subtraction operation on a low bit of the seventh quantum state and a low bit of the first constant, and obtain a third quantum state. The quantum state of the quantum bit representing the borrow result is the second quantum state, wherein, in a case where the second quantum state represents a borrow, a value of the first quantum state is less than the first constant; and in a case where the second quantum state represents no borrow, the value of the first quantum state is not less than the first constant.

2. The dirty quantum constant comparator of claim 1, wherein, The first dirty quantum increment submodule comprises: A third quantum bit exchange unit, a third same-variable subtractor, a fifth series of X gate units, a third same-variable adder, a sixth series of X gate units, a fourth same-variable subtractor, a seventh series of X gate units, a fourth same-variable adder, an eighth series of X gate units, and a fourth quantum bit exchange unit. The third quantum bit exchange unit is configured to exchange quantum states of dirty quantum bits and designated clean quantum bits. The third same-variable subtractor is configured to calculate a difference between n quantum bits representing a low bit and n quantum bits representing a high bit. The fifth series of X gate units is configured to perform a NOT logic operation on the n quantum bits representing the low bit. The third same-variable adder is configured to calculate a sum of the n quantum bits representing the low bit and the n quantum bits representing the high bit. The sixth series of X gate units is configured to perform a NOT logic operation on the n quantum bits representing the low bit. The fourth same-variable subtractor is configured to calculate a difference between the n quantum bits representing the high bit and the n quantum bits representing the low bit. The seventh series of X gate units are configured to perform a NOT logical operation on each quantum bit. The fourth same-quantity variable adder is configured to calculate a sum of the n quantum bits representing high bits and the n quantum bits representing low bits. The eighth series of X gate units are configured to perform a NOT logical operation on each quantum bit. The fourth quantum bit exchange unit is configured to exchange quantum states of the dirty quantum bit and the designated clean quantum bit.

3. The dirty quantum constant comparator of claim 1, wherein, The first dirty quantum constant adder is configured to: interleave quantum states of the input clean quantum bit and the dirty quantum bit, and increase a preset quantum bit at the highest bit to obtain a current quantum state; perform a CNOT gate logical operation on two quantum bits representing the lowest bits of the current quantum state to update the current quantum state; determine a quantum bit to be operated according to the low bits of the first constant, and perform a NOT logical operation on the quantum bit to be operated in the current quantum state to update the current quantum state; perform a CNOT gate logical operation on two quantum bits representing the lowest bits of the current quantum state to update the current quantum state; determine a quantum bit to be operated according to the low bits of the first constant, and perform a NOT logical operation on the quantum bit to be operated in the current quantum state to update the current quantum state; wherein a quantum state of a preset quantum bit in the current quantum state represents a carry result.

4. The dirty quantum constant comparator of claim 1, wherein, The dirty quantum constant comparator further includes: a dirty quantum constant addition module configured to calculate an addition of the third quantum state and the first constant based on the dirty quantum bit and the clean quantum bit, and restore the first quantum state.

5. The dirty quantum constant comparator of claim 4, wherein, The dirty quantum constant addition module includes: a third dirty quantum increment sub-module, a third series of X gate sub-modules, a third dirty quantum constant adder, a fourth dirty quantum increment sub-module, a fourth dirty quantum constant adder, a fourth series of X gate sub-modules, and a second dirty quantum addition sub-module. The third dirty quantum increment sub-module is configured to perform an increment operation on a high bit part of the third quantum state to obtain an eighth quantum state, using the dirty quantum bit and the clean quantum bit, in a case where a quantum state of a quantum bit representing a carry result satisfies the increment operation; or output the third quantum state as the eighth quantum state in a case where a quantum state of a quantum bit representing a borrow result does not satisfy the increment operation. The third series of X gate sub-modules are configured to perform a NOT logical operation on a high bit part of the eighth quantum state to obtain a ninth quantum state. The third dirty quantum constant adder is configured to perform a carry judgment on a low bit of the ninth quantum state and a low bit of the first constant using the dirty quantum bit and the clean quantum bit, and apply a carry result to the quantum bit representing the carry result. The fourth dirty quantum increment sub-module is configured to perform an increment operation on a high bit part of the ninth quantum state to obtain a tenth quantum state, using the dirty quantum bit and the clean quantum bit, in a case where a quantum state of a quantum bit representing a carry result satisfies the increment operation; or output the ninth quantum state as the tenth quantum state in a case where the quantum state of the quantum bit representing the carry result does not satisfy the increment operation. The fourth dirty quantum constant adder is configured to determine a carry by using the dirty quantum bit and the clean quantum bit, and apply the carry to a quantum bit representing the carry. The fourth series of X gate sub-modules are configured to perform a NOT logic operation on the high bits of the tenth quantum state to obtain an eleventh quantum state. The second dirty quantum adder is configured to perform an addition operation on the high bits of the eleventh quantum state and the high bits of the first constant, and perform an addition operation on the low bits of the eleventh quantum state and the low bits of the first constant to obtain the first quantum state.

6. The dirty quantum constant comparator of claim 5, wherein, The third dirty quantum adder includes: a first quantum bit exchange unit, a first same-variable subtractor, a first series of X gate units, a first same-variable adder, a second series of X gate units, a second same-variable subtractor, a third series of X gate units, a second same-variable adder, a fourth series of X gate units, and a second quantum bit exchange unit. The first quantum bit exchange unit is configured to exchange the quantum state of the dirty quantum bit and a designated clean quantum bit. The first same-variable subtractor is configured to calculate the difference between n quantum bits representing the low bits and n quantum bits representing the high bits. The first series of X gate units is configured to perform a NOT logic operation on the n quantum bits representing the low bits. The first same-variable adder is configured to calculate the sum of the n quantum bits representing the low bits and the n quantum bits representing the high bits. The second series of X gate units is configured to perform a NOT logic operation on the n quantum bits representing the low bits. The second same-variable subtractor is configured to calculate the difference between the n quantum bits representing the high bits and the n quantum bits representing the low bits. The third series of X gate units is configured to perform a NOT logic operation on each quantum bit. The second same-variable adder is configured to calculate the sum of the n quantum bits representing the high bits and the n quantum bits representing the low bits. The fourth series of X gate units is configured to perform a NOT logic operation on each quantum bit. The second quantum bit exchange unit is configured to exchange the quantum state of the dirty quantum bit and a designated clean quantum bit.

7. The dirty quantum constant comparator of claim 5, wherein, The third dirty quantum constant adder is configured to: interleave the quantum states of the input clean quantum bit and the dirty quantum bit, and add a preset quantum bit at the highest bit to obtain a current quantum state; perform a CNOT gate logic operation on the two quantum bits representing the lowest bits of the current quantum state to update the current quantum state; determine the quantum bit to be operated according to the low bits of the first constant, and perform a NOT logic operation on the quantum bit to be operated in the current quantum state to update the current quantum state; perform a CNOT gate logic operation on the two quantum bits representing the lowest bits of the current quantum state to update the current quantum state; determine the quantum bit to be operated according to the low bits of the first constant, and perform a NOT logic operation on the quantum bit to be operated in the current quantum state to update the current quantum state; wherein the quantum state of the preset quantum bit in the current quantum state represents the carry result.

8. A dirty quantum variable comparator, comprising: The third dirty quantum constant adder includes: The first dirty quantum subtract one submodule, the fifth dirty quantum add one submodule, the first series of logic gates, the sixth dirty quantum add one submodule, and the second series of logic gates are used to perform a dirty quantum variable adder operation. The first dirty quantum subtract one submodule, the fifth dirty quantum add one submodule, the first series of logic gates, the sixth dirty quantum add one submodule, and the second series of logic gates are used to perform a dirty quantum variable adder operation. The first dirty quantum subtract one submodule is configured to perform a dirty quantum subtract one operation on a high bit part of an input quantum state and output the result, using dirty quantum bits and clean quantum bits, if a quantum state of a quantum bit representing a borrow result satisfies a subtract one operation; and output the input quantum state if the quantum state of the quantum bit representing the borrow result does not satisfy the subtract one operation; an A quantum state and a B quantum state are input, and a C quantum state represents a borrow result of the input A quantum state and the input B quantum state; if the C quantum state represents a borrow, the A quantum state is smaller than the B quantum state; and if the C quantum state represents no borrow, the A quantum state is not smaller than the B quantum state. The fifth dirty quantum add one submodule is configured to perform a dirty quantum add one operation on a high bit part of an input quantum state and output the result, using dirty quantum bits and clean quantum bits, if a quantum state of a quantum bit representing a carry result satisfies an add one operation; and output the input quantum state if the quantum state of the quantum bit representing the carry result does not satisfy the add one operation. The first series of logic gates is configured to perform a logic gate operation on an input quantum state. The sixth dirty quantum add one submodule is configured to perform a dirty quantum add one operation on a high bit part of an input quantum state and output the result, using dirty quantum bits and clean quantum bits, if a quantum state of a quantum bit representing a carry result satisfies an add one operation; and output the input quantum state if the quantum state of the quantum bit representing the carry result does not satisfy the add one operation. The second series of logic gates is configured to perform a logic gate operation on an input quantum state. The dirty quantum variable adder is configured to calculate a high bit and a low bit add operation in a D quantum state and restore an A quantum state and a B quantum state, based on dirty quantum bits and clean quantum bits; the D quantum state represents a subtraction result of the input A quantum state and the input B quantum state.

9. A quantum computer, characterized by The dirty quantum constant comparator and / or the dirty quantum variable comparator are included.

Citation Information

Patent Citations

  • Measurement Based Uncomputation for Quantum Circuit Optimization

    US20200311594A1

  • Provisioning fucntional-level information to be utilized in gate-level processing of quantum circuits

    US20230112525A1