Method and system for realizing conditional statements by quantum computer
A technology of quantum computer and conditional statement, applied in the field of quantum computing, can solve the problem that quantum computer cannot realize conditional statement and so on
- Summary
- Abstract
- Description
- Claims
- Application Information
AI Technical Summary
Problems solved by technology
Method used
Image
Examples
Embodiment 1
[0034] The if / then / else conditional statement in classical computing means "if (meeting the i-th condition) then (executing the i-th operation)"; in this embodiment, a method for implementing a conditional statement by a quantum computer is provided, Described method step flow process is as figure 1 As shown, the method includes the following steps:
[0035] S1: Two quantum registers are used as the control register and the target register respectively; in this embodiment, the control register and the target register are both multi-state systems, and are not limited to a single qubit with only two orthogonal states; In other embodiments of the present invention, both the control register and the target register can also use a single qubit with only two orthogonal states.
[0036] S2: Select a projection operator P for the control register i , such that the i-th condition is satisfied, the projection operator P i Will project successfully, select a unitary operator U for the...
Embodiment 2
[0049] This embodiment provides a construction method of a controlled-NOT (c-NOT) gate. The function of the controlled-NOT gate is defined as: when it acts on two registers A and B, if A's If the content is 0, keep the content of B unchanged; if the content of A is 1, reverse the content of B (that is, change 0 to 1, and change 1 to 0). Note that the two registers here only store 1 bit of information, that is, their contents are only selected from 0 and 1, not 2, 3... and other higher values.
[0050] That is equivalent to the following if / then logic:
[0051] If the 0th condition is met, that is, when the content of the control register A is 0,
[0052] Then execute the 0th operation: keep the target register B unchanged;
[0053] If the first condition is met, that is, when the content of the control register A is 1,
[0054] then executes the first operation: inverting the target register B.
[0055] Using a quantum computer to accomplish this task, the control register...
Embodiment 3
[0064] This embodiment provides a method for constructing a controlled-SWAP (c-SWAP) gate, also known as a Fredkin gate. The controlled-SWAP gate is a logic gate about three registers A, B and C, Where B and C are target registers.
[0065] The function of the controlled exchange gate is defined as: if the content of the control register A is 0, keep the contents of B and C unchanged; otherwise, if the content of A is 1, swap the contents of B and C.
[0066] That is equivalent to the following if / then logic:
[0067] If the 0th condition is met, that is, when the content of the control register A is 0,
[0068] Then execute the 0th operation: keep the target registers B and C unchanged;
[0069] If the first condition is met, that is, when the content of the control register A is 1,
[0070] then executes the first operation: swap the contents of the target registers B and C.
[0071] Same as Embodiment 2, when constructing its quantum form, the conditional statement is t...
PUM
Login to View More Abstract
Description
Claims
Application Information
Login to View More 


