Quantum circuit design support program, quantum circuit design support method, and quantum circuit design support apparatus
The quantum circuit design support program optimizes Ck-NOT gates by splitting and converting them into fewer gates, enhancing quantum computation efficiency and success probability through auxiliary qubit management.
Patent Information
- Authority / Receiving Office
- JP · JP
- Patent Type
- Patents
- Current Assignee / Owner
- FUJITSU LTD
- Filing Date
- 2023-01-18
- Publication Date
- 2026-07-01
Smart Images

Figure 0007883168000003 
Figure 0007883168000004 
Figure 0007883168000005
Abstract
Description
[Technical Field]
[0001] This invention relates to a quantum circuit design support program, a quantum circuit design support method, and a quantum circuit design support apparatus. [Background technology]
[0002] The content of quantum computations performed by a quantum computer or quantum computer simulator (hereinafter referred to as a quantum simulator) is represented by quantum circuits. A quantum circuit is a quantum computation model that combines various types of quantum gates. A quantum gate represents an operation that rewrites the state of a qubit. Quantum gates used in quantum circuits include basic quantum gates and others. Basic quantum gates are quantum gates that can be easily executed by a quantum computer.
[0003] When creating a quantum circuit, a quantum circuit is first generated using a quantum circuit description language, which shows the gate operation procedure to solve the target problem. The quantum circuit generated by the quantum circuit description language uses quantum gates that perform complex operations in addition to the basic quantum gates. Therefore, a classical computer converts the quantum gates other than the basic quantum data contained in the quantum circuit into equivalent quantum circuits (equivalent circuits) that are combinations of the basic quantum gates. This generates a quantum circuit described using only basic quantum gates.
[0004] Furthermore, converting quantum gates other than the basic quantum gates into equivalent circuits using combinations of basic quantum gates increases the number of quantum gates. An increase in the number of quantum gates within a quantum circuit reduces the efficiency of quantum computation by a quantum computer or quantum simulator. Also, in quantum computers, there is a limit to the time a qubit can maintain its quantum state. Therefore, a smaller number of basic quantum gates in a quantum circuit increases the probability of successful quantum computation. For these reasons, when converting quantum gates other than the basic quantum gates into equivalent circuits, it is desirable to convert them into equivalent circuits using fewer basic quantum gates.
[0005] Regarding techniques for implementing quantum circuits, for example, a technique for improving the efficiency of implementing inversion gates in quantum circuits has been disclosed. A system has also been proposed that analyzes instances and super-controlled basis gates and automatically rewrites the source quantum circuit into an unfolded quantum circuit based on the analysis. Furthermore, a system for improving the fidelity of quantum operations on a target qubit has also been proposed. [Prior art documents] [Patent Documents]
[0006] [Patent Document 1] Special Publication No. 2022-530389 [Patent Document 2] U.S. Patent Application Publication No. 2020-0134501 [Patent Document 3] Special Publication No. 2014-503890 [Overview of the project] [Problems that the invention aims to solve]
[0007] C is a complex quantum gate that frequently appears in quantum circuits. k - There is a NOT gate (k is an integer greater than or equal to 3). The superscript C represents the number of control bits. Such quantum gates are called MPMCTs (Mixed-Polarity Multiple-Control Toffoli). k - A NOT gate is a quantum gate that inverts the state of a target bit (|0> or |1>) when all k control bits are |1>. k Converting NOT gates into the fewest possible combinations of fundamental quantum gates is crucial for fast execution of quantum circuits.
[0008] Here, C other than the basic quantum gates k- One technique for converting a NOT gate into an equivalent circuit is to use auxiliary qubits (auxiliary bits). In techniques that can convert to an equivalent circuit with fewer gates, the original C k - The more control bits a NOT gate has, the more auxiliary bits it will use.
[0009] However, there are limitations on the number of qubits that can be used, and if the number of auxiliary bits cannot be increased, the lack of auxiliary bits prevents the application of techniques that allow conversion to an equivalent circuit with fewer gates, resulting in an increase in the number of quantum gates in the converted equivalent circuit.
[0010] In one aspect, this project aims to reduce the number of quantum gates in quantum circuits. [Means for solving the problem]
[0011] One proposal provides a quantum circuit design support program that instructs a computer to perform the following processes: The computer extracts a first quantum gate from the first quantum circuit, which uses k (where k is an integer greater than or equal to 3) first qubits as control bits and one second qubit as the target bit, and inverts the value of the target bit when all the control bits are 1. The computer identifies a third qubit from the qubits other than the first and second qubits that will have a predetermined value before the gate operation by the first quantum gate. The computer determines the number of control bits for the second quantum gate corresponding to the second qubit, and the number of control bits for each of the third quantum gates corresponding to each of the third qubits, so that the sum of the number of control bits for the third quantum gates satisfies a predetermined relationship with the number of control bits for the second quantum gate. The computer then generates a second quantum circuit equivalent to the first quantum gate, which includes a third quantum gate that uses the number of first qubits equal to the determined number of control bits as control bits, the corresponding third qubit as the target bit, and inverts the value of the target bit when all the control bits are 1, and a second quantum gate that uses the first and third qubits not used as control bits in the third quantum gate as control bits, the second qubit as the target bit, and inverts the value of the target bit when all the control bits are 1. [Effects of the Invention]
[0012] According to one embodiment, the number of quantum gates in a quantum circuit can be reduced. The above and other objects, features and advantages of the present invention will become apparent from the following description in conjunction with the accompanying drawings illustrating preferred embodiments as examples of the present invention. [Brief explanation of the drawing]
[0013] [Figure 1] This figure shows an example of a quantum circuit design support method according to the first embodiment. [Figure 2] This figure shows an example of the system configuration of the second embodiment. [Figure 3] This diagram shows an example of the hardware configuration of a classic computer. [Figure 4]This figure shows an example of conversion to an equivalent circuit of a C3-NOT gate. [Figure 5] This figure shows an example of conversion to an equivalent circuit of a C4-NOT gate. [Figure 6] This figure shows an example of a quantum circuit using multiple Ck-NOT gates. [Figure 7] This figure shows an example of adding a clean qubit for a Ck-NOT gate transformation. [Figure 8] This figure shows an example of a qubit state transition. [Figure 9] This block diagram shows an example of the functions of each device. [Figure 10] This flowchart shows an example of a procedure for performing quantum computation involving the optimization of quantum circuits. [Figure 11] This flowchart shows an example of the procedure for updating the clean bit. [Figure 12] This figure shows an example of initial information setting using the clean bit update process. [Figure 13] This figure shows an example of the state transitions in tmpCleanBitList. [Figure 14] This figure shows an example of the correspondence between the number of available auxiliary bits and the applicable conversion methods. [Figure 15] This figure shows an example of an equivalent circuit for a C7-NOT gate using the first conversion method. [Figure 16] This figure shows an example of an equivalent circuit for a C7-NOT gate using the second conversion method. [Figure 17] This figure shows an example of an equivalent circuit for a C7-NOT gate using the third conversion method. [Figure 18] This figure shows an example of an equivalent circuit of a C7-NOT gate based on the basic principles of the fourth conversion method. [Figure 19] This figure shows a first example of an equivalent circuit of a C7-NOT gate using a fourth transformation method when there are fewer than k-2 clean bits. [Figure 20]It is a diagram showing a second example of an equivalent circuit of a C7-NOT gate according to a fourth conversion method when there are less than k-2 clean bits. [Figure 21] It is a diagram showing an example of division according to the fourth conversion method when c = 2. [Figure 22] It is a diagram showing an example of division according to the fourth conversion method when c = 3. [Figure 23] It is a diagram showing an example of the function of a quantum gate conversion unit. [Figure 24] It is a flowchart showing an example of the procedure of a quantum gate conversion process. [Figure 25] It is a flowchart showing an example of the procedure of a division method determination process. [Figure 26] It is a flowchart showing an example of the procedure of an equivalent circuit generation process in the fourth conversion method. [Figure 27] It is a flowchart (1 / 2) showing an example of the procedure of a Ck_i-NOT gate conversion process. [Figure 28] It is a flowchart (2 / 2) showing an example of the procedure of a Ck_i-NOT gate conversion process. [Figure 29] It is a diagram showing an example of the conversion of a Ck-NOT gate.
Embodiments for Carrying Out the Invention
[0014] Hereinafter, the present embodiment will be described with reference to the drawings. Note that the embodiments can be implemented in combination with a plurality of embodiments within a non-contradictory range. 〔First Embodiment〕 The first embodiment is a quantum circuit design support method for reducing the number of quantum gates in a quantum circuit equivalent to a C k -NOT gate by appropriately dividing the C k -NOT gate included in the quantum circuit into a plurality of quantum gates. The quantum circuit equivalent to the C k -NOT gate is, for example, a quantum circuit combined with a C 2 -NOT gate (Toffoli gate).
[0015] Figure 1 shows an example of a quantum circuit design support method according to the first embodiment. Figure 1 shows a quantum circuit design support device 10 that implements the quantum circuit design support method. The quantum circuit design support device 10 can implement the quantum circuit design support method, for example, by executing a quantum circuit design support program.
[0016] The quantum circuit design support device 10 has a memory unit 11 and a processing unit 12. The memory unit 11 is, for example, a memory or storage device of the quantum circuit design support device 10. The processing unit 12 is, for example, a processor or arithmetic circuit of the quantum circuit design support device 10.
[0017] The memory unit 11 stores a first quantum circuit 1 to be executed by a quantum computer or quantum simulator. The first quantum circuit 1 includes a first quantum gate 2 which has k (k is an integer greater than or equal to 3) first qubits 2a as control bits and one second qubit 2b as a target bit, and inverts the value of the target bit when all the control bits are 1. The first quantum gate 2 is C k -This is a NOT gate.
[0018] After splitting the first quantum gate 2, the processing unit 12 then performs C 2 - It is converted into an equivalent fourth quantum circuit 4 by combining NOT gates. For example, the processing unit 12 extracts the first quantum gate 2 from the first quantum circuit 1. Next, the processing unit 12 identifies a third qubit 2c that has a predetermined value before the gate operation by the first quantum gate 2, from the qubits other than the first qubit 2a and the second qubit 2b. The predetermined value is, for example, |0>. The processing unit 12 defines the third qubit 2c as a qubit whose initial state is |0> and which has not been subjected to a gate operation from that state. Alternatively, the processing unit 12 defines the third qubit 2c as a qubit that has undergone a gate operation to set its value to |0>.
[0019] The processing unit 12 determines the number of control bits for the second quantum gate 3a corresponding to the second qubit 2b, and the number of control bits for each of the third quantum gates 3b corresponding to each of the third qubits 2c. In doing so, the processing unit 12 determines the number of control bits for the second quantum gate 3a and the number of control bits for each of the third quantum gates 3b so that the sum of the number of control bits for the third quantum gates 3b and the number of control bits for the second quantum gate 3a satisfy a predetermined relationship.
[0020] For example, the processing unit 12 applies a predetermined relationship such that a predetermined value corresponding to the number of control bits of the second quantum gate 3a is less than or equal to the number of qubits that can be used as auxiliary bits when converting the second quantum gate 3a to an equivalent quantum circuit. The predetermined value corresponding to the number of control bits of the second quantum gate 3a is, for example, the number of control bits minus 2. If a predetermined number of auxiliary bits can be used, it becomes possible to minimize the number of quantum gates in the quantum circuit equivalent to the second quantum gate 3a. The number of qubits that can be used as auxiliary bits when converting the second quantum gate 3a to an equivalent quantum circuit is, for example, the sum of the number of fourth qubits other than the first qubit 2a, the second qubit 2b, and the third qubit 2c, and the number of control bits of the third quantum gate 3b.
[0021] Once the number of control bits for the second quantum gate 3a and the third quantum gate 3b is determined, the processing unit 12 generates a second quantum circuit 3 that includes the second quantum gate 3a and the third quantum gate 3b.
[0022] The third quantum gate 3b is a quantum gate that uses the number of first qubits 2a equal to the determined number of control bits as control bits, and the corresponding third qubit 2c as the target bit, and inverts the value of the target bit when all the control bits are 1. If there are multiple third qubits 2c, multiple third quantum gates 3b are also generated. In this case, different control bits are used for each of the multiple third quantum gates 3b.
[0023] The second quantum gate 3a uses the first qubit 2a and the third qubit 2c, which are not used as control bits in the third quantum gate 3b, as control bits, and the second qubit 2b as the target bit. The second quantum gate 3a then inverts the value of the target bit when all the control bits are 1.
[0024] The processing unit 12 may include a fourth quantum gate 3c in the second quantum circuit 3 to restore the state of the third qubit 2c. For example, it is shown that the second quantum circuit 3 first performs gate operations using the third quantum gate 3b corresponding to each of the third qubits 2c. It is then shown that the second quantum circuit 3 next performs gate operations using the second quantum gate 3a. Finally, it is shown that the second quantum circuit 3 then performs gate operations using the fourth quantum gate 3c in reverse order, performing the same gate operations as those performed on each of the third quantum gates 3b.
[0025] Thus, the quantum circuit design support device 10 can convert the first quantum gate 2 into a second quantum circuit 3 that includes a second quantum gate 3a, a third quantum gate 3b, and a fourth quantum gate 3c. The third quantum gate 3b included in the second quantum circuit 3 can be converted into a third quantum circuit 4a with fewer quantum gates by using a third qubit 2c, which is known to have a predetermined value (e.g., |0>), as an auxiliary bit. The third quantum circuit 4a is C 2 - This is a quantum circuit equivalent to the third quantum gate 3b, which is formed by combining a NOT gate (Toffoli gate). Similar to the third quantum gate 3b, the fourth quantum gate 3c can also be converted into the third quantum circuit 4c, which has fewer quantum gates. The third quantum circuit 4c is C 2 - This quantum circuit is equivalent to the fourth quantum gate 3c, formed by combining NOT gates.
[0026] Furthermore, the second quantum gate 3a can be transformed into a third quantum circuit 4b with the number of quantum gates minimized by using a sufficient amount of qubits (e.g., control bit count - 2) as auxiliary bits, whose value (e.g., |0>) is unknown. The third quantum circuit 4b is C 2- This is a quantum circuit equivalent to the second quantum gate 3a, which is formed by combining NOT gates.
[0027] The processing unit 12 can reduce the number of quantum gates in the quantum circuit equivalent to the first quantum gate 2 by splitting the first quantum gate 2 and then converting it into a quantum circuit equivalent to the split quantum gates. For example, the processing unit 12 converts the second quantum gate 3a, the third quantum gate 3b, and the fourth quantum gate 3c included in the second quantum circuit 3 into C 2 - It is converted into equivalent third quantum circuits 4a, 4b, and 4c by combining NOT gates. Furthermore, the processing unit 12 converts the first quantum circuit 1 into a fourth quantum circuit 4 by replacing the first quantum gate 2 in the first quantum circuit 1 with the third quantum circuits 4a, 4b, and 4c.
[0028] In this way, the first quantum circuit 1 constitutes C 2 - The number of NOT gates is minimized, resulting in a fourth quantum circuit 4. By reducing the number of quantum gates in the fourth quantum circuit 4, quantum computations using the fourth quantum circuit 4 can be performed efficiently. Furthermore, the probability of success of quantum computations using the fourth quantum circuit 4 is also improved.
[0029] The processing unit 12 can determine the control bit counts of the second quantum gate 3a and the third quantum gate 3b by, for example, gradually increasing the control bit count of the third quantum gate 3b until a predetermined relationship is satisfied. In this case, the processing unit 12 sets the initial value of the control bit counts of each of the third quantum gates 3b to 2, and sets the initial value of the control bit count of the second quantum gate 3a to the value obtained by subtracting the number of third qubits 2c from k. Then, the processing unit 12 repeatedly increases the control bit count of one of the third quantum gates 3b (for example, by 1) and decreases the control bit count of the second quantum gate 3a by the same amount until a predetermined relationship is satisfied.
[0030] In this way, the number of control bits for the second quantum gate 3a and the third quantum gate 3b that satisfy a predetermined relationship can be easily determined. Note that there may be multiple third quantum gates 3b. In that case, the processing unit 12 selects the third quantum gates 3b corresponding to each of the third qubits 2c in order from the earliest execution order. The processing unit 12 increases the number of control bits of the selected third quantum gate 3b by 1 and decreases the number of control bits of the second quantum gate 3a by 1, repeating this process until the number of control bits of the selected third quantum gate 3b satisfies a predetermined condition. The predetermined condition is, for example, when the selection order of the third quantum gate 3b is the i-th (where i is a natural number), the number of control bits of the third quantum gate 3b is greater than or equal to the number of third qubits 2c minus i and added by 2. Then, when the predetermined condition is satisfied, the processing unit 12 selects the next third quantum gate 3b.
[0031] This allows the processing unit 12 to effectively utilize the third qubit 2c, which is available as an auxiliary bit, when converting the third quantum gate 3b into a third quantum circuit 4a equivalent to the third quantum gate 3b. For example, suppose the selection order of the third quantum gate 3b is 1, and the number of third qubits 2c known to have a predetermined value (|0>) is 2. In this case, when converting the third quantum gate 3b into an equivalent third quantum circuit 4a, one of the third qubits 2c is the target bit of the third quantum gate 3b, but the other can be used as an auxiliary bit. Then the third quantum gate 3b can be separated into multiple quantum gates, similar to the first quantum gate 2, by using the third qubit 2c, whose value is known to be |0>, as an auxiliary bit. As a result, it becomes possible to convert it into a quantum circuit with a small number of quantum gates.
[0032] [Second Embodiment] The second embodiment is a computer system that converts quantum gates performing complex gate operations in quantum circuits into basic quantum gates, and then has a quantum computer perform quantum computations according to a quantum circuit composed only of basic quantum gates. Hereinafter, a qubit whose value is known to be |0> will be called a clean qubit or clean bit. A qubit whose value is unknown (whether it is |0> or not) will be called a dirty qubit or dirty bit.
[0033] Figure 2 shows an example of the system configuration of the second embodiment. This system includes a classical computer 100 and a quantum computer 200. Terminals 31, 32, ... are connected to the classical computer 100 via a network 20. Terminals 31, 32, ... are computers used by users who request quantum computations from the quantum computer 200. The classical computer 100 receives quantum circuits from terminals 31, 32, ... A quantum circuit indicates the sequence of operations on a qubit by the arrangement of elements such as gates. A qubit is a bit that can represent a superposition state of the |0> state and the |1> state.
[0034] The classical computer 100 converts quantum circuits received from terminals 31, 32, ... into quantum circuits executable by the quantum computer 200. Executable quantum circuits by the quantum computer 200 are, for example, quantum circuits described using only basic quantum gates. The classical computer 100 instructs the quantum computer 200 to execute the converted quantum circuits. The classical computer 100 also obtains the measurement results for each qubit from the quantum computer 200.
[0035] The quantum computer 200 has multiple qubits and devices for manipulating each of the multiple qubits. The multiple qubits of the quantum computer 200 may be, for example, superconducting or ion trapping. Alternatively, the multiple qubits may be diamond spin qubits. If the qubits are superconducting, the quantum computer 200 may have a refrigerator for cooling the qubits.
[0036] The quantum computer 200 irradiates qubits with microwaves, for example, in response to instructions from the classical computer 100. Furthermore, devices for manipulating multiple qubits measure the state of each qubit and transmit this information to the classical computer 100.
[0037] Figure 3 shows an example of the hardware configuration of a classical computer. The classical computer 100 is controlled as a whole by a CPU (Central Processing Unit) 101. The CPU 101 is a processor that executes program instructions. Note that the CPU 101 may include multiple processor cores. The CPU 101 may also consist of multiple processors, such as an MPU (Micro Processing Unit) or a DSP (Digital Signal Processor). Furthermore, at least some of the functions realized by the CPU 101 executing programs may be realized by electronic circuits such as an ASIC (Application Specific Integrated Circuit) or a PLD (Programmable Logic Device). The CPU 101 is connected to a RAM (Random Access Memory) 102 and several peripheral devices via a bus 100a.
[0038] RAM102 is the main memory of the classical computer 100. RAM102 temporarily stores at least a portion of the OS (Operating System) program and application programs that are to be executed by the CPU 101. RAM102 also stores various data used for processing by the CPU 101. Note that the classical computer 100 may have other types of memory besides RAM, and may have multiple memory modules.
[0039] Peripheral devices connected to bus 100a include an HDD (Hard Disk Drive) 103, a GPU (Graphics Processing Unit) 104, an input interface 105, an optical drive device 106, device connection interfaces 107 and 108, and a network interface 109.
[0040] HDD103 is an auxiliary storage device for the classic computer 100. HDD103 magnetically writes and reads data from its internal magnetic disk. The HDD103 stores the OS program, application programs, and various data. The classic computer 100 may also be equipped with other types of auxiliary storage devices, such as flash memory or SSDs (Solid State Drives), and may have multiple auxiliary storage devices.
[0041] A monitor 21 is connected to the GPU 104. The GPU 104 displays images on the screen of the monitor 21 according to instructions from the CPU 101. The monitor 21 can be a display device using organic EL (Electro Luminescence) or a liquid crystal display device.
[0042] The input interface 105 is connected to a keyboard 22 and a mouse 23. The input interface 105 transmits signals from the keyboard 22 and mouse 23 to the CPU 101. Note that the mouse 23 is just one example of a pointing device; other pointing devices can also be used. Other pointing devices include touch panels, tablets, touchpads, and trackballs.
[0043] The optical drive device 106 reads data recorded on the optical disc 24 using laser light or the like. The optical disc 24 is a portable recording medium on which data is recorded in a way that makes it readable by the reflection of light. Examples of optical discs 24 include DVD (Digital Versatile Disc), DVD-RAM, CD-ROM (Compact Disc Read Only Memory), and CD-R (Recordable) / RW (ReWritable).
[0044] The device connection interface 107 is a communication interface for connecting peripheral devices to the classical computer 100. For example, a memory device 25 and a memory reader / writer 26 can be connected to the device connection interface 107. The memory device 25 is a recording medium equipped with a communication function with the device connection interface 107. The memory reader / writer 26 is a device that writes data to or reads data from the memory card 27. The memory card 27 is a card-type recording medium.
[0045] The device connection interface 108 is a communication interface for connecting the quantum computer 200 to the classical computer 100. The classical computer 100 transmits instructions for controlling qubits to the quantum computer 200 via the device connection interface 108.
[0046] The network interface 109 is connected to the network 20. The network interface 109 transmits and receives data to and from other computers or communication devices via the network 20.
[0047] The classical computer 100 can realize the processing functions of the second embodiment with the hardware configuration described above. The quantum circuit design support device 10 shown in the first embodiment can also be realized with the same hardware as the classical computer 100 shown in Figure 3. Furthermore, the CPU 101 is an example of the processing unit 12 shown in the first embodiment.
[0048] The classical computer 100 implements the processing functions of the second embodiment by executing a program recorded on a computer-readable recording medium, for example. The program describing the processing to be executed by the classical computer 100 can be recorded on various recording media. For example, the program to be executed by the classical computer 100 can be stored in the HDD 103. The CPU 101 loads at least a portion of the program in the HDD 103 into the RAM 102 and executes the program. Alternatively, the program to be executed by the classical computer 100 can be recorded on a portable recording medium such as an optical disc 24, a memory device 25, or a memory card 27. The program stored on the portable recording medium becomes executable after being installed on the HDD 103, for example, under control from the CPU 101. The CPU 101 can also directly read and execute the program from the portable recording medium.
[0049] In the system described above, the classical computer 100 obtains quantum circuits from terminals 31, 32, ... that describe the procedures for gate operations of qubits for quantum computation. The quantum circuits obtained from terminals 31, 32, ... include quantum gates that perform complex operations other than basic quantum gates. On the other hand, gate operations in the quantum computer 200 are limited to gate operations of basic quantum gates. Therefore, the classical computer 100 converts the quantum gates other than basic quantum gates included in the quantum circuits obtained from terminals 31, 32, ... into equivalent circuits using basic quantum gates that can be executed in the quantum computer 200. Then, the classical computer 100 instructs the quantum computer 200 to perform quantum computation using the converted quantum circuits.
[0050] The specific quantum gates that constitute the fundamental quantum gates vary depending on the system. In the system according to the second embodiment, among the 1-qubit gates, the Hadamard gate, NOT gate, and rotation gate are included as fundamental quantum gates. Also, among the 2-qubit gates, the C-NOT gate and controlled rotation gate are included as fundamental quantum gates. Furthermore, among the 3-qubit gates, C 2 - The NOT gate is included in the basic quantum gates.
[0051] Among quantum gates that perform complex gate operations other than basic quantum gates, C is a frequently used quantum gate. k -There is a NOT gate (k is an integer greater than or equal to 3). C k The -NOT gate is a quantum gate that inverts the "0 / 1" of the target bit when all k control bits are |1>.
[0052] C k - The gate operation of a NOT gate is determined by the number of clean and dirty auxiliary bits, with a minimum number of C 2 -It can be replaced by an equivalent quantum circuit composed of NOT gates.
[0053] Figure 4 shows C 3 -This figure shows an example of conversion to an equivalent circuit of a NOT gate. 3- The NOT gate 41 uses three qubits, "c1" to "c3", as control bits and the qubit "x" as the target qubit. 3 - The NOT gate 41 can be converted to an equivalent circuit 42 if clean auxiliary bits are available. The equivalent circuit 42 has three C 2 - It consists of NOT gates 42a to 42c. Also C 3 - The NOT gate 41 can be converted to an equivalent circuit 43 if a clean auxiliary bit is unavailable and a dirty auxiliary bit is available. The equivalent circuit 43 has four C 2 - It consists of NOT gates 43a to 43d.
[0054] Thus, if clean auxiliary bits can be used, C 3 - NOT gate 41 with 3 C 2 - Can be converted to NOT gates 42a~42c. On the other hand, if only dirty auxiliary bits can be used, C 3 - NOT gate 41 is four C 2 This will convert to -NOT gates 43a to 43d. In other words, if clean auxiliary bits can be used, the number of quantum gates in the converted quantum circuit can be reduced.
[0055] Figure 5 shows C 4 -This figure shows an example of conversion to an equivalent circuit of a NOT gate. 4 - The NOT gate 44 uses four qubits, "c1" to "c4", as control bits and the qubit "x" as the target qubit. 4 - The NOT gate 44 can be converted to an equivalent circuit 45 if two clean auxiliary bits are available. The equivalent circuit 45 has five C 2 - It consists of NOT gates 45a to 45e. 4 - The NOT gate 44 can be converted to an equivalent circuit 46 if one clean auxiliary bit and one dirty auxiliary bit are available. The equivalent circuit 46 has 6 C 2 - It consists of NOT gates 46a to 46f. Furthermore, C 4- The NOT gate 44 can be converted to the equivalent circuit 47 if it cannot use a clean auxiliary bit and two dirty auxiliary bits are available. The equivalent circuit 47 has 8 C 2 - It consists of NOT gates 47a to 47h.
[0056] Thus, if you can use two clean auxiliary bits, C 4 - NOT gate 44 is 5 C 2 - Can be converted to NOT gates 45a~45e. If only one clean auxiliary bit can be used, C 4 - NOT gate 44 with 6 C 2 -This will convert to a NOT gate 46a~46f. Furthermore, if only dirty auxiliary bits can be used, C 4 - NOT gate 44 with 8 C 2 This converts to -NOT gates 47a to 47h. In other words, the more clean auxiliary bits available, the fewer quantum gates can be added to the resulting quantum circuit.
[0057] As shown in Figures 4 and 5, if a clean qubit is known, then by using that qubit as an auxiliary bit, C k - A NOT gate can be converted into an equivalent circuit with a smaller number of gates. To achieve this, it is crucial to manage which qubits are in a clean state.
[0058] When a quantum circuit contains multiple quantum gates, if the state of which qubits are clean is not managed, all qubits can only be treated as dirty. As a result, C 3 -If it is a NOT gate, it is converted to equivalent circuit 43 (see Figure 4), C 4 -If it is a NOT gate, it will be converted to equivalent circuit 47 (see Figure 5).
[0059] If the number of quantum gates other than the basic quantum gates included in a quantum circuit is small, it does not pose a major problem. However, quantum circuits generated by circuit description languages often include a large number of quantum gates other than the basic quantum gates.
[0060] Figure 6 shows multiple C k This figure shows an example of a quantum circuit using a NOT gate. Quantum circuit 48 demonstrates a quantum computation where, for the qubits "x1" and "x2", when "x1=x2=1", "211" is added to the numerical value (in binary representation) represented by the qubit sequence "q=q8,···,q0". Quantum circuit 48 has many C k - A NOT gate is used. In this case, if it is unknown which qubit is clean, all C k -NOT gates are converted into equivalent circuits with a large number of gates. As a result, the total number of quantum gates in the converted quantum circuit increases significantly.
[0061] Specifically, quantum circuit 48 contains C 2 - There are 11 NOT gates, C 3 -16 NOT gates, C 4 - It contains 13 NOT gates. Of these, 16 C 3 - The NOT gate is equivalent to the circuit 43 with 64 C 2 -It is converted to a NOT gate. Also, 13 C 4 - The NOT gate has 104 C units according to the equivalent circuit 47. 2 -It is converted to a NOT gate. As a result, 179 C for 18 qubits. 2 A quantum circuit is generated that demonstrates gate operations using a NOT gate.
[0062] If there is a shortage of clean auxiliary bits, then if you can add the missing clean qubits, C k -NOT with the minimum number of C 2 - This can be converted into an equivalent circuit 45 composed of NOT gates.
[0063] Figure 7 shows C k-This figure shows an example of adding clean qubits for the conversion of a NOT gate. In quantum circuit 49, two clean qubits are added. If the added qubits are used as auxiliary bits, each C k -NOT with the minimum number of C 2 -It can be converted into an equivalent circuit composed of NOT gates. In this case, since clean qubits are added, the number of qubits used to execute the quantum circuit increases. Quantum computers have a limit to the number of qubits they can use. Therefore, if the number of qubits used increases, it may not be possible to execute the converted quantum circuit on a quantum computer.
[0064] Specifically, the 16 Cs included in quantum circuit 49 3 - The NOT gate has 48 Cs in equivalent circuit 42 2 -It is converted to a NOT gate. Also, 13 C 4 - The NOT gate is equivalent to 65 C250 2 -It is converted to a NOT gate. As a result, 124 C for 20 qubits. 2 - A quantum circuit is generated that demonstrates gate operations using a NOT gate. In this way, adding clean qubits as auxiliary bits reduces the number of quantum gates after the transformation, but increases the number of qubits. As a result, there is a risk that the quantum circuit cannot be executed due to a shortage of usable qubits.
[0065] Therefore, a clean bit management function is introduced to the classical computer 100, which manages whether the state after each gate operation for each qubit used in the quantum circuit is clean or dirty.
[0066] Generally, the initial state of each qubit is clean. Even if a qubit becomes dirty after a subsequent gate operation, if a gate operation is performed to set its state to |0>, that qubit will become clean again.
[0067] Figure 8 shows an example of a qubit state transition. Assuming the initial state of a qubit is |0>, all qubits are clean when a quantum circuit is input to the quantum computer 200 (before gate operation). When a quantum gate operation is performed within the input quantum circuit in the quantum computer 200, the qubit that is the target bit of that quantum gate may change from clean to dirty. Even a dirty qubit will become clean again if its state is returned to |0> by a certain quantum gate.
[0068] For example, quantum circuit 51 has C 7 - A NOT gate 51a and six Hadamard gates 51b~51g are arranged. 7 - The NOT gate 51a uses seven qubits, "c1" to "c7", as control bits and the qubit "x" as the target qubit. 7 - The NOT gate 51a inverts the state of the target bit (converts |0> to |1> or |1> to |0>) if the state of all control bits is |1>.
[0069] For each of the five qubits, "a1" through "a5", there are Hadamard gates 51b through 51f. In addition, the qubit "a1" has an additional Hadamard gate 51g.
[0070] In quantum circuit 51, before applying gate operations, all qubits are in a clean state. After performing Hadamard gate operations 51b to 51f on the five qubits "a1" to "a5", these five qubits change from clean to dirty. When a second Hadamard gate 51g is performed on the qubit "a1", the state of the qubit "a1" changes from dirty to clean.
[0071] In the example of quantum circuit 51, the last C 7-When converting the NOT gate 51a to an equivalent circuit, the qubit "a1" can be used as an auxiliary bit for clean, and the qubits "a2" to "a5" can be used as auxiliary bits for dirty.
[0072] Thus, each qubit is initially clean, but becomes dirty after some gate operation is performed. Even a dirty qubit will become clean again if the same gate operation is performed on it once more.
[0073] Furthermore, when a SWAP gate is operated on, the state of a dirty qubit can change to clean. A SWAP gate is a quantum gate that performs an operation to swap the states of two qubits. For example, one of the qubits being operated on by the SWAP gate may be in the state of clean, while the other qubit is in the state of dirty. In this case, applying the SWAP gate will change the state of the clean qubit to dirty, and the state of the dirty qubit to clean.
[0074] Therefore, classical computer 100, using its clean bit management function, changes a clean qubit to dirty when an operation on a quantum gate targeting that qubit is performed. Also, when a SWAP gate operation is performed, classical computer 100 swaps the states of both qubits being operated on. Furthermore, when a dirty qubit is set to |0>, classical computer 100 changes that qubit to clean.
[0075] It should be noted that there are gate operations other than the Hadamard gate that can return a qubit to a clean state through two gate operations of a given quantum gate. For example, if a clean qubit is subjected to two NOT gate operations, the qubit becomes a dirty qubit after the first NOT gate operation, but returns to a clean qubit after the second NOT gate operation.
[0076] With this clean bit management function, classical computer 100 can manage all Cs that appear in the quantum circuit without increasing the number of qubits. k - A NOT gate can be converted into an optimal equivalent circuit depending on the number of clean and dirty auxiliary bits. As a result, computation time on the quantum computer 200 can be reduced. This is also true when using a quantum circuit simulator instead of the quantum computer 200.
[0077] Figure 9 is a block diagram showing an example of the functions of each device. Terminal 31 has a quantum circuit generation unit 31a. The quantum circuit generation unit 31a generates quantum circuits described in a circuit description language according to input from the user. The quantum circuits generated by the quantum circuit generation unit 31a utilize quantum gates other than basic quantum gates. The quantum circuit generation unit 31a transmits the generated quantum circuits to the classical computer 100.
[0078] The classical computer 100 includes a quantum computing management unit 110, a clean bit management unit 120, and a quantum gate conversion unit 130. The quantum computing management unit 110 manages the execution of quantum computations corresponding to the quantum circuit sent from the terminal 31. For example, if the quantum circuit sent from the terminal 31 contains quantum gates other than basic quantum gates, the quantum computing management unit 110 instructs the quantum gate conversion unit 130 to convert those quantum gates into equivalent circuits. The quantum computing management unit 110 also instructs the management of the state (clean / dirty) of each qubit after operations performed by each quantum gate in the quantum circuit. When a quantum circuit described only by basic quantum gates is generated, the quantum computing management unit 110 instructs the quantum computer 200 to perform a quantum computation based on that quantum circuit. The quantum computing management unit 110 then obtains the computation results from the quantum computer 200 and outputs those results to the terminal 31.
[0079] The clean bit management unit 120 manages the state of the qubit being operated on in the quantum circuit. For example, the clean bit management unit 120 interprets the operations performed by the quantum gates of the quantum circuit in order from the beginning, and after the gate operation, it determines whether the state of the operated qubit becomes clean or dirty.
[0080] The quantum gate conversion unit 130 converts quantum gates other than the basic quantum gates included in the quantum circuit into an equivalent circuit using only the basic quantum gates. In doing so, the quantum gate conversion unit 130 obtains the state of each qubit immediately before executing the quantum gate to be converted from the clean bit management unit 120. The quantum gate conversion unit 130 then identifies the clean and dirty qubits that can be used as auxiliary bits and converts the quantum gate to be converted into the smallest equivalent circuit that effectively utilizes those qubits.
[0081] Furthermore, the functions of each element shown in Figure 9 can be realized, for example, by having a computer execute the program module corresponding to that element. Next, we will describe in detail the procedure for performing quantum computations, including the optimization of quantum circuits.
[0082] Figure 10 is a flowchart illustrating an example of the procedure for executing a quantum computation involving the optimization of a quantum circuit. The process shown in Figure 10 will be explained below according to the step numbers. [Step S101] The quantum computing management unit 110 acquires the quantum circuit to be computed from one of the terminals 31, 32, ... Based on the acquired quantum circuit, the quantum computing management unit 110 instructs the clean bit management unit 120 to set the information for clean bit management. The clean bit management unit 120 then analyzes the specified quantum circuit and sets the circuit information to be used for clean bit management. The circuit information to be set is, for example, the number of qubits n, the quantum circuit "QC", the initial state I, and the cleanup information CI.
[0083] The number of qubits n is the number of qubits that appear in a quantum circuit. The number of qubits n is the minimum number of qubits required to execute the input quantum circuit. A quantum circuit "QC" is information arranged in the order of {gate number, quantum gate configuration}. The quantum gate configuration includes the type of quantum gate and the number of the qubit being operated on. For example, "QC" is [{1, Hadamard gate on the 1st qubit}, {2, C with 1st to 10th qubits as control bits and the 11th qubit as the target bit]. 10 This is information such as `-NOT gate}, ...]`.
[0084] The initial state I is the set of numbers of clean qubits. For example, if qubits 1, 2, and 10 are clean, then the initial state I is {1,2,10}. The cleanup information CI is a set of identification numbers of quantum gates whose target bit state becomes clean when executed. For example, if the target bit state becomes clean after execution of the 5th and 9th quantum gates, the cleanup information CI will be {5,9}. In the example of quantum circuit 51 shown in Figure 8, the identification number of the Hadamard gate 51g will be set in the cleanup information CI.
[0085] [Step S102] The quantum computing management unit 110 and the clean bit management unit 120 generate the initial state of information used for optimizing the quantum circuit. For example, the clean bit management unit 120 generates the initial state of information used for managing the state changes of qubits each time a gate operation is performed. The information used for managing the state changes of qubits includes a list of clean qubits "cleanBitList", a list of dirty qubits "dirtyBitList", and the number of quantum gates "N" included in "QC".
[0086] The initial value of "cleanBitList" is the initial state I (cleanBitList=I). The initial value of "dirtyBitList" is the list of all qubits excluding the qubits included in the initial state I (dirtyBitList={1,···,n}-I). "N" is set to the maximum value of the quantum gate identification number shown in "QC".
[0087] The quantum computing management unit 110 also sets an initial value for the variable "i," which indicates which quantum gate is being processed. For example, the initial value of "i" is "1" (i=1). [Step S103] The quantum computing management unit 110 determines whether the conversion process to the equivalent circuit of quantum gates other than the basic quantum gates has been completed based on whether the value of "i" is "N+1". For example, if "i==N+1", the quantum computing management unit 110 proceeds to step S110. If "i==N+1", the quantum computing management unit 110 proceeds to step S104.
[0088] [Step S104] The quantum gate conversion unit 130 determines whether the i-th quantum gate "QC[i]" of "QC" is a target for conversion to an equivalent circuit. Quantum gates that are targets for conversion to an equivalent circuit are quantum gates other than fundamental quantum gates. If the quantum gate conversion unit 130 determines that the quantum gate is a target for conversion to an equivalent circuit, it proceeds to step S105. If the quantum gate conversion unit 130 determines that the quantum gate is not a target for conversion to an equivalent circuit, it proceeds to step S108.
[0089] [Step S105] The quantum gate conversion unit 130 creates a temporary list of clean qubits, "tmpCleanBitList", and a temporary list of dirty qubits, "tmpDirtyBitList". For example, the quantum gate conversion unit 130 removes the identification numbers of the control bits and target bits of QC[i] from "cleanBitList" to create "tmpCleanBitList". The quantum gate conversion unit 130 also removes the identification numbers of the control bits and target bits of QC[i] from "dirtyBitList" to create "tmpDirtyBitList".
[0090] [Step S106] The quantum gate conversion unit 130 performs a conversion process (quantum gate conversion) of QC[i] to an equivalent circuit of the quantum gate based on QC[i], "tmpCleanBitList", and "tmpDirtyBitList". The equivalent circuit obtained as a result of the quantum gate conversion is denoted as "qc". Details of the quantum gate conversion process will be described later (see Figure 24).
[0091] [Step S107] The quantum gate conversion unit 130 replaces QC[i] with the equivalent circuit "qc" generated by the quantum gate conversion process (QC[i]=qc). [Step S108] The clean bit management unit 120 performs a clean bit update process in response to the execution of the gate operation of QC[i]. Details of the clean bit update process will be described later (see Figure 11).
[0092] [Step S109] The quantum computing management unit 110 adds 1 to the variable "i" (i ← i + 1) and proceeds to step S103. [Step S110] The quantum computing management unit 110 instructs the quantum computer 200 to perform quantum computation based on quantum circuits.
[0093] [Step S111] The quantum computing management unit 110 obtains the calculation results from the quantum computer 200. [Step S112] The quantum computing management unit 110 outputs the result of the quantum computation based on the quantum circuit.
[0094] In this way, a decision is made for each quantum gate whether or not to convert it to an equivalent circuit, and if so, it is converted to an equivalent circuit. Also, each time processing for a quantum gate is completed, the state of each qubit after the gate operation by that quantum gate is updated. As a result, when converting to an equivalent circuit, the quantum gate conversion unit 130 can correctly determine the clean qubits when executing the gate operation of the quantum gate to be converted, and convert to an equivalent circuit with fewer quantum gates according to the number of clean qubits.
[0095] Next, we will explain in detail the procedure for updating the clean bit. Figure 11 is a flowchart showing an example of the clean bit update procedure. The process shown in Figure 11 will be explained below according to the step numbers. Note that in the process in Figure 11, the quantum gate QC[i] will be assumed to represent the i-th quantum gate before the conversion, even if QC[i] has been converted to the equivalent circuit "qc".
[0096] [Step S201] The clean bit management unit 120 determines whether the quantum gate QC[i] to be processed has been converted to an equivalent circuit "qc". If it has been converted, the clean bit management unit 120 proceeds to step S204. If it has not been converted, the clean bit management unit 120 proceeds to step S202.
[0097] [Step S202] The clean bit management unit 120 determines whether the quantum gate of QC[i] is a SWAP gate or not. If it is a SWAP gate, the clean bit management unit 120 proceeds to step S203. If it is not a SWAP gate, the clean bit management unit 120 proceeds to step S204.
[0098] [Step S203] The clean bit management unit 120 swaps the states of the qubits being manipulated by the quantum gate (SWAP gate) being processed. For example, if one of the identification numbers "j" and "k" of the qubits being manipulated is included in "cleanBitList" and the other is included in "dirtyBitList", the clean bit management unit 120 swaps the lists to which they belong.
[0099] Specifically, the clean bit management unit 120 removes the identification number ("j" or "k") of the target qubit included in "cleanBitList" from "cleanBitList" and adds it to "dirtyBitList". The clean bit management unit 120 also removes the identification number ("j" or "k") of the target qubit included in "dirtyBitList" from "dirtyBitList" and adds it to "cleanBitList".
[0100] The clean bit management unit 120 terminates the clean bit update process once the state swap is complete. [Step S204] The clean bit management unit 120 determines whether the condition is met that the identification number [j] of the target bit in the quantum gate of QC[i] is included in "cleanBitList" and is not included in the cleaned information CI. If the condition is met, the clean bit management unit 120 proceeds to step S205. If the condition is not met, the clean bit management unit 120 proceeds to step S206.
[0101] [Step S205] The clean bit management unit 120 removes the identification number [j] of the target bit in the quantum gate of QC[i] from "cleanBitList" and adds it to "dirtyBitList". After that, the clean bit management unit 120 terminates the clean bit update process.
[0102] [Step S206] The clean bit management unit 120 determines whether the condition is met that the identification number [j] of the target bit in the quantum gate of QC[i] is included in "dirtyBitList" and is also included in the cleaned information CI. If the condition is met, the clean bit management unit 120 proceeds to step S207. If the condition is not met, the clean bit management unit 120 terminates the clean bit update process.
[0103] [Step S207] The clean bit management unit 120 removes the identification number [j] of the target bit in the quantum gate of QC[i] from "dirtyBitList" and adds it to "cleanBitList". After that, the clean bit management unit 120 terminates the clean bit update process.
[0104] In this way, the state of the qubit (clean or dirty) after each quantum gate operation is performed is properly managed. Figure 12 shows an example of initial information setting by the clean bit update process. In the example in Figure 12, it is assumed that quantum gates other than the basic quantum gates of the quantum circuit 48 shown in Figure 6 are converted into equivalent circuits.
[0105] Quantum circuit 48 is a circuit that adds "211" to the qubit sequence "q8,···,q0" (in binary representation) when both qubits "x1" and "x2" are |1>. In quantum circuit 48, seven clean qubits "c1,···,c7" can be used as auxiliary bits.
[0106] The quantum circuit 48 uses 18 qubits, and n is set to 18. Of these qubits, the identification numbers of the clean qubits "c1, ..., c7" are "4, 6, 8, 10, 12, 14, 16" respectively. Therefore, the initial state I is set to "I = {4, 6, 8, 10, 12, 14, 16}".
[0107] Of the quantum gates included in quantum circuit 48, the seven quantum gates that perform the gate operation to change the state of the target bit to |0> are "20, 23, 27, 30, 32, 36, 39" in that order. Therefore, the cleaned information CI is set to "CI={20,23,27,30,32,36,39}".
[0108] Before optimizing the quantum circuit, a cleanBitList with the same contents as the initial state I, "cleanBitList={4,6,8,10,12,14,16}", is generated. Additionally, a dirtyBitList, "dirtyBitList={1,2,3,5,7,9,11,13,15,17,18}", is generated to indicate dirty qubits.
[0109] Since quantum circuit 48 contains 40 quantum gates, the number of gates is set to "N=40". The "cleanBitList" and "dirtyBitList" are updated each time a quantum gate is converted to an equivalent circuit, and each time the conversion is performed. When a quantum gate is converted to an equivalent circuit, "tmpCleanBitList" is generated based on the "cleanBitList" at that time. "tmpCleanBitList" indicates the qubits that can be used as clean auxiliary bits in the equivalent circuit of the corresponding quantum gate. Similarly, "tmpDirtyBitList" is generated based on "dirtyBitList". "tmpDirtyBitList" indicates the qubits that can be used as dirty auxiliary bits in the equivalent circuit of the corresponding quantum gate.
[0110] Figure 13 shows an example of the state transitions of tmpCleanBitList. The labels in each column of the state transition table 52 for tmpCleanBitList indicate the quantum gate number. The labels in each row of the state transition table 52 for "tmpCleanBitList" indicate the qubit.
[0111] In state transition table 52, the column corresponding to a quantum gate shows the state (clean or dirty) of the qubit before the operation performed by that quantum gate. A qubit set to "control" is the control bit of the corresponding quantum gate. A qubit set to "t" is the target bit of the corresponding quantum gate. A qubit set to "c" is a clean qubit, and its identification number is included in "tmpCleanBitList". A qubit with a blank setting is a dirty qubit, and its identification number is included in "tmpDirtyBitList".
[0112] In the examples shown in Figures 12 and 13, there are enough dirty bits that can be used as auxiliary bits. Therefore, depending on the number of clean bits that can be used, C k -This determines how the NOT gate is converted into its equivalent circuit.
[0113] Of the 48 quantum gates in quantum circuits, C 2 -NOT gates do not require transformation. There are a total of 11 quantum gates that do not require transformation: "3, 8, 12, 15, 19, 21, 26, 28, 35, 37, 40".
[0114] C 3 - NOT gates that can use at least one clean bit as an auxiliary bit can be converted to equivalent circuit 42 (see Figure 4). 3 There are a total of 12 -NOT gates: "1, 2, 7, 22, 24, 27, 29, 31, 33, 36, 38, 39". Since the equivalent circuit 42 contains 3 quantum gates, the total number of quantum gates after the transformation is 36 (12 × 3).
[0115] C 3 -NOT gates that cannot use any clean bits are converted to equivalent circuit 43 (see Figure 4). C 3- The number of NOT gates is 4 in total, namely "11, 14, 17, 20". Since the equivalent circuit 43 contains 4 quantum gates, the total number of quantum gates after conversion is 16 (4×4).
[0116] C 4 - Among the NOT gates, those that can use at least 2 clean bits as auxiliary bits can be converted into the equivalent circuit 45 (see Fig. 5). C that can use at least 2 clean bits 4 - The number of NOT gates is 8 in total, namely "4, 5, 6, 9, 25, 30, 32, 34". Since the equivalent circuit 45 contains 5 quantum gates, the total number of quantum gates after conversion is 40 (5×8).
[0117] C 4 - Among the NOT gates, those that can use only 1 clean bit can be converted into the equivalent circuit 46 (see Fig. 5). C that can use only 1 clean bit 4 - The number of NOT gates is 2 in total, namely "10, 23". Since the equivalent circuit 46 contains 6 quantum gates, the total number of quantum gates after conversion is 12 (6×2).
[0118] C 4 - Among the NOT gates, those that can use no clean bit are converted into the equivalent circuit 47 (see Fig. 5). C that can use no clean bit 4 - The number of NOT gates is 3 in total, namely "13, 16, 18". Since the equivalent circuit 47 contains 8 quantum gates, the total number of quantum gates after conversion is 24 (8×3).
[0119] As a result, when the quantum circuit 48 is converted into a quantum gate composed only of basic quantum gates, the total number of basic quantum gates is "11 + 36 + 16 + 40 + 12 + 24 = 139". As described above, when not managing clean bits, all C 3 - NOT gates are converted into the equivalent circuit 43, and all C 4-The NOT gate is converted into an equivalent circuit 47. In that case, the total number of basic quantum gates of the converted quantum circuit is 179. That is, by managing the clean bits, the number of quantum gates of the quantum circuit is reduced from 179 to 139.
[0120] Next, the conversion process of quantum gates other than basic quantum gates into equivalent circuits will be described in detail. First, the applicable conversion methods into equivalent circuits according to the number of available clean auxiliary bits and dirty auxiliary bits respectively will be described.
[0121] FIG. 14 is a diagram showing an example of the correspondence between the number of available auxiliary bits and the applicable conversion methods. In the conversion method application table 60, the applicable conversion methods are shown according to the number of clean bits and the number of dirty bits. The horizontal axis of the conversion method application table 60 is the number of available clean bits, and the vertical axis is the number of available dirty bits.
[0122] The first conversion method is a conversion method that can be converted into an equivalent circuit with the fewest number of quantum gates. The first conversion method is a conversion method that can convert a C k -NOT gate into 2k - 3 C 2 -NOT gates by using k - 2 clean auxiliary bits. The first conversion method results in fewer quantum gates after conversion than other conversion methods described later. On the other hand, the first conversion method can only be applied when k - 2 or more clean bits are available. Therefore, when k - 2 clean auxiliary bits are available, the quantum gate conversion unit 130 applies the first conversion method.
[0123] The second conversion method is a conversion method that converts into an equivalent circuit using clean or dirty auxiliary bits. In the second conversion method, a C k -NOT gate is converted into 4k - 8 C 2-It can be converted to a NOT gate. The second conversion method is highly versatile as it can be applied even if all auxiliary bits are dirty. On the other hand, if there are not enough auxiliary bits, additional qubits to be used as auxiliary bits are required until there are k-2 auxiliary bits (total of clean bits and dirty bits). Also, the second conversion method has 2k-5 more gates than the first conversion method.
[0124] The third conversion method is one that converts to an equivalent circuit using one auxiliary bit (clean bit or dirty bit). The third conversion method can be performed with a small number of auxiliary bits. On the other hand, the number of gates increases by 4k to 6k compared to the first or second conversion method.
[0125] The fourth transformation method is one that can compensate for the shortcomings of the first, second, and third transformation methods. The fourth transformation method is one that can convert to an equivalent circuit with fewer quantum gates by effectively utilizing the available auxiliary bits when at least one clean bit is available. The fourth transformation method is applicable even when there are fewer than k-2 clean bits without the need for additional auxiliary bits, thus compensating for the shortcomings of the first transformation method, which uses k-2 or more clean bits. Furthermore, the fourth transformation method can convert to an equivalent circuit with fewer quantum gates than the second and third transformation methods, thus compensating for the shortcomings of the second and third transformation methods, which involve an increase in the number of quantum gates.
[0126] If k-2 or more clean bits are available, the first conversion method can be used to convert to an equivalent circuit with the minimum number of quantum gates. Therefore, the fourth conversion method is effective when the number of clean bits c is "1 ≤ c ≤ k-3".
[0127] For example, C 7 -Assuming that there is one clean bit (c=1) and four dirty bits (d=4) available as auxiliary bits when converting the NOT gate 61 to an equivalent circuit.
[0128] FIG. 15 shows an example of an equivalent circuit of a C 7 -NOT gate. The C 7 -NOT gate 61 has seven control bits. In this case, the number of clean bits used in the first conversion method is five. Therefore, there are four fewer clean bits. That is, C 7 To convert the C-NOT gate 61 by the first conversion method, four clean bits need to be added.
[0129] When five clean bits can be used as auxiliary bits, the equivalent circuit 62 can be generated by the first conversion method. Control bit groups are generated in order from the upper control bits, and for each group, C 2 The result of the C-NOT gate is set to a clean bit. The clean bit with the operation result set is also used as a control bit, and the same gate operation is repeated. Then, the sixth C 2 -NOT gate performs C 7 The same operation as that by the C-NOT gate 61 is performed on the target bit.
[0130] The latter five C 2 -NOT gates are quantum gates that clean the auxiliary bits that were clean bits. Due to the presence of these C 2 -NOT gates, the equivalent circuit 62 is equivalent to the C 7 -NOT gate 61 including the state of the auxiliary bits after the gate operation.
[0131] In the equivalent circuit 62, dirty bits are not used. Therefore, the dirty bits are wasted. Also, since clean bits need to be added, the number of quantum bits used increases. Also, in order to apply the first conversion method, it is a condition that 17 quantum bits can be used. If there are not enough extra quantum bits in the quantum bits of the quantum computer 200, the first conversion method cannot be applied.
[0132] FIG. 16 shows a C by the second conversion method7 -This is a diagram showing an example of an equivalent circuit for a NOT gate. 7 -When applying the second conversion method to the NOT gate 61, k-2 (5) auxiliary bits are used. Therefore, by treating the clean bit the same as the dirty bit, C 7 - The NOT gate 61 can be converted to the equivalent circuit 63 using the second conversion method.
[0133] In the equivalent circuit 63, the first five Cs 2 - The NOT gate uses an auxiliary bit (clean bit or dirty bit) and C 7 - The pair with the control bit of the NOT gate 61 corresponds to C 2 - These are used as control bits for the NOT gate. The first 5 C 2 - There are no duplicate control bits in the NOT gate. The leading C 2 - The target bit of the NOT gate is C 7 - This is the target bit of the NOT gate 61. The 2nd to 5th C 2 -The target bit of the NOT gate is the same as the previous C 2 - This is an auxiliary bit used as a control bit in a NOT gate. The 6th C 2 - The control bit of the NOT gate is C 7 - The first 5 C bits of the control bits of the NOT gate 61 2 - This is a control bit not used in the NOT gate. The 6th C 2 - The target of the NOT gate is the 5th C 2 - An auxiliary bit used as a control bit in a NOT gate.
[0134] C from the 7th to the 11th 2 - The NOT gate is used for the first five C's. 2 -This is a sequence of NOT gates in reverse order. C from the 12th to the 20th gate. 2 - The NOT gate is used for the 2nd to 10th C 2 -This is a sequence of NOT gates arranged in reverse order.
[0135] The 11th C in equivalent circuit 632 -NOT gate, C 7 - The same operation as the NOT gate 61 is performed on the target bit. The latter nine C 2 - The NOT gate is a quantum gate that restores the state of the auxiliary bits. These C 2 - The presence of the NOT gate means that the equivalent circuit 63 includes the state of the auxiliary bits after the gate operation, C 7 - This is equivalent to the NOT gate 61.
[0136] In the second conversion method, clean bits are treated as dirty bits, meaning they are not effectively utilized. Therefore, although the number of qubits used is limited to 13, the number of quantum gates in the equivalent circuit 63 is high at 20.
[0137] Figure 17 shows the C transformation using the third conversion method. 7 -This is a diagram showing an example of an equivalent circuit for a NOT gate. 7 -When applying the third conversion scheme to the NOT gate 61, one auxiliary bit is used. In the third conversion scheme, one auxiliary bit (the clean bit in the example in Figure 17) is used to convert C 7 - NOT gate 61 with 4 C 4 - An equivalent circuit 64 is generated by dividing it into NOT gates. C is included in the equivalent circuit 64. 4 -By converting each NOT gate into an equivalent circuit 47 (see Figure 5), C 2 - An equivalent circuit 65 consisting only of NOT gates is generated.
[0138] In the third conversion method, clean bits are treated as dirty bits, meaning they are not effectively utilized. Furthermore, only one auxiliary bit is used, resulting in many dirty bits also not being effectively utilized. Therefore, although the number of qubits used is limited to 13, the equivalent circuit 65 has a high number of quantum gates, at 32.
[0139] Therefore, the quantum gate conversion unit 130 minimizes the number of gates by using the given clean bits and dirty bits as much as possible. In particular, when the number of clean bits c is "c = 1,..., k - 1", the quantum gate conversion unit 130 performs conversion to an equivalent circuit with fewer quantum gates by the fourth conversion method.
[0140] The quantum gate conversion unit 130 is C k -NOT's k control bit groups C = {c1, ···, c k} to generate as many pairs of two quantum bits as the number of clean bits, similar to the first conversion method. The quantum gate conversion unit 130 uses the generated two quantum bits as control bits and the clean bits as target bits for C 2 -NOT gates are added to the equivalent circuit. The clean bits that become target bits in the added C 2 -NOT gates are added to the control bit group C. In this case, if there are k - 2 or more clean bits, it is the same as the first conversion method. Such a conversion policy is the basic policy of the fourth conversion method.
[0141] FIG. 18 is a diagram showing an example of an equivalent circuit of C 7 -NOT gates according to the basic policy of the fourth conversion method. As shown in FIG. 18, when k = 7 and the number of clean bits "c = 5", C 7 -NOT gate 61 is converted to an equivalent circuit 71 including 11 C 2 -NOT gates, similar to the first conversion method (see FIG. 15).
[0142] When the number of clean bits is less than k - 5, the quantum gate conversion unit 130 gradually reduces the number of control bits of the C k -NOT gate 61. At that time, if the control bits are not properly grouped, the number of quantum gates in the converted quantum circuit cannot be sufficiently reduced.
[0143] For example, C 2 -NOT gates using groups of control bits corresponding to the number of clean bits, and those C 2-C using control bits not used in the NOT gate k -It is possible to convert this into an equivalent circuit that includes a NOT gate.
[0144] Figure 19 shows the fourth conversion method for C when there are fewer than k-2 clean bits. 7 - This figure shows the first example of the equivalent circuit of a NOT gate. In the example in Figure 19, c=1 for k=7. In this case, C 7 - The NOT gate 61 is two C 2 - NOT gate and one C 6 - This is converted to an equivalent circuit 72 that includes a NOT gate.
[0145] Here, the central C 6 -When converting a NOT gate to an equivalent circuit, there are only two dirty bits (c1 and c2) available as auxiliary bits. Therefore, C 6 - In the conversion to the equivalent circuit of a NOT gate, only the third conversion method can be applied. When the third conversion method is applied, C 6 - A C with 24 NOT gates 2 -It is converted to a NOT gate. As a result, C 7 - The NOT gate 61 has a total of 26 C 2 -It is converted to a NOT gate. Thus, applying this third conversion method increases the number of gates.
[0146] Therefore, the quantum gate conversion unit 130 is the central C after division. k - To enable the application of a second transformation scheme to the NOT gate, the target C k - The control bits of the NOT gate are divided into multiple subgroups. This reduces the number of quantum gates in the ultimately generated equivalent circuit.
[0147] Figure 20 shows the fourth conversion method for C when there are fewer than k-2 clean bits. 7 This figure shows a second example of the equivalent circuit of a -NOT gate. In the example in Figure 20, when k=7 and c=1, C 7 - NOT gate 61, two C3 - NOT gates 72a, 72c and one C 5 -It is converted to an equivalent circuit 72 that includes a NOT gate 72b.
[0148] C 3 -In the conversion to the equivalent circuit of the NOT gate 72a, the control bits {c4, c5, c6} can be used as dirty auxiliary bits. Therefore, C 3 - The NOT gate 72a uses a second transformation scheme to convert four C 2 -Can be converted to a NOT gate.
[0149] C 5 -In the conversion to the equivalent circuit of the NOT gate 72b, the control bits {c1, c2, c3} can be used as dirty auxiliary bits. Therefore, C 5 - The NOT gate 72b uses a second transformation scheme to convert 12 C 2 -Can be converted to a NOT gate.
[0150] C 3 -In the conversion to the equivalent circuit of the NOT gate 72c, the control bits {c4, c5, c6} can be used as dirty auxiliary bits. Therefore, C 3 - The NOT gate 72c uses a second transformation scheme to convert four C 2 -Can be converted to a NOT gate.
[0151] Thus, first C 2 - Instead of generating a NOT gate, C 3 -By generating a NOT gate, the central C k - The NOT gate is C 5 -This becomes a NOT gate. As a result, each of the capacitors included in the equivalent circuit 72 k -When converting a NOT gate to an equivalent circuit, k-2 or more auxiliary bits become available. As a result, the second conversion method allows C 7 - A total of 20 NOT gates 2 -Can be converted to a NOT gate.
[0152] When two or more clean bits c can be used, the quantum gate conversion unit 130 divides the C k -NOT gate into 2c + 1 quantum gates. At this time, the quantum gate conversion unit 130 determines c + 1 integers "k1, ···, k c+1 ". The quantum gate conversion unit 130 divides the C k_1 -NOT, ···, C k_c -NOT, C k_c+1 -NOT, C k_c -NOT, ···, C k_1 -NOT. The characters after _ following the superscript k indicate the subscript of k. For example, the superscript "k_1, ···, k_c+1" represents the superscript integers "k1, ···, k c+1 " respectively.
[0153] For the integer indicating the number of control bits of the divided quantum gate (number of control bits after division), the quantum gate conversion unit 130 determines it to satisfy the following two conditions among those satisfying k1 ≧ k2 ≧ ··· ≧ k c . However, k c+1 satisfies the following formula.
[0154]
Equation
[0155] [Condition 1] For the c k_c+1 -NOT gate, the second conversion method can be used. That is, two dirty bits can be secured for k c+1 . [Condition 2] There does not exist 1 ≦ i < j ≦ c that satisfies k i > c - i + 2 and k j < c - j + 2.
[0156] At this time, when the quantum gate conversion unit 130 converts the C k_i -NOT gate to the C 2 -NOT gate, the clean bits from the (i + 1)-th to the c-th can be used. Also, when converting the C k_i -NOT gate to the C 2When converting to a NOT gate, sufficient dirty bits can be secured. Therefore, the aforementioned "basic policy + second conversion method" can be applied.
[0157] Condition 1 is for a C with a large number of control bits k_i -It is a condition for securing as many clean bits as possible for the NOT gate. Condition 2 is a condition for using clean bits without excess or deficiency. If k i > c - i + 2 and k j < c - j + 2 are satisfied for 1 ≤ i < j ≤ c, then k i ← k i -1, k j ← k j +1 in the new split, especially in C k_j -In the conversion of the NOT gate, it can be confirmed that clean bits are being effectively utilized more than in the initial split. That is, when condition 2 is not satisfied, the quantum gate conversion unit 130 sets k i ← k i -1, k j ← k j +1 and changes the number of control bits after splitting, thereby reducing the number of quantum gates by four compared to the initial split.
[0158] FIG. 21 is a diagram showing an example of splitting by the fourth conversion method when c = 2. In the example of FIG. 21, it is assumed that the C 12 -NOT gate 73 is converted into an equivalent circuit 74. And the number of clean bits c is 2 (k = 12, c = 2). In this case, the integer representing the number of control bits after splitting the C k_i -NOT gate obtained by splitting according to the fourth conversion method is "k1 = k2 = 3, k3 = 8".
[0159] Since "k1 = 3", the first quantum gate of the equivalent circuit 74 is the C 3 -NOT gate 74a. Since "k2 = 3", the second quantum gate of the equivalent circuit 74 is the C 3 -NOT gate 74b. Since "k3 = 8", the third quantum gate (the central quantum gate) of the equivalent circuit 74 is the C 8- This is a NOT gate 74c. Since "k2=3", the fourth quantum gate of the equivalent circuit 74 is C 3 -This is a NOT gate 74d. Since "k1=3", the fifth quantum gate of the equivalent circuit 74 is C 3 -This is a NOT gate 74e.
[0160] C 3 -In the conversion to the equivalent circuits of the NOT gates 74a and 74e, one clean bit can be used as an auxiliary bit. 3 -A fourth transformation method can be applied to the NOT gates 74a and 74e. Therefore, C 3 -NOT gates 74a and 74e each use the clean bit to perform three C transformations based on the basic principle of the fourth transformation scheme. 2 - This can be converted to an equivalent circuit 42 (see Figure 4) that includes a NOT gate. 3 -In the conversion to the equivalent circuits of the NOT gates 74b and 74d, one dirty bit can be used as an auxiliary bit. Therefore C 3 -NOT gates 74b and 74d each use the dirty bit to perform four C 2 - This can be converted to an equivalent circuit 43 (see Figure 4) that includes a NOT gate. 8 -In the conversion to the equivalent circuit of the NOT gate 74c, six dirty bits can be used as auxiliary bits. Therefore C 8 - The NOT gate 74c uses a second transformation scheme to convert 24 C 2 -Can be converted to a NOT gate.
[0161] Based on the above, the quantum gate conversion unit 130 controls each C in the equivalent circuit 74. k -By converting the NOT gate into an equivalent circuit, C 12 - NOT gate 73, a total of 38 C 2 -It can be converted into an equivalent circuit including a NOT gate.
[0162] Figure 22 shows an example of partitioning using the fourth transformation method when c=3. In the example in Figure 22, C 12-The case where the NOT gate 73 is converted to the equivalent circuit 75 is assumed. The number of clean bits c is 3 (k=12, c=3). In this case, the integers indicating the division positions according to the fourth conversion method are "k1=3, k2=k3=2, k3=8".
[0163] Since "k1=3", the first quantum gate of equivalent circuit 75 is C 3 -This is a NOT gate 75a. Since "k2=2", the second quantum gate of the equivalent circuit 75 is C 2 -This is a NOT gate 75b. Since "k3=2", the third quantum gate of the equivalent circuit 75 is C 2 -This is a NOT gate 75c. Since "k4=8", the fourth quantum gate (the central quantum gate) of the equivalent circuit 75 is C 8 -This is a NOT gate 75d. Since "k3=2", the fifth quantum gate of the equivalent circuit 75 is C 2 -This is a NOT gate 75e. Since "k2=2", the sixth quantum gate of the equivalent circuit 75 is C 2 -This is a NOT gate 75f. Since "k1=3", the 7th quantum gate of the equivalent circuit 75 is C 3 - NOT GAET 75g
[0164] C 3 -In the conversion to the equivalent circuits of the NOT gates 75a and 75g, one clean bit can be used as an auxiliary bit. Therefore C 3 -NOT gates 75a and 75g each use the clean bit to perform three C operations. 2 - This can be converted to an equivalent circuit 42 (see Figure 4) that includes a NOT gate. 8 -In the conversion to the equivalent circuit of the NOT gate 75d, six dirty bits can be used as auxiliary bits. Therefore C 8 - The NOT gate 75d uses a second transformation method to convert 24 C 2 -Can be converted to a NOT gate.
[0165] Based on the above, the quantum gate conversion unit 130 controls each C in the equivalent circuit 75. k -By converting the NOT gate into an equivalent circuit, C12 - NOT gate 73, a total of 34 C 2 -It can be converted into an equivalent circuit including a NOT gate.
[0166] Next, we will explain the functions of the quantum gate conversion unit 130 in order to realize such a conversion process. Figure 23 shows an example of the functions of the quantum gate conversion unit. The quantum gate conversion unit 130 includes a quantum gate conversion management unit 131, a partitioning method determination unit 132, and a quantum circuit generation unit 133.
[0167] The quantum gate conversion management unit 131 works in conjunction with the partitioning method determination unit 132 and the quantum circuit generation unit 133, and the input C k - Converts a NOT gate into an equivalent circuit "qc". For example, the quantum gate conversion management unit 131 has C k -Information indicating a NOT gate, "tmpCleanBitList", and "tmpDirtyBitList" are input. C k - The information indicating a NOT gate is a list of control bits C={c1,···,c k} and the target bit identification number "x" are included. "tmpCleanBitList" is a list of qubits that can be used as clean bits "CA={ca1,···,ca c}" is the number of clean bits (where 1 ≤ c ≤ k-3). "tmpDirtyBitList" is a list of qubits that can be used as dirty bits "DA={da1,···,da d}" where d is the number of dirty bits.
[0168] The division method determination unit 132 determines the final C according to the values of k, c, and d. 2 - C that minimizes the number of NOT gates k - Number of control bits for the quantum gate after splitting the NOT gate (k1,···,k c+1 ) will be decided.
[0169] The quantum circuit generation unit 133 determines the number of control bits (k1,···,k) of the quantum gate after division, which is determined by the division method determination unit 132. c+1 ) received, C k - Equivalent circuit of the NOT gate "qc" (C 2 -Outputs only NOT gates.
[0170] Next, the procedure for quantum gate conversion processing by the quantum gate conversion unit 130 will be explained in detail. Figure 24 is a flowchart showing an example of the procedure for quantum gate transformation. The process shown in Figure 24 will be explained below according to the step numbers.
[0171] [Step S301] The quantum gate transformation management unit 131 determines whether the conditions are met, namely that the number of clean bits c is 0 (c=0) and the number of dirty bits d is 1 or greater (d≧1). If the conditions are met, the quantum gate transformation management unit 131 proceeds to step S302. If the conditions are not met, the quantum gate transformation management unit 131 proceeds to step S303.
[0172] [Step S302] The quantum gate conversion management unit 131 communicates to the quantum circuit generation unit 133 the C to be converted. k - This instructs the generation of a quantum circuit equivalent to a NOT gate. The quantum circuit generation unit 133 generates the C to be transformed. k - An equivalent circuit "qc" of the NOT gate is generated by a third conversion method. When the quantum gate conversion management unit 131 obtains the equivalent circuit "qc" from the quantum circuit generation unit 133, it proceeds to step S307.
[0173] [Step S303] The quantum gate transformation management unit 131 determines whether the condition that the number of clean bits c is k-2 or greater (c≧k-2) is met. If the condition is met, the quantum gate transformation management unit 131 proceeds to step S304. If the condition is not met, the quantum gate transformation management unit 131 proceeds to step S305.
[0174] [Step S304] The quantum gate conversion management unit 131 communicates to the quantum circuit generation unit 133 the C to be converted. k - This instructs the generation of a quantum circuit equivalent to a NOT gate. The quantum circuit generation unit 133 generates the C to be transformed. k - An equivalent circuit "qc" of the NOT gate is generated by the first conversion method. When the quantum gate conversion management unit 131 obtains the equivalent circuit "qc" from the quantum circuit generation unit 133, it proceeds to step S307.
[0175] [Step S305] The quantum gate transformation management unit 131 instructs the partitioning method determination unit 132 to determine the partitioning method. The partitioning method determination unit 132, in accordance with the instruction, C k -C obtained by splitting the NOT gate k_i - Determine the number of control bits after the NOT gate is split. The quantum gate transformation management unit 131 obtains a set of integers indicating the number of control bits after splitting from the splitting method determination unit 132. Details of the splitting method determination process will be described later (see Figure 25).
[0176] [Step S306] The quantum gate conversion management unit 131 instructs the quantum circuit generation unit 133 to perform a fourth conversion using C k - This instructs the generation of a quantum circuit equivalent to a NOT gate. The quantum circuit generation unit 133 uses a fourth transformation method to generate C k - An equivalent circuit "qc" of the NOT gate is generated. The quantum gate transformation management unit 131 obtains the equivalent circuit "qc" from the quantum circuit generation unit 133.
[0177] [Step S307] The quantum gate conversion management unit 131 converts the equivalent circuit "qc" to the C of the conversion target. k - Outputs as an equivalent circuit of a NOT gate. Thus, when the first conversion method is applicable, C is converted using the first conversion method. k - The NOT gate is converted into an equivalent circuit. Also, if the applicable conversion method is limited to a third conversion method, the third conversion method is used to convert C k - The NOT gate is converted to an equivalent circuit. Otherwise, the fourth conversion method C k - The NOT gate is converted into an equivalent circuit.
[0178] Next, we will explain in detail the procedure for determining the division method. Figure 25 is a flowchart showing an example of the procedure for determining the division method. The process shown in Figure 25 will be explained below according to the step numbers.
[0179] [Step S401] The division method determination unit 132 performs initial settings. For example, the division method determination unit 132 sets k1=k2=···=k c Let = 2. Also, the division method determination unit 132 is k c+1 Set the following as in equation (1): "k1,···,k c If the initial value of " is "2", then the right-hand side of equation (1) is "k i All instances of "-1" become 1, and the right-hand side becomes "kc". That is, k c+1 The initial value is the C to be converted. k -This value is obtained by subtracting the number of clean bits c from the number of control bits k of the NOT gate.
[0180] [Step S402] The division method determination unit 132 initializes the variable j to "1" (j=1). [Step S403] The division method determination unit 132 determines whether or not the following equation (2) is satisfied.
[0181]
number
[0182] Equation (2) is C k_c+1 - The number of qubits available as dirty auxiliary bits at the time the NOT gate is executed is k c+1 - This indicates the condition that there are two or more. This condition is the application condition for the second conversion method. C k_c+1 -At the time of execution of the NOT gate, the number of dirty auxiliary bits available is the number of elements in DA and C k_1 - From a NOT gate to C k_c -This is the sum of the number of qubits used as control bits in each quantum gate up to the NOT gate.
[0183] When the condition for end determination is satisfied, the division method determination unit 132 advances the process to step S407. Also, when the condition for end determination is not satisfied, the division method determination unit 132 advances the process to step S404.
[0184] [Step S404] The division method determination unit 132 adds “1” to k (k j ←k j +1). Also, the division method determination unit 132 subtracts “1” from k (k j ←k c+1 -1). c+1 ←k c+1 -1).
[0185] [Step S405] The division method determination unit 132 determines whether k j is greater than or equal to c - j + 2 (k j ≧c - j + 2?). If k j is greater than or equal to c - j + 2, the division method determination unit 132 advances the process to step S406. Also, if k j is less than c - j + 2, the division method determination unit 132 advances the process to step S403.
[0186] By the process of step S405, the aforementioned condition 2 (there does not exist 1≦i<j≦c that satisfies k i >c - i + 2 and k j <c - j + 2.) is satisfied. That is, if after adding “1” to k j in step S404, “k j ≧c - j + 2” is not satisfied, then unless the end determination is satisfied, “1” is further added to k j . Since addition stops when “k j ≧c - j + 2” is satisfied, “k j >c - j + 2” does not hold.
[0187] Also, there may be a case where the number of clean bits “c - j” available for conversion to an equivalent circuit of a C k_j -NOT gate is small. For example, when “c - j = 0”, the initial value for k j about k jIn the first addition by step S404 for "k = 2", when "k j = 3", "k j > c - j + 2". In contrast, the number of clean bits "c - p" available for conversion to the equivalent circuit of the C k_p -NOT gate (j < p ≤ c) is less than "c - j" (for example, "c - j = -1"). Therefore, for example, even if the initial value of "k p = 2", "k p < c - j + 2" does not hold, and "k p < c - j + 2" is not satisfied.
[0188] From the above, there does not exist 1 ≤ j < p ≤ c that satisfies k j > c - j + 2 and k p < c - p + 2. Since it is the same even if j is replaced with i and p is replaced with j, condition 2 is satisfied by the existence of step S405. By satisfying condition 2, the clean bits are effectively utilized, and the number of quantum gates after conversion to the equivalent circuit is reduced.
[0189] [Step S406] The division method determination unit 132 updates j to the value obtained by adding 1 to the remainder of dividing j by c (j ← (j mod c) + 1). Then, the division method determination unit 132 proceeds with the process to step S403.
[0190] [Step S407] The division method determination unit 132 outputs "k1, ···, k c+1 " and ends the division method determination process. The output "k1, ···, k c+1 " indicates that the number of quantum gates after division is 2c + 1, and the number of control bits for each is "k1, ···, k c , k c+1 , k c ,, ···, k1".
[0191] In this way, the number of control bits for each of the divided C k_1 -NOT gate, C k_2 -NOT gate, ··· is determined. The number of control bits of the determined conversion target C k-By splitting a NOT gate into quantum gates of a predetermined size, the number of quantum gates in the ultimately generated equivalent circuit can be reduced.
[0192] Next, we will explain in detail the procedure for generating quantum circuits using the fourth transformation method. Figure 26 is a flowchart showing an example of the procedure for generating an equivalent circuit using the fourth conversion method. The process shown in Figure 26 will be explained below according to the step numbers.
[0193] [Step S501] The quantum circuit generation unit 133 receives a set of integers "k1,,···,k" that indicates the number of control bits after division. c ,k c+1 According to C k - The NOT gate is split. The splitting process results in C k_1 - NOT gate, ..., C k_c - NOT gate, C k_c+1 - NOT gate, ..., C k_c - NOT gate, ..., C k_1 - A NOT gate is generated.
[0194] [Step S502] The quantum circuit generation unit 133 generates an empty equivalent circuit "qc" (qc=[]). [Step S503] The quantum circuit generation unit 133 sets the initial value "1" for the variable i.
[0195] [Step S504] The quantum circuit generation unit 133 determines whether the value of variable i is less than or equal to the clean bit number c. If the value of variable i is less than or equal to the clean bit number c, the quantum circuit generation unit 133 proceeds to step S505. If the value of variable i exceeds the clean bit number c, the quantum circuit generation unit 133 proceeds to step S508.
[0196] [Step S505] The quantum circuit generation unit 133 is C k_i -NOT gate (the i-th quantum gate after splitting) C 2 -Process to convert to an equivalent circuit using a NOT gate (C k_i- Perform a NOT gate conversion process. Let the equivalent circuit generated by the conversion process be "circ". C k_i -Details of the NOT gate transformation process will be described later (see Figures 27 and 28). Note that C k_i -During the NOT gate transformation process, C k_i - In a NOT gate, the qubit that becomes a control bit is removed from the list of control bits C.
[0197] [Step S506] The quantum circuit generation unit 133 adds the equivalent circuit "circ" to the equivalent circuit "qc". [Step S507] The quantum circuit generation unit 133 adds 1 to the variable i (i ← i + 1). Then, the quantum circuit generation unit 133 proceeds to step S504.
[0198] [Step S508] The quantum circuit generation unit 133 generates a quantum circuit "qc" by arranging the quantum gates included in the equivalent circuit "qc" in reverse order. inv This generates ". [Step S509] The quantum circuit generation unit 133 generates the central quantum gate C after division. k_(c+1) - The NOT gate is converted to C using the second transformation method. 2 - Convert to an equivalent circuit using a NOT gate. k_(c+1) - The control bits of a NOT gate are the qubits remaining in the list of control bits C. k_(c+1) -The target bit of the NOT gate is the C to be converted. k - This is the same as the target bit x of a NOT gate.
[0199] For example, the quantum circuit generation unit 133 sets the number of elements L included in the list C of control bits to "L = k c+1 The quantum circuit generator 133 uses the first two dirty bits included in DA as auxiliary bits and converts C using the second conversion method. k_(c+1) - The NOT gate is converted into an equivalent circuit. The quantum circuit generation unit 133 designates the equivalent circuit generated by the conversion as "circ".
[0200] [Step S510] The quantum circuit generation unit 133 adds the equivalent circuit "circ" generated in step S509 to the equivalent circuit "qc". [Step S511] The quantum circuit generation unit 133 generates the quantum circuit "qc" generated in step S508. inv Add '' to the equivalent circuit "qc".
[0201] In this way, each of the divided quantum gates is C 2 -It is converted to an equivalent circuit consisting only of NOT gates. As a result, the original C that was to be converted is converted. k - An equivalent circuit of the NOT gate, "qc", is generated.
[0202] Figure 27 shows C k_i -This is a flowchart (1 / 2) showing an example of the procedure for the NOT gate transformation process. The process shown in Figure 27 will be explained below according to the step numbers. [Step S601] The quantum circuit generation unit 133 leaves the equivalent circuit "circ" blank (circ=[]).
[0203] [Step S602] The quantum circuit generation unit 133 generates k i Determine whether it is "2" or not (k i =2?). The quantum circuit generation unit 133 is k i If the result is "2", the process proceeds to step S603. The quantum circuit generation unit 133 also determines k i If the result is not "2", proceed to step S607.
[0204] [Step S603] The quantum circuit generation unit 133 sets the first two qubits of C (C[0], C[1]) as control bits and the i-th qubit of CA (CA[i]) as the target bit of C 2 -Add a NOT gate to the equivalent circuit "circ".
[0205] [Step S604] The quantum circuit generation unit 133 adds C to the equivalent circuit "circ" 2- The control bits in the NOT gate (the first two qubits of C) are removed from C. Then the quantum circuit generator 133 adds those qubits to DA.
[0206] [Step S605] The quantum circuit generation unit 133 adds C to the equivalent circuit "circ" 2 -Add the target bit CA[i] in the NOT gate to DA. [Step S606] The quantum circuit generation unit 133 adds C to the equivalent circuit "circ" 2 - The target bit CA[i] in the NOT gate is added to C. Then the quantum circuit generator 133 proceeds to step S627 (see Figure 28).
[0207] [Step S607] The quantum circuit generation unit 133 generates k from the beginning of C i List of individual quantum gates C tmp Create. [Step S608] The quantum circuit generation unit 133 generates an empty quantum circuit "qc tmp1 "Create (qc tmp1 =[]).
[0208] [Step S609] The quantum circuit generation unit 133 generates from C to C tmp The list with the elements excluded is DA tmp (DA tmp ←C\C tmp ). [Step S610] The quantum circuit generation unit 133 generates k i Set p to the smaller of -2 and ci (p = min{k i (-2, ci)
[0209] [Step S611] The quantum circuit generator 133 initializes j and i to "1" (j=i=1). [Step S612] The quantum circuit generation unit 133 determines whether the value of j is less than or equal to i+p (j ≤ i+p?). If the value of j is less than or equal to i+p, the quantum circuit generation unit 133 proceeds to step S613. If the value of j exceeds i+p, the quantum circuit generation unit 133 proceeds to step S618.
[0210] [Step S613] The quantum circuit generation unit 133 is C tmp The first two qubits (C tmp [0],C tmp [1]) is the control bit and the j-th qubit of CA (CA[j]) is the target bit C 2 - NOT gates are used in quantum circuits "qc tmp1 Add to "".
[0211] [Step S614] The quantum circuit generation unit 133 generates a quantum circuit "qc tmp1 C added to " 2 - NOT gate control bit (C tmp [0],C tmp [1]) DA tmp Add to it. [Step S615] The quantum circuit generation unit 133 generates a quantum circuit "qc tmp1 C added to " 2 - NOT gate control bit (C tmp [0],C tmp [1]) C tmp Remove from.
[0212] [Step S616] The quantum circuit generation unit 133 generates a quantum circuit "qc tmp1 C added to " 2 - The target bit (CA[j]) of the NOT gate is C tmp Add to it. [Step S617] The quantum circuit generation unit 133 adds 1 to the value of j (j ← j + 1). Then, the quantum circuit generation unit 133 proceeds to step S612.
[0213] [Step S618] The quantum circuit generation unit 133 sets L to k i Set -p (L←k i-p). Subsequently, the quantum circuit generation unit 133 proceeds to step S621 (see Figure 28).
[0214] Figure 28 shows C k_i -This is a flowchart (2 / 2) showing an example of the procedure for the NOT gate transform process. The process shown in Figure 28 will be explained below according to the step numbers. [Step S621] The quantum circuit generation unit 133 determines whether L=2 or not (L=2?). If L=2, the quantum circuit generation unit 133 proceeds to step S622. If L=2, the quantum circuit generation unit 133 proceeds to step S623.
[0215] [Step S622] The quantum circuit generation unit 133 is C tmp The first two qubits (C tmp [0],C tmp [1]) is the control bit and the i-th qubit of CA (CA[i]) is the target bit C 2 -NOT gate, equivalent circuit "qc tmp2 "Then the quantum circuit generation unit 133 proceeds to step S624.
[0216] [Step S623] The quantum circuit generation unit 133 is C tmp The qubit of the CA is used as the control bit, and the i-th qubit of the CA is used as the target bit. L - NOT gate, DA tmp The first L-2 bits are treated as dirty bits and converted into an equivalent circuit using a second conversion method. The quantum circuit generation unit 133 generates the equivalent circuit "qc" obtained by the conversion. tmp2 It outputs "".
[0217] [Step S624] The quantum circuit generation unit 133 generates a quantum circuit "qc tmp1 C inside " 2 - A quantum circuit "qc" formed by arranging NOT gates in reverse order. tmp1_inv This generates ". [Step S625] The quantum circuit generation unit 133 generates the equivalent circuit "circ" with "qc tmp1 ", "qc tmp2 ", "qctmp1_inv Add "."
[0218] [Step S626] The quantum circuit generation unit 133 generates k from the beginning of C i The quantum circuit generator 133 removes one element from C. The quantum circuit generator 133 also adds the removed element from C to DA. Furthermore, the quantum circuit generator 133 adds the i-th element of CA (CA[i]) to C.
[0219] [Step S627] The quantum circuit generation unit 133 outputs the equivalent circuit "circ". The process shown in Figures 27 and 28 generates a quantum circuit (C) equal to the number of clean bits. k_1 -NOT gate, ···,C k_c -NOT gate) Each one is C 2 - The circuit is converted to an equivalent circuit using a combination of NOT gates, and this converted equivalent circuit is added to the equivalent circuit "circ".
[0220] Next, C k -The transformation process of the NOT gate will be explained using a concrete example. Figure 29 shows C k This figure shows an example of a transformation using a -NOT gate. The target C is the one being transformed. k - The NOT gate 61 has 7 control bits (k=7). It is assumed that one clean bit and four dirty bits are available.
[0221] The inputs to the quantum gate transformation unit 130 are the control bit "C={c1,···,c7}", the target bit x, tmpCleanBitList "CA={ca1}", and tmpDirtyBitList "DA={da1,···,da4}". The quantum gate transformation management unit 131 first inputs "k=7", "c=1", and "d=4" to the partitioning method determination unit 132.
[0222] The division method determination unit 132 determines that when "k1=2" and "k2=6", the left side of the termination condition "k2-2≦d+k1" becomes "4" and the right side becomes "6", and thus the termination condition is met. Therefore, the division method determination unit 132 outputs "k1=2" and "k2=6".
[0223] The quantum gate transformation management unit 131 inputs "C", "CA", "DA", "k1=2", and "k2=6" to the quantum circuit generation unit 133 based on the output result of the partitioning method determination unit 132. The quantum circuit generation unit 133 then first generates an empty equivalent circuit "qc=[]".
[0224] Next, the quantum circuit generation unit 133 sets "i=1" and sets "qc=[]" with "c1,c2" as control bits and ca1 as the target bit C 2 - A NOT gate 76a is added. At this time, the quantum circuit generation unit 133 updates the control bits to "C={c3,···,c7}" and updates "tmpDirtyBitList" to "DA={da1,···,da4,c1,c2}". Furthermore, the quantum circuit generation unit 133 generates a quantum circuit "qc" by arranging the quantum gates included in "qc" in reverse order. inv This generates "qc". In the example in Figure 29, "qc inv The following is included in "C 2 -Only the NOT gate 76c is present.
[0225] The quantum circuit generation unit 133 uses all the qubits of "C={c3,···,c7}" as control bits and C with x as the target bit. 6 - The NOT gate is converted to C by the second conversion method. 2 - It is converted into an equivalent circuit 76b consisting only of NOT gates. At that time, the quantum circuit generation unit 133 sets "DA={da1,···,da4,c1,c2}" as the dirty bit. The quantum circuit generation unit 133 adds the generated equivalent circuit 76b to "qc". Furthermore, the quantum circuit generation unit 133 adds "qc" to "qc inv C inside " 2 -Add a NOT gate 76c.
[0226] In addition, C2 - The equivalent circuit 76 of the NOT gate 61 is output. The number of qubits of the output equivalent circuit 76 is "13", and the number of gates is "18". Compared with the first conversion method (qubit number "17", quantum gate number "11") shown in FIG. 15, the fourth conversion method requires fewer qubits. Compared with the second conversion method (qubit number "13", quantum gate number "20") shown in FIG. 16, the fourth conversion method requires fewer quantum gates. Compared with the third conversion method (qubit number "13", quantum gate number "32") shown in FIG. 17, the fourth conversion method requires fewer quantum gates.
[0227] Thus, by performing the conversion using the fourth conversion method, it is possible to minimize the number of quantum gates in the converted quantum circuit under the condition that the number of qubits used cannot be increased. By reducing the number of quantum gates, the calculation time by the quantum computer 200 can be shortened.
[0228] C to be converted k - Even when the number k of control bits of the NOT gate is even larger, similarly, by applying the fourth conversion method, it is possible to reduce the number of quantum gates in the conversion without increasing the number of qubits used. For example, for the C 12 - Assume that the NOT gate 73 is to be converted. The number of quantum gates in the converted equivalent circuit varies according to the number "c" of available clean bits and the number "d" of dirty bits.
[0229] <When c = 0> If 1 ≤ d ≤ k - 3, the C 12 - NOT gate 73 can be converted into an equivalent circuit of 72 C 2 - NOT gates by the third conversion method. If d ≥ k - 3, it can be converted into an equivalent circuit of 40 C 2 - NOT gates by the second conversion method.
[0230] <When c = 1> If d = 0, k1 = 6, k2 = 7, and for the C in the equivalent circuit 2- The number of NOT gates is "52". If d = 1, then k1 = 5 and k2 = 8, and for the equivalent circuit C 2 - The number of NOT gates is "48". If d = 2, then k1 = 5 and k2 = 8, and for the equivalent circuit C 2 - The number of NOT gates is "48". If d = 3, then k1 = 4 and k2 = 9, and for the equivalent circuit C 2 - The number of NOT gates is "44". If d = 4, then k1 = 4 and k2 = 9, and for the equivalent circuit C 2 - The number of NOT gates is "44". If d = 5, then k1 = 3 and k2 = 10, and for the equivalent circuit C 2 - The number of NOT gates is "40". If d = 6, then k1 = 3 and k2 = 10, and for the equivalent circuit C 2 - The number of NOT gates is "40". If d ≥ 7, then k1 = 2 and k2 = 11, and for the equivalent circuit C 2 - The number of NOT gates is "38".
[0231] <When c = 2> If d = 0 or 1, then k1 = 3, k2 = 3, k3 = 8, and for the equivalent circuit C 2 - The number of NOT gates is "38". If d = 2 or 3, then k1 = 3, k2 = 2, k3 = 9, and for the equivalent circuit C 2 - The number of NOT gates is "36". If d ≥ 4, then k1 = 2, k2 = 2, k3 = 10, and for the equivalent circuit C 2 - The number of NOT gates is "36".
[0232] <When c = 3> If d = 0, then k1 = 3, k2 = 2, k3 = 2, k4 = 8, and for the equivalent circuit C 2 - The number of NOT gates is "34". If d ≥ 1, then k1 = 2, k2 = 2, k3 = 2, k4 = 9, and for the equivalent circuit C 2 - The number of NOT gates is "34".
[0233] <When c = 4 - 9> Regardless of the value of d, k1 = ··· = k c = 2, k c+1 = 12 - c, and for the equivalent circuit C 2- The number of NOT gates is "40 - 2c".
[0234] <When c = 10> According to the first conversion method, C of the equivalent circuit 2 - The number of NOT gates is "21". In this way, the quantum gate conversion unit 130 can convert C k - NOT gates into the combination of C 2 - NOT gates with the minimum number possible.
[0235] 〔Other embodiments〕 In the second embodiment, quantum computing based on a quantum circuit is executed by the quantum computer 200, but it is also possible to execute quantum computing by quantum simulation using a classical computer. In that case, instead of the quantum computer 200, a classical computer capable of effective quantum simulation is used. Also, the classical computer 100 shown in the second embodiment may execute quantum simulation.
[0236] In the second embodiment, it is assumed that the quantum computer 200 can perform the gate operation of the C 2 - NOT gate, but there may be cases where the quantum computer 200 cannot perform the gate operation of the C 2 - NOT gate. In that case, the classical computer 100 converts the C 2 - NOT gate into an equivalent circuit combined with other basic quantum gates even in this case. Even in this case, as shown in the first and second embodiments, in advance, C k - NOT gates are converted into C 2 - NOT gates with a small number of quantum gates, so that the number of gates of the finally generated quantum circuit can be reduced.
[0237] In the second embodiment, the equivalent circuit includes a quantum circuit for restoring the state of an auxiliary bit (clean or dirty bit) to its state before use. If it is known that it is not necessary to restore the auxiliary bit to its state before use, the quantum circuit for restoring it to its state before use can be excluded from the equivalent circuit. Cases where it is not necessary to restore the auxiliary bit include, for example, when the auxiliary bit is not the object being measured, and the subsequent state of the auxiliary bit does not affect the qubit being measured. By excluding the quantum circuit for restoring the state of an auxiliary bit to its state before use from the equivalent circuit, the number of quantum gates can be reduced.
[0238] The above merely illustrates the principle of the present invention. Furthermore, numerous modifications and changes are possible for those skilled in the art, and the present invention is not limited to the exact configurations and applications shown and described above. All corresponding modifications and equivalents are considered to be within the scope of the present invention as defined by the appended claims and their equivalents. [Explanation of symbols]
[0239] 1. The first quantum circuit 2. The first quantum gate 2a First qubit 2b Second qubit 2c Third qubit 3. The second quantum circuit 3a The second quantum gate 3b The third quantum gate 3c The fourth quantum gate 4. The Fourth Quantum Circuit 4a~4c The third quantum circuit
Claims
1. A first quantum gate is extracted from the first quantum circuit, in which k (where k is an integer greater than or equal to 3) first qubits are used as control bits and one second qubit is used as the target bit, and when all of the control bits are 1, the value of the target bit is inverted. From the qubits other than the first qubit and the second qubit, a third qubit that has a predetermined value before the gate operation by the first quantum gate is identified. The number of control bits for the second quantum gate corresponding to the second qubit and the number of control bits for each of the third quantum gates corresponding to each of the third qubits are determined to be such that the sum of the number of control bits for the third quantum gates and the number of control bits for the second quantum gates satisfy a predetermined relationship. A second quantum circuit equivalent to the first quantum gate is generated, which includes a third quantum gate that uses the first qubits as control bits for a number of determined control bits, the corresponding third qubit as the target bit, and inverts the value of the target bit when all the control bits are 1, and a second quantum gate that uses the first qubits and the third qubit not used as control bits in the third quantum gate as control bits, the second qubit as the target bit, and inverts the value of the target bit when all the control bits are 1. A quantum circuit design support program that allows a computer to perform the processing.
2. In the process of determining the number of control bits for the second quantum gate and the number of control bits for each of the third quantum gates, the predetermined relationship is applied such that a predetermined value corresponding to the number of control bits for the second quantum gate is less than or equal to the sum of the number of fourth qubits other than the first qubit, the second qubit, and the third qubit, and the number of control bits for the third quantum gate. The quantum circuit design support program according to claim 1.
3. In the process of determining the control bit count of the second quantum gate and the control bit count of each of the third quantum gates, the initial value of the control bit count of each of the third quantum gates is set to 2, the value obtained by subtracting the number of third qubits from k is set to the initial value of the control bit count of the second quantum gate, and the increase in the control bit count of any of the third quantum gates and the decrease in the control bit count of the second quantum gate by the amount of the increase are repeated until the predetermined relationship is satisfied. The quantum circuit design support program according to claim 1.
4. In the process of determining the number of control bits for the second quantum gate and the number of control bits for each of the third quantum gates, the third quantum gate corresponding to each of the third qubits is selected in order, the number of control bits for the selected third quantum gate is increased by 1, and the number of control bits for the second quantum gate is decreased by 1. This process is repeated until the number of control bits for the selected third quantum gates satisfies a predetermined condition, and when the predetermined condition is met, the next third quantum gate is selected. The quantum circuit design support program according to claim 3.
5. The process for generating the second quantum circuit involves generating the second quantum circuit by performing gate operations using the third quantum gate corresponding to each of the third qubits, then performing gate operations using the second quantum gate, and then performing gate operations using the fourth quantum gate, which performs the same gate operations as each of the third quantum gates, in reverse order. The quantum circuit design support program according to claim 1.
6. The second quantum gate, the third quantum gate, and the fourth quantum gate included in the second quantum circuit are each converted into an equivalent third quantum circuit by combining Toffoli gates, and the first quantum gate in the first quantum circuit is replaced with the third quantum circuit to form a fourth quantum circuit. A quantum circuit design support program according to claim 5, which causes a computer to perform further processing.
7. In the process of converting the first quantum gate to the fourth quantum circuit, the first qubit used as a control bit in the third quantum gate, and the fourth qubit other than the first qubit, the second qubit, and the third qubit are used as auxiliary bits to generate the third quantum circuit which is equivalent to the second quantum gate. The quantum circuit design support program according to claim 6.
8. A first quantum gate is extracted from the first quantum circuit, in which k (where k is an integer greater than or equal to 3) first qubits are used as control bits and one second qubit is used as the target bit, and when all of the control bits are 1, the value of the target bit is inverted. From the qubits other than the first qubit and the second qubit, a third qubit that has a predetermined value before the gate operation by the first quantum gate is identified. The number of control bits for the second quantum gate corresponding to the second qubit and the number of control bits for each of the third quantum gates corresponding to each of the third qubits are determined to be such that the sum of the number of control bits for the third quantum gates and the number of control bits for the second quantum gates satisfy a predetermined relationship. A second quantum circuit equivalent to the first quantum gate is generated, which includes a third quantum gate that uses the first qubits as control bits for a number of determined control bits, the corresponding third qubit as the target bit, and inverts the value of the target bit when all the control bits are 1, and a second quantum gate that uses the first qubits and the third qubit not used as control bits in the third quantum gate as control bits, the second qubit as the target bit, and inverts the value of the target bit when all the control bits are 1. A quantum circuit design support method in which a computer performs the processing.
9. A first quantum gate is extracted from a first quantum circuit, in which k (where k is an integer greater than or equal to 3) first qubits are used as control bits and one second qubit is used as a target bit, and when all the control bits are 1, the value of the target bit is inverted. A third qubit is identified from the qubits other than the first and second qubits that will have a predetermined value before the gate operation by the first quantum gate is performed. The number of control bits of the second quantum gate corresponding to the second qubit and the number of control bits of each third quantum gate corresponding to each of the third qubits are used as the sum of the number of control bits of the third quantum gates and the number of control bits of the second quantum gate. A processing unit that generates a second quantum circuit equivalent to the first quantum gate, including: a third quantum gate which determines the number of control bits to a value that satisfies a predetermined relationship, uses the determined number of control bits of the first qubit as the control bits, uses the corresponding third qubit as the target bit, and inverts the value of the target bit when all the control bits are 1; and a second quantum gate which uses the first qubit and the third qubit not used as control bits in the third quantum gate as the control bits, uses the second qubit as the target bit, and inverts the value of the target bit when all the control bits are 1. A quantum circuit design support device.