A kind of quantum comparison device design method based on quantum superposition state
Technical field
The present invention relates to quantum wire design fields, are specifically related to the quantum comparison device based on quantum superposition state
Design method.
Background technique
In quantum calculation, information unit is indicated with quantum bit, and there are two basic quantum states for it | 0 > with | 1 >, substantially
Quantum state is referred to as ground state.One quantum bit can be the linear combination of two ground state, be commonly referred to as superposition state, can indicate
For | ψ >=a | 0 >+b | 1 >, wherein a and b is two plural numbers.
Tensor product is to be combined small vector space, constitutes a kind of method of bigger vector space, uses symbolTable
Show.For two ground state | u > with | v >, their tensor productCommon dummy suffix notation | uv >, | u > | v > or | u, v > table
Show, such as ground state | 0 > with | 1 >, their tensor product is represented by
For the n times tensor product of matrix UIt can write a Chinese character in simplified form intoFor quantum state | u > n times tensor productIt can also write a Chinese character in simplified form into
Quantum wire can be made of the quantum bit door of a sequence, in the expression figure of quantum wire, every line all tables
Show the line of quantum wire, the execution sequence of quantum wire is from left to right.What quantum bit door can be convenient uses matrix form
It indicates.The quantum door of n quantum bit can use one 2n×2nUnitary matrice U indicate, i.e.,Wherein U+It is being total to for U
Yoke transposed matrix, I are unit matrix,It is the n times tensor product of I.X (NOT gate), V and V+It is three common single quantum bits
Door, their matrix expression are respectively as follows:
Wherein i is imaginary unit.
Most important muliti-qubit door be it is U controlled, by control quantum bit and target quantum bit, work as control bit
It when being 1, is indicated with stain, when control bit is 0, is shown by white dots.Work as U=X, V, V+, at this time controlled U be referred to as by
Control NOT gate, V controlled, controlled V+Door, in addition, controlled not-gate and controlled V+Door can also be combined into the fusion door of 2 quantum bits,
Fig. 1 is shown in their symbol expression.One 3 important quantum bit door is Toffoli, and Fig. 2 is shown in symbol expression.
One index of performance of quantum wire is the quantum cost of route.It is V controlled, controlled V+Door and 2 quantum bits
Quantum cost be all 1, Toffoli quantum cost be 5.The quantum cost of route refers to the total amount of quantum door in route
Filial generation valence.
Can be indicated with n quantum bit one less than 2nInteger: | bn-1bn-2...b0>, wherein bh∈ { 0,1 }, h=
0 ..., n-1.
Further, n+m quantum bit state
Can store a size is 2mColumn vector:
Wherein b (j) is a n integers, j=0 ..., 2m- 1, n and m are positive integers.
Summary of the invention
The present invention provides the design method of the quantum comparison device based on quantum superposition state, including quantum borrows device and reset
The design method of device, and device is borrowed by quantum and restorer constitutes the design method of n quantum comparison devices, finally using setting
The quantum comparison device counted realizes the comparison operation based on quantum superposition state;High efficiency of the quantum information processing in signal processing:
10n+1 basic operation is only needed to achieve that 2mA n integer comparison operation, and realize that corresponding addition is transported with classic computer
Calculation needs O (n2m) basic operation
Technical solution of the present invention:
The present invention utilizes the controlled door of basic quantum (that is: controlled not-gate, V controlled, controlled quantum full adder V+Door and 2 amounts
The fusion door of sub- bit) construct the realization route of quantum adder.
The specific design scheme and step of invention are as follows:
1, quantum borrows the design of device and restorer
Realize that the quantum in Fig. 3 borrows device designed lines using the fusion door of four controlled doors and 2 quantum bits,
Its schematic diagram is as shown in figure 4, with symbol BoIt indicates.
Quantum is borrowed into device and is applied to quantum state | ci-1>|bi>|ai>, it obtains
WhereinIt is xor operation, ci-1, bi, ai∈ { 0,1 },Work as ci-1Indicate that two integers subtract b-a's
First i-1 subtract borrow, bi, aiRespectively indicate integer b, the i-th bit number of a, thenIndicate that two integers subtract
What preceding i of b-a subtracted borrows.
In order to which quantum to be borrowed to (i.e. first quantum bit of the ancillary qubit after device operation
Reset to | ci-1>, the quantum restorer of design such as Fig. 5, it is made of the fusion door of four controlled doors and 2 quantum bits,
Its schematic diagram is as shown in fig. 6, with symbol ReIt indicates.
Quantum restorer is applied to quantum stateIt obtains
WhereinIt is xor operation, ci, bi, ai∈ { 0,1 }.Quantum restorer will known to formula (3)It is reset to | ci-1>|bi>|ai>。。
Quantum wire in analysis chart 3 and Fig. 5, it is 5 that quantum, which can be obtained, and borrow the quantum cost of device, corresponding restorer
Quantum cost is also 5.
2, the design of the quantum comparison device of n quantum bit
The quantum comparison device of the n quantum bit in device, quantum restorer and Toffoli realization Fig. 7 is borrowed using quantum
Designed lines, with symbol CaIt indicates.The quantum comparison device of n quantum bit borrows device, (n-1) a quantum reset by (n-1) is a
Device, 2 Toffoli and the controlled door composition of 1 quantum, it realizes the comparison operation of two n integers.
Assuming that n integers a and b are stored in the ground state of following two n quantum bits:
Wherein an-1an-2...a0And bn-1bn-2...b0It is the binary representation of integer a and b, a respectivelyh, bh∈ { 0,1 }, h
=0 ..., n-1.
Add the quantum ground state of 2 quantum bitsAs the service bit of quantum comparison device, and put in order to obtain |
0bn-1an-1bn-2an-2...0b0a0> as input.Quantum comparison device is applied to | 0bn-1an-1bn-2an-2...0b0a0>, it obtains
Ca|0bn-1an-1bn-2an-2...0b0a0>=| ξ bn-1an-1bn-2an-2...0b0a0> (5)
Wherein as b >=a, ξ=0, as b < a, ξ=1.
By formula (5) it is found that quantum comparison device realizes following comparison operation:
By formula (6) it is found that being all before one of auxiliary quantum bit arithmetic and after operation | 0 >, it will not be with preservation
The quantum state composition of operation result is tangled, therefore can be removed after operation, therefore the schematic diagram of quantum comparison device can use the symbol of Fig. 8
Number indicate.
Quantum wire in analysis chart 7 can obtain realizing that the quantum bit device quantum cost of n integers is 10 (n-1)+2
× 5+1=10n+1, n >=2.
3, the comparison operation based on quantum superposition state is realized
By formula (1) it is found that 2mThe column vector of a element
In the quantum superposition state that can store following (n+m) quantum bit:
Wherein b (j) is a n integers, j=0 ..., 2m- 1, n and m are positive integers.
By comparator CaWithTensor operation obtains new quantum operationWherein symbolFor tensor operation symbol
Number.It willIt is applied to
It obtains
Wherein an-1an-2...a0With b (j)n-1b(j)n-2...b(j)0It is the binary representation of integer a, b (j) respectively, works as b
(j) >=a when, ξ (j)=0, as b (j) < a, ξ (j)=1, n, m are integer.
By formula (7) it is found thatRealize following comparison operation:
WhereinRealize following comparison operation:
By formula (7) it is found that design can realize the comparison operation in formula (9) such as the quantum wire in Fig. 9, it is by one
The quantum comparison device of a n quantum bit and the line of m quantum bit are constituted.
Quantum wire in analysis chart 10, can obtain the add operation route quantum cost based on quantum superposition state is 10n
+ 1, it can Parallel Implementation 2mA n integer comparison operation, this has fully demonstrated the high efficiency of the alternative route of this patent realization.
The advantages and effects of the present invention are:
The present invention solves the problems, such as " the quantum comparison operation of quantum superposition state ", devises one based on quantum superposition state
Quantum comparison device.The present invention embodies quantum information processing in the high efficiency of signal processing: only needing 10n+1 basic operation
Achieve that 2mA n integer comparison operation, and realize that corresponding add operation needs O (n2 with classic computerm) grasp substantially
Make.Another advantage of the invention is to devise restorer, so that the number for participating in comparison operation is not destroyed after operation.
The add operation route quantum cost of quantum superposition state is 10n+1, can Parallel Implementation 2mA n integer comparison operation, this is filled
Divide and embodies the high efficiency of the alternative route of this method realization.
Detailed description of the invention
Fig. 1 is the title and symbol table diagram of the controlled door of 2 quantum bits of the invention;
Fig. 2 is quantum Toffoli titles of the present invention and symbol table diagram;
Fig. 3 is the quantum realization line map that quantum of the present invention borrows device;
Fig. 4 is the quantum realization schematic circuit diagram that quantum of the present invention borrows device;
Fig. 5 is that the quantum of quantum restorer of the present invention realizes line map;
Fig. 6 is that the quantum of quantum restorer of the present invention realizes schematic circuit diagram;
Fig. 7 is the quantum wire figure of the quantum comparison device of n quantum bit of the present invention;
Fig. 8 is the quantum wire schematic diagram of the quantum comparison device of n quantum bit of the present invention;
Fig. 9 is that the present invention is based on the quantum wire figures of the comparison operation of quantum superposition state;
Figure 10 is that the quantum of one comparison operation example based on quantum superposition state of the present invention realizes line map.
Specific embodiment
The invention will be further described with reference to embodiments.
As Figure 1-10 shows, detailed process is as follows:
1, quantum borrows the design of device and restorer
Realize that the quantum in Fig. 3 borrows device designed lines using the fusion door of four controlled doors and 2 quantum bits,
Its schematic diagram is as shown in figure 4, with symbol BoIt indicates.
Quantum is borrowed into device and is applied to quantum state | ci-1>|bi>|ai>, it obtains
WhereinIt is xor operation, ci-1, bi, ai∈ { 0,1 },Work as ci-1Indicate that two integers subtract b-a's
First i-1 subtract borrow, bi, aiRespectively indicate integer b, the i-th bit number of a, thenIndicate that two integers subtract
What preceding i of b-a subtracted borrows.
In order to which quantum to be borrowed to (i.e. first quantum bit of the ancillary qubit after device operation
Reset to | ci-1>, the quantum restorer of design such as Fig. 5, it is made of the fusion door of four controlled doors and 2 quantum bits,
Its schematic diagram is as shown in fig. 6, with symbol ReIt indicates.
Quantum restorer is applied to quantum stateIt obtains
WhereinIt is xor operation, ci, bi, ai∈ { 0,1 }.Quantum restorer will known to formula (3)It is reset to | ci-1>|bi>|ai>。。
Quantum wire in analysis chart 3 and Fig. 5, it is 5 that quantum, which can be obtained, and borrow the quantum cost of device, corresponding restorer
Quantum cost is also 5.
2, the design of the quantum comparison device of n quantum bit
The quantum comparison device of the n quantum bit in device, quantum restorer and Toffoli realization Fig. 7 is borrowed using quantum
Designed lines, with symbol CaIt indicates.The quantum comparison device of n quantum bit borrows device, (n-1) a quantum reset by (n-1) is a
Device, 2 Toffoli and the controlled door composition of 1 quantum, it realizes the comparison operation of two n integers.
Assuming that n integers a and b are stored in the ground state of following two n quantum bits:
Wherein an-1an-2...a0And bn-1bn-2...b0It is the binary representation of integer a and b, a respectivelyh, bh∈ { 0,1 }, h
=0 ..., n-1.
Add the quantum ground state of 2 quantum bitsAs the service bit of quantum comparison device, and put in order to obtain |
0bn-1an-1bn-2an-2...0b0a0> as input.Quantum comparison device is applied to | 0bn-1an-1bn-2an-2...0b0a0>, it obtains
Ca|0bn-1an-1bn-2an-2...0b0a0>=| ξ bn-1an-1bn-2an-2...0b0a0> (5)
Wherein as b >=a, ξ=0, as b < a, ξ=1.
By formula (5) it is found that quantum comparison device realizes following comparison operation:
By formula (6) it is found that being all before one of auxiliary quantum bit arithmetic and after operation | 0 >, it will not be with preservation
The quantum state composition of operation result is tangled, therefore can be removed after operation, therefore the schematic diagram of quantum comparison device can use the symbol of Fig. 8
Number indicate.
Quantum wire in analysis chart 7 can obtain realizing that the quantum bit device quantum cost of n integers is 10 (n-1)+2
× 5+1=10n+1, n >=2.
3, the comparison operation based on quantum superposition state is realized
By formula (1) it is found that 2mThe column vector of a element
In the quantum superposition state that can store following (n+m) quantum bit:
Wherein b (j) is a n integers, j=0 ..., 2m- 1, n and m are positive integers.
By comparator CaWithTensor operation obtains new quantum operationWherein symbolFor tensor operation symbol
Number.It willIt is applied to
It obtains
Wherein an-1an-2...a0With b (j)n-1b(j)n-2...b(j)0It is the binary representation of integer a, b (j) respectively, works as b
(j) >=a when, ξ (j)=0, as b (j) < a, ξ (j)=1, n, m are integer.
By formula (7) it is found thatRealize following comparison operation:
WhereinRealize following comparison operation:
By formula (7) it is found that design can realize the comparison operation in formula (9) such as the quantum wire in Fig. 9, it is by one
The quantum comparison device of a n quantum bit and the line of m quantum bit are constituted.
Quantum wire in analysis chart 10, can obtain the add operation route quantum cost based on quantum superposition state is 10n
+ 1, it can Parallel Implementation 2mA n integer comparison operation, this has fully demonstrated the high efficiency of the alternative route of this patent realization.
Data procedures are implemented, by formula (1) it is found that working as m=3, when n=3, one 23× 1 integer vectors [0 1
2 3 4 5 6 7]TIt can store in following quantum state:
Wherein b (j)=j, j=0,1 ..., 7.
Quantum wire in design drawing 10 realizes 8 following comparison operations
Quantum wire in Figure 10 dashed box is the quantum comparison musical instruments used in a Buddhist or Taoist mass of 3 quantum bits, it borrows device, 2 by 2 quantum
Quantum restorer, 2 Toffoli and a quantum controlled not-gate are constituted, therefore the quantum cost of route is 31, it can
The comparison operation of two 3 digits is realized by 31 quantum basic operations.By formula (8) it is found that the quantum wire in Figure 10 is realized
Following comparison operation:
Wherein
By formula (12) it is found that the quantum wire in Figure 10 realizes 8 comparison operations in formula (11), and participate in
The operand of operation is not destroyed.It does not need to increase since the quantum comparison device of 3 quantum bits is applied to quantum superposition state
New quantum door, because the quantum cost of the quantum wire in Figure 10 is also 31.