Quantum calculation support program, quantum calculation support method, and information processing device

The quantum calculation support program optimizes qubit allocation in dynamic quantum circuits by generating allocation candidates and calculating index values based on measurement results, addressing the inefficiency of conventional methods and improving fidelity by reducing swap gate execution.

WO2025009030A1PCT designated stage expired Publication Date: 2025-01-09FUJITSU LTD

Patent Information

Application Number
PCT/JP2023/024672
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Filing Date
2023-07-03
Publication Date
2025-01-09

AI Technical Summary

Technical Problem

Conventional quantum circuit conversion techniques fail to adequately determine the relationship between physical qubit assignment for dynamic quantum circuits with conditional or loop circuits and the number of swap gates required, leading to excessive swap gate execution and reduced fidelity in quantum computations.

Method used

A quantum calculation support program that generates multiple allocation candidates for qubit assignment, creates dynamic quantum circuits satisfying constraints, and calculates index values based on measurement results to optimize qubit allocation, reducing the number of swap gates and improving fidelity.

Benefits of technology

The approach enhances the fidelity of quantum computations by determining optimal qubit allocations for dynamic quantum circuits, minimizing the number of swap gates and maintaining high-fidelity results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure JP2023024672_09012025_PF_FP_ABST
    Figure JP2023024672_09012025_PF_FP_ABST
Patent Text Reader

Abstract

The present invention improves the fidelity of quantum calculation according to dynamic quantum circuits. An information processing device (10) generates a plurality of allocation candidates (3a, 3b, ...) on the basis of a first dynamic quantum circuit (1). The information processing device (10) generates second dynamic quantum circuits (4a, 4b, ...) satisfying constraint conditions (2), on the basis of the plurality of allocation candidates (3a, 3b, ...). The information processing device (10) acquires, at measurement points (1a), measurement results obtained by performing a plurality of quantum calculations according to the second dynamic quantum circuits corresponding to some of the plurality of allocation candidates (3a, 3b, ...). On the basis of the measurement results, the information processing device (10) calculates, for each of the plurality of allocation candidates (3a, 3b, ...), an index value that affects the fidelity of quantum calculation performed according to the corresponding second dynamic quantum circuit (4a, 4b, ...). The information processing device (10) then determines the allocation on the basis of the index values.
Need to check novelty before this filing date? Find Prior Art

Description

Quantum computing assistance program, quantum computing assistance method, and information processing device

[0001] The present invention relates to a quantum computing assistance program, a quantum computing assistance method, and an information processing device.

[0002] A quantum computation can be modeled as a quantum circuit, which represents gate operations that act on qubits. Each qubit represented in the quantum circuit is assigned a qubit within the quantum device (hereafter referred to as a physical qubit).

[0003] A quantum computer performs a gate operation on a quantum circuit's corresponding physical qubit, changing the state of the corresponding quantum bit. When the quantum circuit is instructed to measure the state of a quantum qubit, the quantum computer measures the state of the corresponding physical qubit and stores the result in a classical bit.

[0004] The quantum circuit corresponding to the problem to be solved is described using various types of quantum gates. However, the quantum gates that quantum computers can execute are limited to a certain number of quantum gates (native gates). Therefore, the initial quantum circuit is converted into a quantum circuit that consists only of native gates.

[0005] Furthermore, in quantum computers, pairs of qubits that can be operated by a two-qubit gate are limited to quantum gates that are adjacent in the topology. Therefore, when converting a quantum circuit, if there is a two-qubit gate, the two intra-convolution qubits in the quantum circuit that are the target of the two-qubit gate's operation are assigned to physical qubits that are adjacent in the topology. If such an assignment is not possible, a swap gate is added to the converted quantum circuit. By adding a swap gate, the physical qubit corresponding to the intra-convolution qubit that is the target of the gate operation can be changed to a physical qubit that is adjacent in the topology.

[0006] The number of swap gates that should be added depends on the initial allocation of physical qubits to intra-circuit qubits. The number of swap gates affects the fidelity of quantum computation using a quantum circuit. Fidelity is a performance indicator that indicates how close the operation of qubits is to the ideal. Since the fidelity decreases as the number of swap gates increases, physical qubits are allocated to intra-circuit qubits so that the number of swap gates contained in the converted quantum circuit is reduced.

[0007] A quantum circuit can include a conditional branching circuit (e.g., If-else) that selects a series of gate operations to be executed depending on the measurement result. A quantum circuit can also include a loop circuit that repeats processing depending on the measurement result. The measurement result in a quantum circuit is unknown until the quantum circuit is executed, and the branch destination of the conditional branching circuit and the number of iterations of the loop circuit cannot be determined before the quantum circuit is executed.

[0008] Therefore, for example, a method for estimating the fidelity of quantum hardware has been proposed. A method for optimizing a quantum circuit has also been proposed, including the step of replacing an identified set of quantum circuit gates with a quantum circuit gate template. The quantum circuit gate template in this method has a lower quantum cost than the identified set of quantum circuit gates. A method has also been proposed for estimating the fidelity of each subcircuit and multiplying the estimated circuit fidelity of each subcircuit to obtain an estimate of the fidelity of the quantum processor. Furthermore, a method has been proposed for realizing standard verification of the reliability of quantum devices and estimating quantum states with fewer resources.

[0009] Japanese Patent Publication No. 2022-167926 Japanese Patent Publication No. 2022-521143 U.S. Patent Application Publication No. 2022 / 0383180 U.S. Patent Application Publication No. 2021 / 0374589

[0010] However, conventional quantum circuit conversion techniques do not fully consider the relationship between the allocation of physical qubits to qubits in dynamic quantum circuits, including conditional branch circuits or loop circuits, and the number of swap gates to be executed, which can result in excessive execution times of swap gates and a deterioration in the fidelity of quantum computation.

[0011] In one aspect, the present invention aims to improve the fidelity of quantum computations according to dynamic quantum circuits.

[0012] One proposal provides a quantum computing support program that causes a computer to perform the following processes: Based on a first dynamic quantum circuit in which gate operations to be performed vary depending on measurement results of the quantum state of the quantum bits at predetermined measurement points, the computer generates a plurality of assignment candidates indicating candidates for a plurality of second quantum bits in a quantum computer to be assigned to a plurality of first quantum bits indicated in the first dynamic quantum circuit; Based on each of the plurality of assignment candidates, the computer generates a second dynamic quantum circuit that is capable of performing gate operations equivalent to those of the first dynamic quantum circuit while satisfying constraints on gate operations in the quantum computer; The computer acquires measurement results at measurement points in a plurality of quantum computations performed according to second dynamic quantum circuits corresponding to some of the plurality of assignment candidates; Based on the measurement results, the computer calculates, for each of the plurality of assignment candidates, an index value that affects the fidelity of a quantum computation performed according to the corresponding second dynamic quantum circuit; The computer then determines an assignment of the second quantum bits to the plurality of first quantum bits based on the index value of each of the plurality of assignment candidates.

[0013] According to one aspect, the fidelity of quantum computations according to dynamic quantum circuits can be improved. These and other objects, features, and advantages of the present invention will become apparent from the following description taken in conjunction with the accompanying drawings illustrating preferred embodiments of the present invention.

[0014] 1 is a diagram illustrating an example of a quantum computing assistance method according to a first embodiment. FIG. 1 is a diagram illustrating an example of the configuration of a quantum computing system. FIG. 2 is a diagram illustrating an example of hardware of a device constituting a quantum computing system. FIG. 3 is a diagram illustrating an example of a quantum circuit. FIG. 4 is a diagram illustrating an example of a dynamic quantum circuit including a conditional branching circuit. FIG. 5 is a diagram illustrating an example of a dynamic quantum circuit including a loop circuit. FIG. 6 is a diagram illustrating an example of conversion to a native gate. FIG. 7 is a diagram illustrating an example of quantum bit allocation according to actual machine constraints. FIG. 8 is a diagram illustrating an example of a case where quantum bit allocation is changed within a quantum circuit. FIG. 9 is a diagram illustrating an example of a function for quantum computing in a classical computer. FIG. 10 is a diagram illustrating an example of topology information. FIG. 11 is a diagram illustrating an example of an objective function definition. FIG. 12 is a flowchart illustrating an example of a quantum computing procedure. FIG. 13 is a diagram illustrating an example of a dynamic quantum circuit to be calculated. FIG. 14 is a diagram illustrating an example of an allocation candidate set. FIG. 15 is a diagram illustrating a first example of an executable quantum circuit. FIG. 16 is a diagram illustrating a second example of an executable quantum circuit. FIG. 17 is a diagram illustrating a first example of executable quantum circuit selection according to branch probability. FIG. 18 is a diagram illustrating an example of execution results of an executable quantum circuit corresponding to a selected allocation candidate. FIG. 19 is a flowchart illustrating an example of a procedure for allocation determination processing. FIG. 19 is a diagram illustrating an example of executable quantum circuit information. FIG. 19 is a diagram illustrating an example of a dynamic quantum circuit including a loop operation. FIG. 19 is a diagram illustrating an example of an objective function value obtained by executing an executable quantum circuit including a loop operation.

[0015] The present embodiment will be described below with reference to the drawings. Note that each embodiment can be implemented by combining multiple embodiments within a consistent range. [First Embodiment] The first embodiment is a quantum computing assistance method for improving the fidelity of quantum computing according to a dynamic quantum circuit.

[0016] Fig. 1 is a diagram illustrating an example of a quantum-assisted computing method according to a first embodiment. Fig. 1 illustrates an information processing device 10 that implements the quantum-assisted computing method. The information processing device 10 can implement the quantum-assisted computing method by, for example, executing a quantum-assisted computing program.

[0017] The information processing device 10 includes a storage unit 11 and a processing unit 12. The storage unit 11 is, for example, a memory or a storage device included in the information processing device 10. The processing unit 12 is, for example, a processor or an arithmetic circuit included in the information processing device 10.

[0018] The storage unit 11 stores a first dynamic quantum circuit 1 and a constraint 2. The first dynamic quantum circuit 1 is a quantum circuit in which the gate operation to be performed varies depending on the measurement result of the quantum state at a predetermined measurement point 1 a for a first quantum bit designated as an operation target. For example, the first dynamic quantum circuit 1 includes a conditional branch circuit that executes either a first partial circuit or a second partial circuit depending on the measurement result at the measurement point.

[0019] Constraint 2 indicates a constraint on gate operations in a quantum computer. For example, Constraint 2 indicates a limited pair of second qubits (physical qubits) that can be used to operate a two-qubit gate among the second qubits (physical qubits) possessed by a quantum computer that executes quantum computation. In this case, the quantum computer cannot perform a two-qubit gate operation between second qubits that are not specified in Constraint 2.

[0020] In addition, constraint 2 may also specify which of the two second quantum bits to be operated on can be used as a control bit and which can be used as a target bit. Constraint 2 also specifies the type of quantum gate (native gate) that can be executed by the quantum computer.

[0021] The processing unit 12 generates a quantum circuit that allows a quantum computer to perform high-fidelity quantum computation based on the first dynamic quantum circuit 1. For example, the processing unit 12 executes the following processes.

[0022] Based on the first dynamic quantum circuit 1, the processing unit 12 generates a plurality of allocation candidates 3a, 3b, ... indicating candidates for a plurality of second quantum bits in the quantum computer to be assigned to a plurality of first quantum bits indicated in the first dynamic quantum circuit 1.

[0023] Next, based on each of the multiple allocation candidates 3a, 3b, ..., the processing unit 12 generates second dynamic quantum circuits 4a, 4b, ... that satisfy the constraint 2 and can perform gate operations equivalent to those of the first dynamic quantum circuit 1. For example, when the first dynamic quantum circuit 1 includes a conditional branch circuit, the processing unit 12 generates second dynamic quantum circuits 4a, 4b, ... that satisfy the constraint 2 by adding a swap gate to at least one of the first partial circuit and the second partial circuit that are branch destinations.

[0024] Next, the processing unit 12 acquires measurement results at the measurement point 1 a in multiple quantum computations performed according to second dynamic quantum circuits corresponding to some of the multiple allocation candidates 3 a, 3 b, .... Based on the measurement results, the processing unit 12 calculates, for each of the multiple allocation candidates 3 a, 3 b, ..., an index value that affects the fidelity when the quantum computation is performed according to the corresponding second dynamic quantum circuit 4 a, 4 b, ....

[0025] For example, the processing unit 12 calculates, as the index value, an expected value of the number of times the swap gate is executed when quantum computation is performed according to the second dynamic quantum circuits 4 a, 4 b, .... When the first dynamic quantum circuit 1 includes a conditional branch circuit, the processing unit 12 calculates the expected value based on the number of times the first partial circuit is executed and the number of times the second partial circuit is executed, for example, in accordance with the measurement results at the measurement point 1 a in multiple quantum computations performed according to the first dynamic quantum circuit.

[0026] The processing unit 12 then determines the allocation of second quantum bits to the multiple first quantum bits based on the index values ​​of each of the multiple allocation candidates 3 a, 3 b, .... For example, the processing unit 12 determines the allocation of second quantum bits to the multiple first quantum bits based on a first allocation candidate from among the multiple allocation candidates 3 a, 3 b, ... that has obtained an index value that provides higher fidelity than the index values ​​of the other allocation candidates.

[0027] By allocating quantum bits according to the allocation determined in this manner and generating a second dynamic quantum circuit according to that allocation, it is possible to cause a quantum computer to execute quantum computation with high fidelity based on the second dynamic quantum circuit, i.e., it is possible to improve the fidelity of quantum computation according to the dynamic quantum circuit.

[0028] For example, the processing unit 12 causes the quantum computer to perform quantum computation in accordance with the second dynamic quantum circuit corresponding to the determined allocation. The processing unit 12 then outputs the result of the quantum computation by the quantum computer as the computation result of the first dynamic quantum circuit 1. In this case, the number of times the swap gate is executed is kept low, so that the decrease in fidelity of the obtained computation result due to the execution of the swap gate is suppressed. In other words, the fidelity is improved compared to when other allocations are performed.

[0029] 1, a second dynamic quantum circuit 4a is generated according to the allocation indicated in the allocation candidate 3a with candidate number "#1." A second dynamic quantum circuit 4b is generated according to the allocation indicated in the allocation candidate 3b with candidate number "#2."

[0030] Compared to the first dynamic quantum circuit 1, the second dynamic quantum circuit 4a has one additional swap gate in the first partial circuit that is executed when the measurement result at the measurement point 1a is "1" (True), and one additional swap gate in the second partial circuit that is executed when the measurement result at the measurement point 1a is "0" (False).

[0031] Furthermore, compared to the first dynamic quantum circuit 1, the second dynamic quantum circuit 4b has six swap gates added to the first partial circuit that is executed when the measurement result at the measurement point 1a is "1" (True), and no swap gates added to the second partial circuit that is executed when the measurement result at the measurement point 1a is "0" (False).

[0032] In this case, it is assumed that the result of quantum computation based on the second dynamic quantum circuit corresponding to some of the allocation candidates, for example, the measurement result at measurement point 1a has a probability of being "1" (True) of "5%" and a probability of being "0" (False) of "95%". In this case, the expected value (index value) of the number of swap gates to be executed is "1 time" when allocation candidate 3a with candidate number "#1" is adopted. Also, when allocation candidate 3b with candidate number "#2" is adopted, it is "0.3 times".

[0033] If "0.3 times" is the minimum value among all the allocation candidates 3a, 3b, ..., it is determined that the allocation according to the allocation candidate 3b with candidate number "#2" is appropriate. If the second quantum bit is allocated to the first quantum bit according to the allocation candidate 3b, it is possible to generate a second dynamic quantum circuit 4b that satisfies constraint 2. If a quantum computer is caused to perform quantum computation based on the second dynamic quantum circuit 4b, the number of swap gates that are executed can be reduced, and high fidelity can be obtained.

[0034] In addition to conditional branch circuits, loop circuits are also used as circuits whose gate operations vary depending on the measurement results at the measurement point 1a. A loop circuit is a circuit that includes the measurement point 1a and repeatedly executes a series of gate operations depending on the measurement results at the measurement point 1a.

[0035] When the first dynamic quantum circuit 1 includes a loop circuit, the processing unit 12 generates second dynamic quantum circuits 4a, 4b, ... that satisfy constraint 2 by adding a swap gate to the loop circuit. Then, the processing unit 12 calculates, as an index value, an expected value of the number of executions of the swap gate when quantum computation is performed according to the second dynamic quantum circuits 4a, 4b, ..., based on the average number of iterations of the loop circuit. This makes it possible to correctly calculate the index value even when the first dynamic quantum circuit 1 includes a loop circuit.

[0036] The processing unit 12 may alternately execute the process of acquiring measurement results and the process of calculating index values ​​N times (N is a natural number). In this case, in the process of acquiring measurement results from the second time onwards, the processing unit 12 determines a first allocation candidate based on the index values ​​of each of the multiple allocation candidates 3 a, 3 b, ... calculated immediately before. Furthermore, the processing unit 12 acquires measurement results at the measurement point 1 a in multiple quantum computations performed according to the second dynamic quantum circuit corresponding to the first allocation candidate.

[0037] Then, the processing unit 12 determines the allocation of second quantum bits to multiple first quantum bits based on the index values ​​of each of the multiple allocation candidates 3a, 3b, ... calculated in the process of calculating the index value for the Nth time.

[0038] In this way, the processing unit 12 repeatedly executes the second dynamic quantum circuit multiple times and selects allocation candidates based on the execution results. This reduces the influence of statistical errors in the measurement results at the measurement point 1a due to the influence of noise. As a result, accurate index values ​​can be obtained, enabling appropriate allocation.

[0039] Second Embodiment The second embodiment is a quantum computing system that realizes quantum computing through high-fidelity gate operations by linking a classical computer and a quantum computer. Hereinafter, a quantum bit that is input as an object of quantum computing and is the object of operation in a dynamic quantum circuit will be referred to as an input quantum bit. The input quantum bit is an example of the first quantum bit shown in the first embodiment. Furthermore, a quantum bit realized by a quantum device possessed by a quantum computer will be referred to as a physical quantum bit. The physical quantum bit is an example of the second quantum bit shown in the first embodiment.

[0040] FIG. 2 is a diagram showing an example of the configuration of a quantum computing system. The quantum computing system 300 is a computer system using quantum devices. The quantum computing system 300 includes a classical computer 100 and a quantum computer 200. Terminal devices 401, 402, ... are connected to the classical computer 100 via a network 20. The terminal devices 401, 402, ... are computers used by users who request quantum computing by the quantum computing system 300. The classical computer 100 receives computation requests including quantum circuits from the terminal devices 401, 402, .... A quantum circuit indicates the order of operations on quantum bits by the arrangement of elements such as gates. A quantum bit is a bit that can represent a superposition of a "0" state and a "1" state.

[0041] The classical computer 100 instructs the quantum computer 200 to execute quantum computation in accordance with the quantum circuits received from the terminal devices 401, 402, .... The classical computer 100 also obtains the measurement results of each quantum bit from the quantum computer 200.

[0042] The quantum computer 200 has a plurality of quantum bits and devices for manipulating each of the plurality of quantum bits. The plurality of quantum bits of the quantum computer 200 can be realized by, for example, a superconducting system, an ion trap system, a diamond spin system, or the like.

[0043] 3 is a diagram showing an example of hardware of a device that constitutes a quantum computing system. A classical computer 100 is entirely controlled by a processor 101. A memory 102 and multiple peripheral devices are connected to the processor 101 via a bus 109. The processor 101 may be a multiprocessor. The processor 101 is, for example, a CPU (Central Processing Unit), an MPU (Micro Processing Unit), or a DSP (Digital Signal Processor). At least some of the functions realized by the processor 101 executing a program may be realized by an electronic circuit such as an ASIC (Application Specific Integrated Circuit) or a PLD (Programmable Logic Device).

[0044] The memory 102 is used as the main storage device of the classical computer 100. The memory 102 temporarily stores at least a portion of the OS (Operating System) program and application programs to be executed by the processor 101. The memory 102 also stores various data used in processing by the processor 101. As the memory 102, for example, a volatile semiconductor storage device such as a RAM (Random Access Memory) is used.

[0045] The peripheral devices connected to the bus 109 include a storage device 103, a GPU (Graphics Processing Unit) 104, an input interface 105, an optical drive device 106, a device connection interface 107, and network interfaces 108a and 108b.

[0046] The storage device 103 electrically or magnetically writes and reads data to and from a built-in recording medium. The storage device 103 is used as an auxiliary storage device for the classical computer 100. The storage device 103 stores the OS program, application programs, and various data. Note that the storage device 103 may be, for example, a hard disk drive (HDD) or a solid state drive (SSD).

[0047] The GPU 104 is an arithmetic unit that performs image processing. The GPU 104 is an example of a graphics controller. A monitor 21 is connected to the GPU 104. The GPU 104 displays an image on the screen of the monitor 21 in accordance with an instruction from the processor 101. The monitor 21 may be a display device using organic electroluminescence (EL) or a liquid crystal display device.

[0048] The input interface 105 is connected to a keyboard 22 and a mouse 23. The input interface 105 transmits signals sent from the keyboard 22 and the mouse 23 to the processor 101. The mouse 23 is an example of a pointing device, and other pointing devices can also be used. Examples of other pointing devices include a touch panel, a tablet, a touch pad, and a trackball.

[0049] The optical drive device 106 uses a laser beam or the like to read data recorded on an optical disc 24 or write data to the optical disc 24. The optical disc 24 is a portable recording medium on which data is recorded so that it can be read by reflected light. Examples of the optical disc 24 include a DVD (Digital Versatile Disc), a DVD-RAM, a CD-ROM (Compact Disc Read Only Memory), and a CD-R (Recordable) / RW (Rewritable).

[0050] The device connection interface 107 is a communication interface for connecting peripheral devices to the classical computer 100. For example, a memory device 25 or 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 function for communicating with the device connection interface 107. The memory reader / writer 26 is a device for writing data to a memory card 27 or reading data from the memory card 27. The memory card 27 is a card-type recording medium.

[0051] The network interface 108a is connected to the network 20. The network interface 108a transmits and receives data to and from other computers or communication devices via the network 20. The network interface 108a is a wired communication interface connected by a cable to a wired communication device such as a switch or a router. The network interface 108a may also be a wireless communication interface connected by radio waves to a wireless communication device such as a base station or an access point.

[0052] The network interface 108b is an interface for connecting to the quantum computer 200. The processor 101 transmits a quantum circuit to the quantum computer 200 via the network interface 108b and causes the quantum computer 200 to execute quantum computation. The processor 101 also obtains the result of the quantum computation via the network interface 108b.

[0053] The classical computer 100 can realize the processing functions of the second embodiment with the hardware described above. The device shown in the first embodiment can also be realized with hardware similar to the classical computer 100 shown in FIG.

[0054] The classical computer 100 realizes the processing functions of the second embodiment by executing a program recorded on, for example, a computer-readable recording medium. 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 storage device 103. The processor 101 loads at least a portion of the program in the storage device 103 into the memory 102 and executes the program. The program to be executed by the classical computer 100 can also be recorded on a portable recording medium such as the optical disk 24, the memory device 25, or the memory card 27. The program stored on the portable recording medium becomes executable after being installed on the storage device 103, for example, under the control of the processor 101. The processor 101 can also read and execute the program directly from the portable recording medium.

[0055] The quantum computer 200 includes a control device 210 and a quantum device 220. The control device 210 performs gate operations on quantum bits in the quantum device according to a quantum circuit. The quantum device 220 includes multiple quantum bits. The quantum device 220 may be, for example, one or multiple quantum processing units (QPUs).

[0056] Next, a quantum circuit that can be executed by the quantum computer 200 will be described. In a quantum circuit, operations to be performed on quantum bits are represented by an array of quantum gates. FIG. 4 is a diagram showing an example of a quantum circuit. Unlike classical bits that can only be in the state "0" or "1," quantum bits 30 can be in a superposition state |ψ> of "0" and "1." The superposition state |ψ> is expressed by the following equation.

[0057]

[0058] α is a probability amplitude that indicates the probability that the state of the quantum bit 30 is |0>. |α| 2 is the probability of the state |0>. β is the probability amplitude that indicates the probability that the state of the quantum bit 30 is |1>. |β|2 is the probability of state |1>.

[0059] Quantum computation proceeds by changing the state of the quantum bit 30. When the state of the quantum bit 30 is measured, a value of |0> or |1> is probabilistically obtained depending on the state. Therefore, the quantum computer 200 obtains the quantum computation result by statistically processing the measurement results obtained by repeatedly performing quantum computation.

[0060] The procedure of gate operations and measurements in quantum computing can be modeled using a quantum circuit 31. The quantum circuit 31 represents quantum computing using two quantum bits q0 and q1. The states of the two quantum bits can be expressed by a column vector. For example, assume that the initial states of the two quantum bits are both |0>. In that case, the state of the quantum bits is expressed by equation (2).

[0061]

[0062] The first element of equation (2) is the probability amplitude that the two quantum bits are both in |0> state. The second element is the probability amplitude that the first quantum bit is in |0> state and the second quantum bit is in |1> state. The third element is the probability amplitude that the first quantum bit is in |1> state and the second quantum bit is in |0> state. The fourth element is the probability amplitude that the two quantum bits are both in |1> state.

[0063] In the quantum circuit 31, a Hadamard gate (H) is placed on the first quantum bit. When the gate operation of this Hadamard gate is performed, the states of the two quantum bits change as shown in equation (3).

[0064]

[0065] An X gate (X) is placed at the second quantum bit in the quantum circuit 31. When the gate operation of this X gate is performed, the states of the two quantum bits change as shown in equation (4).

[0066]

[0067] In the quantum circuit 31, a T gate (T) is placed on the first quantum bit, and a Hadamard gate (H) is placed on the second quantum bit. When these gates are operated, the states of the two quantum bits change as shown in equation (5).

[0068]

[0069] Finally, the quantum circuit 31 shows the operation of measuring the states of the two quantum bits. The measurement result of the quantum bit states is probabilistically either |0> or |1>. The measurement result is stored as "0" or "1" in the classical bits c0 and c1. The quantum computer 200 repeats quantum calculations and measurements based on the quantum circuit 31 many times to obtain |α| 2 and |β| 2 Estimate the value of .

[0070] Quantum circuits include dynamic quantum circuits that dynamically change according to the state of classical bits at the time of execution. Dynamic quantum circuits include conditional branch circuits or loop circuits. FIG. 5 is a diagram showing an example of a dynamic quantum circuit including a conditional branch circuit. The dynamic quantum circuit 32 includes a conditional branch circuit 32a. The conditional branch instruction (If-else) used in the conditional branch circuit 32a is an instruction to select a group of quantum gates to be applied according to a condition f related to classical bits. For example, the set of all states of L classical bits (L is a natural number) can be defined as C={0, 1} L Then, the condition f is expressed as "f: C → bool." "Bool" indicates that the value is either true or false.

[0071] In the conditional branch circuit 32a shown in FIG. 5, if "f(c1, c2) = True", the quantum gate group "U T If "f(c1, c2) = False", the quantum gate group "U F " is executed.

[0072] FIG. 6 is a diagram showing an example of a dynamic quantum circuit including a loop circuit. The dynamic quantum circuit 33 includes a loop circuit 33a. The loop instruction (while-loop) used in the loop circuit 33a is an instruction that determines whether to repeatedly apply a quantum gate or to exit the loop, depending on the state of the classical bit. For example, in the loop circuit 33a shown in FIG. 6, the gate operation within the loop circuit 33a is repeated while the value of "f(c1, c2)" is a predetermined value.

[0073] It is also possible for conditional branch circuits and loop circuits to be nested (multi-level structure). That is, a branch destination of a conditional branch circuit may include another conditional branch circuit or a loop circuit. Also, a loop circuit may include a conditional branch circuit or another loop circuit.

[0074] In addition, the types of quantum gates (native gates) that can be executed by the quantum computer 200 are limited. Therefore, gates in a quantum circuit generated in response to a problem to be solved can be executed by converting them into native gates of the quantum computer 200.

[0075] 7 is a diagram showing an example of conversion to native gates. For example, a CCX gate 40 is decomposed into multiple native gates and converted into an equivalent circuit 41. The one-qubit gate and two-qubit gate included in the equivalent circuit 41 are native gates in the quantum computer 200.

[0076] Even if a quantum circuit is composed only of native gates, it is not necessarily possible to execute the quantum circuit as is due to hardware constraints (real-world constraints) of the quantum computer 200. That is, some quantum gates can only be executed with specific quantum bits. For example, the gate operation of a two-qubit gate can only be executed with a pair of quantum bits that are connected to each other.

[0077] The constraints for making the quantum circuit executable on the quantum computer 200 are that the quantum gates included in the quantum circuit are native gates and that the physical quantum bits in the actual device that are the targets of operation of the quantum gates satisfy the actual device constraints.

[0078] In the case of a simple quantum circuit, the constraints of the actual device can be satisfied by assigning an appropriate physical quantum bit to each input quantum bit as the physical quantum bit that performs the gate operation on the input quantum bit shown in the quantum circuit.

[0079] FIG. 8 is a diagram showing an example of quantum bit allocation according to actual machine constraints. For example, the actual machine constraints are represented by an effective graph 42. The nodes in the effective graph 42 correspond to physical quantum bits, and the arrows connecting the nodes indicate pairs of physical quantum bits on which a CNOT gate operation can be performed. The origin of the arrow is the control bit, and the tip of the arrow is the target bit. The effective graph 42 shows that a CNOT gate operation is possible with physical quantum bit Q1 as the control bit and physical quantum bit Q0 as the target bit. The effective graph 42 also shows that a CNOT gate operation is possible with physical quantum bit Q1 as the control bit and physical quantum bit Q2 as the target bit. A CNOT gate operation cannot be performed between any other physical quantum bits.

[0080] Assume that quantum circuit 43 is executed under such constraints of the actual device. Three input quantum bits q, q, and q are shown in quantum circuit 43. The first quantum gate is a CNOT gate with input quantum bit q as the control bit and input quantum bit q as the target bit. The second quantum gate is a CNOT gate with input quantum bit q as the control bit and input quantum bit q as the target bit.

[0081] In this case, quantum circuit 43 can be implemented by assigning physical quantum bit Q1 to input quantum bit q0, assigning physical quantum bit Q0 to input quantum bit q1, and assigning physical quantum bit Q2 to input quantum bit q2.

[0082] Since the quantum circuits corresponding to the problem to be solved are complex, and the initial allocation of qubits alone often does not satisfy the constraints of the actual device, appropriate qubit allocation is performed for each step of the gate operation according to the quantum circuit.

[0083] 9 is a diagram showing an example of changing the allocation of quantum bits within a quantum circuit. For example, assume that quantum circuit 44 is executed under the constraints shown in directed graph 42. Quantum circuit 44 has one quantum gate 44a added to quantum circuit 43 shown in FIG. 8. The added quantum gate 44a is a CNOT gate with input quantum bit q1 as the control bit and input quantum bit q2 as the target bit. In this case, even if the same quantum bit allocation as in FIG. 8 is performed, the added quantum gate cannot be executed due to limitations of the actual device.

[0084] Therefore, quantum circuit 44 is converted into equivalent circuit 45, which involves changing the allocation of quantum bits. A swap gate 45a is added to equivalent circuit 45 to change the physical quantum bits allocated to input quantum bits. By using swap gate 45a to change the allocation of quantum bits midway through equivalent circuit 45, equivalent circuit 45 can be executed.

[0085] Changing the allocation of quantum bits is called routing. Hereinafter, quantum bit allocation will include both the initial allocation of quantum bits and routing. When there are multiple quantum circuits that can be generated by routing and satisfy the constraints of the actual device, it is desirable to generate a quantum circuit with as few quantum gates as possible. In other words, current quantum computers are called NISQ (Noisy Intermediate-Scale Quantum) computers, and are significantly affected by noise. Noise is a factor that reduces fidelity.

[0086] Therefore, qubits are allocated in a way that increases the fidelity of the entire circuit. For example, simply inserting a swap gate increases the number of gates, and the overall fidelity decreases due to the effects of noise. Therefore, it is necessary to find ways to reduce the number of swap gates. In addition, to improve fidelity, for example, the effects of noise on each qubit gate are accumulated, and the qubit allocation with the least effect is selected. Furthermore, since the gate execution time differs for each qubit, it is also possible to allocate them in a way that shortens the execution time of the quantum circuit.

[0087] Here, a function whose value is expected to increase the overall fidelity when minimized is called an “objective function.” The value of the objective function is an example of the index value described in the first embodiment.

[0088] Variables used to calculate the objective function include the number of swap gates, the integrated value of the noise effect per gate, and execution time. For static quantum circuits, high-fidelity calculation results can be obtained by selecting the quantum circuit that minimizes the objective function from multiple quantum circuits equivalent to the quantum circuit and satisfying the real-world constraints, and using that quantum circuit for actual quantum computing. On the other hand, for dynamic quantum circuits, it is not easy to identify the quantum circuit that minimizes the objective function.

[0089] The following examples are possible methods for estimating the value of the objective function in a dynamic quantum circuit. For example, the classical computer 100 may add up the objective function values ​​of each branch in an if-else case, or may expand the circuit assuming that only one branch will be selected, and calculate the value of the objective function by treating it as a static circuit. Furthermore, the classical computer 100 may expand the circuit assuming that the loop is a fixed number of k times (k is a natural number) and calculate the value of the objective function by treating it as a static circuit.

[0090] However, such static analysis cannot take into account parameters that are only known at runtime (dynamic parameters), such as the branch probability of each if-else branch or the number of loops. As a result, the estimated value of the objective function obtained by calculation will diverge from the value of the objective function when actually executed. If the value of the objective function is inaccurate, it will be executed using an inappropriate quantum circuit, reducing fidelity.

[0091] Therefore, in the second embodiment, when multiple quantum bit allocations are given to a dynamic quantum circuit, the classical computer 100 allocates quantum bits in a way that minimizes the expected value of the objective function when actually executed on the NISQ quantum computer 200. Note that the classical computer 100 selects such allocations in a feedback-directed manner (based on the results of actual quantum computation).

[0092] For example, the classical computer 100 actually executes a dynamic circuit and obtains statistical data on the probability that each branch destination of a conditional branch is selected and the number of loops. The classical computer 100 estimates the expected value of the objective function from the obtained data. The classical computer 100 then selects the allocation that minimizes the expected value.

[0093] This allows parameters that are only known at run time to be taken into account, and reduces the discrepancy between the estimated value of the objective function and the value of the objective function when actually run. Furthermore, the classical computer 100 may repeatedly execute the above operations (N times) to reduce the influence of noise and more accurately calculate the estimated value of the objective function. By repeatedly executing the operations, the value of the objective function can be estimated more accurately, and a more appropriate allocation can be selected.

[0094] The classical computer 100 sets the number of iterations N to a value smaller than the number of allocation candidates M (M is a natural number). This reduces the number of executions on the actual machine to N / M times the number required when all allocation candidates (M) are executed on the actual machine to obtain the value of the objective function.

[0095] 10 is a diagram illustrating an example of functions for quantum computation in a classical computer. The classical computer 100 includes a storage unit 110, a computation request receiving unit 120, a circuit conversion unit 130, a dynamic parameter initial value determination unit 140, an assignment candidate selection unit 150, a dynamic parameter acquisition unit 160, and a computation control unit 170.

[0096] The storage unit 110 stores topology information 111, an objective function definition 112, a dynamic quantum circuit 113, an allocation candidate set 114, and an executable quantum circuit set 115. The topology information 111 is information indicating the connection relationship between physical quantum bits. The objective function definition 112 is information indicating a method for calculating the value of the objective function. The dynamic quantum circuit 113 is a dynamic quantum circuit designated as a target for quantum computation. The allocation candidate set 114 is information indicating multiple allocation candidates between input quantum bits and physical quantum bits. The executable quantum circuit set 115 is a set of dynamic quantum circuits that have been assigned quantum bits and are executable on the quantum computer 200.

[0097] The computation request receiving unit 120 receives a computation request for the dynamic quantum circuit 113 from the terminal device 401. The computation request receiving unit 120 stores the dynamic quantum circuit 113 included in the received computation request in the storage unit 110. Furthermore, when the computation request receiving unit 120 obtains a computation result of the quantum computation from the computation control unit 170, it transmits the computation result to the terminal device 401.

[0098] The circuit conversion unit 130 generates multiple candidates for allocating physical qubits that satisfy the actual machine constraints to input qubits to be operated on by the dynamic quantum circuit 113 indicated in the calculation request. The circuit conversion unit 130 stores the multiple allocation candidates thus generated in the storage unit 110 as an allocation candidate set 114.

[0099] Furthermore, the circuit conversion unit 130 converts the dynamic quantum circuit 113 into a quantum circuit (executable quantum circuit) that can be executed on the quantum computer 200 based on each of the generated allocation candidates. The executable quantum circuit is composed of native gates (one-qubit gates or two-qubit gates) of the quantum computer 200. The two-qubit gate included in the executable quantum circuit satisfies the actual machine constraints indicated in the topology information 111 for the physical qubits assigned to the input qubits to be operated on. The circuit conversion unit 130 stores the generated executable quantum circuits in the storage unit 110 as an executable quantum circuit set 115.

[0100] The dynamic parameter initial value determination unit 140 determines the initial values ​​of dynamic parameters used in calculating the value of the objective function for the dynamic quantum circuit 113. Dynamic parameters are parameters whose values ​​are determined by executing the dynamic quantum circuit 113. Dynamic parameters include the transition probability to each branch destination in a conditional branch. Dynamic parameters also include the number of loops in a loop process.

[0101] The allocation candidate selection unit 150 selects a quantum bit allocation candidate according to the value of the dynamic parameter each time the dynamic parameter is initialized or updated. For example, the allocation candidate selection unit 150 calculates the value of the objective function of the executable quantum circuit corresponding to each quantum bit allocation candidate based on the value of the dynamic parameter. The allocation candidate selection unit 150 then selects the allocation candidate that minimizes the value of the objective function. When the dynamic parameter value has been updated a predetermined number of times, the allocation candidate selection unit 150 notifies the calculation control unit 170 of the last selected allocation candidate.

[0102] The dynamic parameter acquisition unit 160 acquires dynamic parameter values ​​based on the calculation results of quantum computation according to the executable quantum circuit corresponding to the selected allocation candidate. For example, the dynamic parameter acquisition unit 160 instructs the quantum computer 200 to perform quantum computation according to the executable quantum circuit corresponding to the selected allocation candidate. The quantum computer 200 then repeatedly executes the quantum computation a predetermined number of times. The dynamic parameter acquisition unit 160 acquires an execution path for each quantum computation from the quantum computer 200. The execution information includes information indicating the branch destination of a conditional branch circuit and the number of loops of a loop circuit. The dynamic parameter acquisition unit 160 statistically calculates the branch probability and the expected value of the number of loops based on the execution path for each quantum computation.

[0103] The computation control unit 170 acquires the computation result of the quantum computation according to the executable quantum circuit corresponding to the allocation candidate last selected by the allocation candidate selection unit 150, and transmits it to the computation request reception unit 120. For example, the computation control unit 170 instructs the quantum computer 200 to perform quantum computation according to the executable quantum circuit. The quantum computer 200 then executes the quantum computation and returns the computation result. The computation control unit 170 transmits the computation result acquired from the quantum computer 200 to the computation request reception unit 120.

[0104] 10 can be realized by, for example, having the processor 101 execute a program module corresponding to that element. Of the information stored in the storage unit 110, the topology information 111 and the objective function definition 112 are information prepared by an administrator before the dynamic quantum circuit 113 executes quantum computation.

[0105] Fig. 11 is a diagram showing an example of topology information. The topology information 111 is represented by a directed graph 111a in which physical quantum bits are nodes and the relationships between the physical quantum bits connected within the quantum device are indicated by arrows (edges). The topology information 111 in Fig. 11 shows the relationships between six physical quantum bits Q0 to Q5. The structure of the directed graph 111a is as follows:

[0106] An edge is provided with physical quantum bit Q0 as the source and physical quantum bit Q1 as the destination. An edge is provided with physical quantum bit Q0 as the source and physical quantum bit Q2 as the destination. An edge is provided with physical quantum bit Q0 as the source and physical quantum bit Q3 as the destination. An edge is provided with physical quantum bit Q3 as the source and physical quantum bit Q4 as the destination. An edge is provided with physical quantum bit Q4 as the source and physical quantum bit Q5 as the destination.

[0107] 12 is a diagram showing an example of an objective function definition. An objective function definition 112 shows a method for calculating the value of the objective function. In the example of FIG. 12, the value of the objective function is the expected number of times the swap gate is executed when the dynamic quantum circuit is executed.

[0108] Therefore, the objective function definition 112 defines a calculation method for the expected number of swap gate executions in a dynamic subcircuit, for example, for each type of dynamic subcircuit. For example, the calculation method for the expected number of swap gate executions in a conditional branch is "True probability × number of swap gates at the True branch destination + False probability × number of swap gates at the False branch destination." Also, the calculation method for the expected number of swap gate executions in a loop is "expected number of loops × number of swap gates in the loop."

[0109] The objective function definition 112 indicates that the value of the objective function is "the value of the objective function = the sum of the expected number of swap gate executions for each dynamic subcircuit." Based on this objective function definition 112, the value of the objective function (the expected number of swap gate executions) of an executable quantum circuit can be calculated.

[0110] After the topology information 111 and the objective function definition 112 are prepared, when a computation request is sent to the quantum computing system 300 from, for example, the terminal device 401, quantum computation is executed in the quantum computing system 300. The computation request includes the quantum circuit to be computed.

[0111] 13 is a flowchart showing an example of a processing procedure for quantum computation. The processing shown in FIG. 13 will be described below in order of step number. [Step S101] The computation request receiving unit 120 receives a quantum computation request from one of the terminal devices 401, 402, .... The received computation request includes the dynamic quantum circuit 113 as the computation target. The computation request receiving unit 120 stores the dynamic quantum circuit 113 included in the received computation request in the storage unit 110.

[0112] [Step S102] The circuit conversion unit 130 generates a candidate set 114 of allocations of physical quantum bits to input quantum bits indicated in the dynamic quantum circuit 113. The allocation candidates are a list of physical quantum bits corresponding to each input quantum bit. The circuit conversion unit 130 also generates an equivalent circuit (feasible quantum circuit) of the dynamic quantum circuit 113 in association with each allocation candidate, which satisfies the actual machine constraints when the allocation indicated in the allocation candidate is made. The circuit conversion unit 130 stores in the storage unit 110 the allocation candidate set 114 including multiple allocation candidates and a feasible quantum circuit set 115 including feasible quantum circuits corresponding to each allocation candidate.

[0113] [Step S103] The dynamic parameter initial value determination unit 140, the allocation candidate selection unit 150, and the dynamic parameter acquisition unit 160 work together to perform allocation determination processing, which will be described in detail later (see FIG. 21).

[0114] [Step S104] The calculation control unit 170 controls the execution of quantum calculation according to the executable quantum circuit. For example, the calculation control unit 170 instructs the quantum computer 200 to execute quantum calculation according to the executable quantum circuit. At that time, the calculation control unit 170 specifies the allocation of physical quantum bits to input quantum bits in the executable quantum circuit.

[0115] Note that the number of times the quantum computation is performed by the computation control unit 170 to obtain the final computation result does not have to be the same as the number of times the quantum computation is performed to determine the allocation. For example, the allocation candidate selector 150 performs the allocation determination process 1000 times (number of shots n=1000) to obtain statistical data. After determining the allocation, the computation control unit 170 performs the quantum computation 100,000 times to obtain a highly accurate computation result.

[0116] In response to the instruction, the quantum computer 200 executes quantum computation according to the executable quantum circuit. The quantum computer 200 then transmits the computation result to the computation control unit 170. The computation control unit 170 transmits the acquired computation result to the computation request receiving unit 120.

[0117] [Step S105] The computation request receiving unit 120 transmits the computation result acquired from the computation control unit 170 to the terminal device that sent the computation request as the computation result of the dynamic quantum circuit 113. In this way, quantum bits are appropriately assigned to the dynamic quantum circuit 113 that is the computation target, and quantum computation is performed.

[0118] 14 is a diagram showing an example of a dynamic quantum circuit to be calculated. For example, the dynamic quantum circuit 113 includes a conditional branching circuit 113a. The conditional branching circuit 113a executes different subcircuits depending on whether the measurement result set in the classical bit c by the immediately preceding measurement is "1" or not. For example, if the value of the classical bit c is "1", the subcircuit 113b is executed, and if the value of the classical bit c is "0", the subcircuit 113c is executed.

[0119] Upon acquiring such a dynamic quantum circuit 113, the computation request receiving unit 120 generates an allocation candidate set 114 corresponding to the dynamic quantum circuit 113. Fig. 15 is a diagram showing an example of the allocation candidate set. The allocation candidate set 114 includes a plurality of allocation candidates 114a, 114b, .... Each of the allocation candidates 114a, 114b, ... is assigned a candidate number for identification. Each of the allocation candidates 114a, 114b, ... indicates a correspondence between an input quantum bit indicated in the dynamic quantum circuit 113 and a physical quantum bit to be assigned to that input quantum bit.

[0120] A feasible quantum circuit that satisfies the real machine constraints is generated according to each of the allocation candidates 114a, 114b, .... Fig. 16 is a diagram showing a first example of a feasible quantum circuit. Fig. 16 shows a feasible quantum circuit 115a corresponding to the allocation candidate 114a with candidate number "#1". The allocation relationship in the allocation candidate 114a is as follows:

[0121] Input quantum bit q0 is assigned to physical quantum bit Q0. Input quantum bit q1 is assigned to physical quantum bit Q1. Input quantum bit q2 is assigned to physical quantum bit Q2. Input quantum bit q3 is assigned to physical quantum bit Q3. Input quantum bit q4 is assigned to physical quantum bit Q4. Input quantum bit q5 is assigned to physical quantum bit Q5.

[0122] The executable quantum circuit 115a is an equivalent circuit of the dynamic quantum circuit 113 (see FIG. 14). In the executable quantum circuit 115a, the conditional branching circuit 113a in the dynamic quantum circuit 113 is converted into a conditional branching circuit 115a-1 that satisfies the real machine constraints.

[0123] In the converted conditional branching circuit 115a-1, one swap gate has been added to the partial circuit 115a-2 that is executed when the branching condition is True. With the addition of the swap gate, the allocation destination of the physical quantum bit Q0 has changed from the input quantum bit q0 to the input quantum bit q3. Furthermore, the allocation destination of the physical quantum bit Q3 has changed from the input quantum bit q3 to the input quantum bit q0.

[0124] Furthermore, one swap gate has also been added to the partial circuit 115a-3 that is executed when the branch condition is False. With the addition of the swap gate, the allocation destination of the physical quantum bit Q0 has been changed from the input quantum bit q0 to the input quantum bit q3. Furthermore, the allocation destination of the physical quantum bit Q3 has been changed from the input quantum bit q3 to the input quantum bit q0.

[0125] 17 is a diagram showing a second example of an executable quantum circuit. In FIG. 17, an executable quantum circuit 115b corresponding to the allocation candidate 114b with candidate number "#2" is shown. The allocation relationship in the allocation candidate 114b is as follows:

[0126] Physical quantum bit Q0 is assigned to input quantum bit q0. Physical quantum bit Q1 is assigned to input quantum bit q1. Physical quantum bit Q2 is assigned to input quantum bit q2. Physical quantum bit Q5 is assigned to input quantum bit q3. Physical quantum bit Q3 is assigned to input quantum bit q4. Physical quantum bit Q4 is assigned to input quantum bit q5.

[0127] The executable quantum circuit 115b is an equivalent circuit of the dynamic quantum circuit 113 (see FIG. 14). In the executable quantum circuit 115b, the conditional branching circuit 113a in the dynamic quantum circuit 113 is converted into a conditional branching circuit 115b-1 that satisfies the real machine constraints.

[0128] In the converted conditional branching circuit 115b-1, six swap gates have been added to the partial circuit 115b-2 that is executed when the branching condition is True. With the addition of the first three swap gates in the partial circuit 115b-2, the allocation destination of the physical quantum bit Q0 has been changed from input quantum bit q0 to input quantum bit q3. The allocation destination of the physical quantum bit Q5 has been changed from input quantum bit q3 to input quantum bit q5. The allocation destination of the physical quantum bit Q3 has been changed from input quantum bit q4 to input quantum bit q0. The allocation destination of the physical quantum bit Q4 has been changed from input quantum bit q5 to input quantum bit q4.

[0129] Furthermore, by adding the latter three swap gates to the partial circuit 115b-2, the allocation destinations of the physical quantum bits Q0 to Q5 are returned to the allocations shown in the allocation candidates 114b.

[0130] No swap gates are added to the partial circuit 115b-3 that is executed when the branch condition is False. Two swap gates are added to the executable quantum circuit 115a shown in FIG. 16, whereas six swap gates are added to the executable quantum circuit 115b shown in FIG. 17. Therefore, if an executable quantum circuit with a smaller number of swap gates is simply selected, the executable quantum circuit 115a will be selected. However, the number of swap gates that are executed when the executable quantum circuits 115a and 115b are executed depends on the branch probability to the branch destination of the conditional branch circuits 115a-1 and 115b-1. Therefore, simply selecting an executable quantum circuit with a smaller number of swap gates does not necessarily result in a smaller number of quantum gates being executed when actually executed.

[0131] Therefore, in order to grasp the branch probability, the classical computer 100 executes quantum computation using one of the executable quantum circuits. For example, the classical computer 100 sets an initial value of the branch probability, and when the branch destination partial circuit is executed with that branch probability, it executes quantum computation using the executable quantum circuit with the fewest number of swap gates to be executed.

[0132] For example, the classical computer 100 sets the initial values ​​of the branch probabilities to each branch destination in the conditional branch circuits 115a-1 and 115b-1 to "True: 50%" and "False: 50%." The classical computer 100 calculates the values ​​of the objective function (the expected value of the number of swap gates to be executed) for such branch probabilities for all feasible quantum circuits. The classical computer 100 then selects the feasible quantum circuit with the smallest value of the objective function as the target for execution.

[0133] 18 is a diagram showing a first example of executable quantum circuit selection according to branch probabilities. When the branch probabilities are "True: 50%" and "False: 50%", the value of the objective function of the executable quantum circuit 115a corresponding to the allocation candidate 114a with candidate number "#1" is "1" (0.5×1 + 0.5×1). Also, the value of the objective function of the executable quantum circuit 115b corresponding to the allocation candidate 114b with candidate number "#2" is "3" (0.5×6 + 0.5×0).

[0134] Similarly, the objective function values ​​are calculated for all other allocation candidates. The allocation candidate with the smallest objective function value is then selected. If the objective function value of any allocation candidate other than the allocation candidates 114a and 114b shown in FIG. 18 is greater than "1," the allocation candidate 114a with candidate number "#1" is selected.

[0135] Then, quantum computation according to the executable quantum circuit 115a corresponding to the selected allocation candidate 114a is executed a predetermined number of times. Fig. 19 is a diagram showing an example of the execution result of the executable quantum circuit corresponding to the selected allocation candidate. In the example of Fig. 19, it is assumed that quantum computation based on the executable quantum circuit 115a is executed 1000 times, and the judgment results of the conditional branch are "True: 50 times" and "False: 950 times".

[0136] Based on the results of the quantum computation of the executable quantum circuit 115a, the branch probability for each branch destination of the conditional branch is calculated. The results are "True: 5%" and "False: 95%". FIG. 20 is a diagram showing a second example of executable quantum circuit selection according to branch probability. When the branch probabilities are "True: 5%" and "False: 95%", the value of the objective function of the executable quantum circuit 115a corresponding to the allocation candidate 114a with candidate number "#1" is "1" (0.05×1 + 0.95×1). Furthermore, the value of the objective function of the executable quantum circuit 115b corresponding to the allocation candidate 114b with candidate number "#2" is "0.3" (0.05×6 + 0.95×0).

[0137] Similarly, the objective function values ​​are calculated for all other allocation candidates. The allocation candidate with the smallest objective function value is then selected. If the objective function values ​​of the allocation candidates other than the allocation candidates 114a and 114b shown in FIG. 18 are greater than "0.3", the allocation candidate 114b with candidate number "#2" is selected.

[0138] In this way, the value of the objective function (the expected number of executions of the swap gate) is estimated, and the allocation candidate that minimizes the value of the objective function is reselected. By repeating the reselection of allocation candidates and the execution of the executable quantum circuit corresponding to the selected allocation candidate, an appropriate allocation can finally be determined.

[0139] 21 is a flowchart showing an example of the procedure for the allocation determination process. The process shown in FIG. 21 will be described below in order of step number. [Step S201] The dynamic parameter initial value determination unit 140 acquires the dynamic quantum circuit 113 from the storage unit 110.

[0140] [Step S202] The dynamic parameter initial value determination unit 140 sets initial values ​​for dynamic parameters. For example, for conditional branching, the dynamic parameter initial value determination unit 140 sets the branch probability to each branch destination equally. The dynamic parameter initial value determination unit 140 also sets the number of loops for loop processing to a pre-specified value.

[0141] [Step S203] The allocation candidate selection unit 150 sets the value of the number of repetitions N for dynamic parameter update. For example, the candidate selection unit 150 sets the number of repetitions N to a predetermined value.

[0142] [Step S204] The allocation candidate selection unit 150 sets the value of the number of shots n. The number of shots is the number of times the feasible quantum circuit is executed to obtain statistical values ​​of the dynamic parameters. For example, the allocation candidate selection unit 150 sets the number of shots n to a preset value.

[0143] [Step S205] The allocation candidate selection unit 150 sets the variable i to "0." [Step S206] The allocation candidate selection unit 150 acquires the allocation candidate set 114 and the objective function definition 112 from the storage unit 110. The number of allocation candidates included in the allocation candidate set 114 is defined as M.

[0144] [Step S207] The allocation candidate selection unit 150 calculates the value of the objective function (expected number of times the swap gate is executed) for each of the M allocation candidates based on the dynamic parameters.

[0145] [Step S208] The allocation candidate selection unit 150 sets m to the candidate number of the allocation candidate that minimizes the value of the objective function. [Step S209] The allocation candidate selection unit 150 determines whether the value of variable i is smaller than the number of iterations N (i<N?). If i is less than N, the allocation candidate selection unit 150 proceeds to step S210. If i is greater than or equal to N, the allocation candidate selection unit 150 proceeds to step S213.

[0146] [Step S210] The dynamic parameter acquisition unit 160 assigns quantum bits according to the assignment candidate with candidate number m, and then executes n quantum computations according to the executable quantum circuit corresponding to the assignment candidate. For example, the dynamic parameter acquisition unit 160 transmits the executable quantum circuit to the quantum computer 200 and instructs it to perform n quantum computations according to the executable quantum circuit.

[0147] The quantum computer 200 executes quantum computation according to a specified executable quantum circuit. At that time, the quantum computer 200 stores information indicating the execution path for each quantum computation in memory. The information indicating the execution path includes the branch destination of a conditional branch and the number of loops in a loop process. Note that the information indicating the branch destination of a conditional branch may be a measurement result that is a branch condition. Similarly, the information indicating the number of loops may be a measurement result that is a determination condition for whether or not to continue the loop. The dynamic parameter acquisition unit 160 acquires information about the execution path from the quantum computer 200.

[0148] [Step S211] The dynamic parameter acquisition unit 160 performs statistical processing on the execution paths of each of n quantum computations to calculate the value of a dynamic parameter. For example, the dynamic parameter acquisition unit 160 determines the branch probability of "True" by dividing the number of times the determination in a conditional branch is "True" by n. The dynamic parameter acquisition unit 160 also determines the branch probability of "False" by dividing the number of times the determination in a conditional branch is "False" by n. For loop processing, the dynamic parameter acquisition unit 160 determines the value of the dynamic parameter related to the number of loops, for example, by the average number of loops per quantum computation.

[0149] [Step S212] The dynamic parameter acquisition unit 160 adds 1 to the variable i (i = i + 1) and proceeds to step S207. [Step S213] The allocation candidate selection unit 150 outputs execution quantum circuit information based on the allocation candidate m. For example, the candidate selection unit 150 transmits the execution quantum circuit information to the calculation control unit 170. The execution quantum circuit information includes the allocation of quantum bits indicated in the allocation candidate m and the dynamic quantum circuit that can be executed at the time of the allocation.

[0150] 22 is a diagram showing an example of executable quantum circuit information. The executable quantum circuit information 50 includes allocation information 51 and a dynamic quantum circuit 52. The allocation information 51 indicates the same quantum bit allocation relationship as the allocation candidate m that minimizes the value of the objective function according to the last updated dynamic parameter values. The dynamic quantum circuit 52 is the same quantum circuit as the executable quantum circuit that minimizes the value of the objective function according to the last updated dynamic parameter values.

[0151] The calculation control unit 170 executes quantum calculation using the quantum computer 200 based on the execution quantum circuit information 50. For example, the calculation control unit 170 instructs the quantum computer 200 to perform quantum calculation according to the dynamic quantum circuit 52. At that time, the calculation control unit 170 instructs the quantum computer 200 to assign physical quantum bits indicated in the assignment information 51 to input quantum bits in the dynamic quantum circuit 52. The quantum calculation is then executed by the quantum computer 200, and the calculation result is returned to the calculation control unit 170.

[0152] The calculation results are transmitted to the terminal device that sent the calculation request via the calculation request receiving unit 120. By determining the allocation of quantum bits in this manner, the number of executions on the actual machine can be reduced by N / |M| times compared to a method of running all executable quantum circuits and selecting the best one. Moreover, because the dynamic parameters are updated N times, the influence of noise can be reduced, allowing for more accurate calculation of the estimated value of the objective function. Furthermore, the larger the number M of allocation candidates, the more efficient the allocation determination using the procedure shown in FIG. 21 becomes.

[0153] Although the dynamic quantum circuit 113 shown in FIG. 14 does not include a loop process, even if a loop process is included, it is possible to realize an allocation that can minimize the fidelity in the same way.

[0154] 23 is a diagram showing an example of a dynamic quantum circuit including loop processing. The dynamic quantum circuit 60 includes a conditional branching circuit 61, a loop circuit 62, and a conditional branching circuit 63. The number of input quantum bits operated by the dynamic quantum circuit 60 is six. Here, it is assumed that allocation has been performed according to the allocation candidate 114a shown in FIG. 15.

[0155] 24 is a diagram showing an example of the value of the objective function obtained by executing an executable quantum circuit including a loop process. In the first conditional branch circuit 71, six swap gates are added to the partial circuit that is executed when the result is "True." Two swap gates are added to the loop circuit 72. In the second conditional branch circuit 73, four swap gates are added to the partial circuit that is executed when the result is "True," and two swap gates are added to the partial circuit that is executed when the result is "False."

[0156] When quantum computation according to this executable quantum circuit 70 is executed 1000 times, the first conditional branch circuit 71 judges "True" 50 times and judges "False" 950 times. In addition, the loop circuit 72 loops 0 times 860 times, loops 1 time 120 times, and loops 2 times 20 times. In the second conditional branch circuit 73, the second conditional branch circuit 73 judges "True" 940 times and judges "False" 60 times.

[0157] In this case, the branch probability of "True" for the first conditional branching circuit 71 is "0.05", and the branch probability of "False" is "0.95". The expected value of the number of loops per quantum computation for the loop circuit 72 is "0.16 times" (0x850 / 1000 + 1x120 / 1000 + 2x20 / 1000 = 0.16). The branch probability of "True" for the second conditional branching circuit 73 is "0.94", and the branch probability of "False" is "0.06". The values ​​of the objective function are as follows: (True probability × 6 + False probability × 0) + expected number of loops × 2 + (True probability × 4 + False probability × 2) = (0.05 × 6 + 0.95 × 0) + 0.16 × 2 + (0.94 × 4 + 0.06 × 2) = 4.5 times In other words, the expected number of times the swap gate will be executed when the executable quantum circuit 70 is executed is 4.5 times.

[0158] A feasible quantum circuit that satisfies the real-machine constraints indicated in the topology can be generated, for example, by the following procedure. The circuit conversion unit 130 first generates as many allocation candidates as possible for a given dynamic quantum circuit c without taking the topology into consideration (exhaustive search). For example, the circuit conversion unit 130 defines the set of all dynamic quantum circuits as c. The circuit conversion unit 130 then generates swap gates for the given dynamic quantum circuit, max A function "f:N" that lists all quantum circuits generated by inserting up to max ×c→2 c Define

[0159] The circuit conversion unit 130 calculates P=f(N, c) for a sufficiently large integer N. The circuit conversion unit 130 creates a set P' by enumerating all initial assignments for each element of P. The circuit conversion unit 130 then deletes elements of P' that do not match the topology of the actual device.

[0160] [Other Embodiments] The quantum computing system 300 of the second embodiment separates the quantum computation for acquiring the dynamic parameters from the quantum computation for obtaining the computation result of the input dynamic quantum circuit, but the dynamic parameters may be acquired during the quantum computation for obtaining the computation result. In this case, the classical computer 100 acquires the execution path during the quantum computation for obtaining the computation result of the dynamic quantum circuit, updates the dynamic parameters, and changes the dynamic quantum circuit to be used for subsequent quantum computation.

[0161] For example, the classical computer 100 not only initially selects an executable quantum circuit, but also reselects the allocation based on statistical data obtained during multiple (e.g., 10,000) quantum computations (e.g., up to the 3,000th computation), and then instructs the quantum computer 200 to perform the 3,001st and subsequent quantum computations using the dynamic quantum circuit according to the reselected allocation.

[0162] Furthermore, in the second embodiment, the optimal executable quantum circuit was selected from the allocations for one quantum computer 200, but the optimal allocation for multiple quantum computers can also be similarly performed. For example, there may be cases where the number of input qubits for an input dynamic quantum circuit is large, and quantum computation is performed using multiple quantum computers. In such cases, the classical computer 100 can appropriately determine the allocation of physical qubits to each of the multiple quantum computers based on the actual machine constraints of each of the multiple quantum computers.

[0163] The foregoing merely illustrates the principles of the present invention. Further, since numerous modifications and changes will be apparent to those skilled in the art, the present invention is not limited to the exact construction and application shown and described above, and all corresponding modifications and equivalents are deemed to be within the scope of the present invention as defined by the appended claims and their equivalents.

[0164] REFERENCE SIGNS LIST 1 First dynamic quantum circuit 1a Measurement point 2 Constraint conditions 3a, 3b, ... Allocation candidates 4a, 4b, ... Second dynamic quantum circuit 10 Information processing device 11 Storage unit 12 Processing unit

Claims

1. A quantum computing support program that causes a computer to execute the following processes: based on a first dynamic quantum circuit in which gate operations to be performed vary depending on measurement results of a quantum state for a quantum bit at a predetermined measurement point, generate a plurality of assignment candidates indicating candidates for a plurality of second quantum bits in a quantum computer to be assigned to a plurality of first quantum bits indicated in the first dynamic quantum circuit; based on each of the plurality of assignment candidates, generate a second dynamic quantum circuit that can perform gate operations equivalent to those of the first dynamic quantum circuit by satisfying constraints on gate operations in the quantum computer; obtain measurement results at the measurement points in a plurality of quantum computations according to the second dynamic quantum circuit that correspond to some of the plurality of assignment candidates; based on the measurement results, calculate an index value for each of the plurality of assignment candidates that affects the fidelity when a quantum computation is performed according to the corresponding second dynamic quantum circuit; and determine the assignment of the second quantum bits to the plurality of first quantum bits based on the index value for each of the plurality of assignment candidates.

2. The quantum computing support program of claim 1, wherein the first dynamic quantum circuit includes a conditional branch circuit that executes either a first partial circuit or a second partial circuit depending on the measurement result at the measurement location; the process of generating the second dynamic quantum circuit generates the second dynamic quantum circuit that satisfies the constraint condition by adding a swap gate to at least one of the first partial circuit and the second partial circuit; and the process of calculating the index value calculates, as the index value, an expected value of the number of times the swap gate will be executed when quantum computing is performed according to the second dynamic quantum circuit.

3. The quantum computing support program according to claim 2, wherein in the process of calculating the index value, the expected value is calculated based on the number of times the first partial circuit is executed and the number of times the second partial circuit is executed according to the measurement results at the measurement points in multiple quantum computing operations according to the first dynamic quantum circuit.

4. The quantum computing support program of claim 1, wherein the first dynamic quantum circuit includes a loop circuit that encompasses the measurement location and is repeatedly executed depending on the measurement results at the measurement location; the process of generating the second dynamic quantum circuit generates the second dynamic quantum circuit that satisfies the constraint condition by adding a swap gate to the loop circuit; and the process of calculating the index value calculates, as the index value, an expected value of the number of times the swap gate is executed when quantum computing is performed according to the second dynamic quantum circuit, based on an average number of times the loop circuit is iterated.

5. The quantum computing support program of claim 1, wherein the process of acquiring the measurement result and the process of calculating the index value are alternately repeated N times (N is a natural number), and in the process of acquiring the measurement result from the second time onwards, a first assignment candidate is determined based on the index value of each of the multiple assignment candidates calculated immediately before, and the measurement results at the measurement points in multiple quantum computations according to the second dynamic quantum circuit corresponding to the first assignment candidate are acquired, and in the process of determining the assignment of the second quantum bit, the assignment of the second quantum bit to the multiple first quantum bits is determined based on the index value of each of the multiple assignment candidates calculated in the process of calculating the index value for the Nth time.

6. The quantum computing support program of claim 1, wherein the process of determining the allocation determines the allocation of the second quantum bits to the multiple first quantum bits based on a second allocation candidate among the multiple allocation candidates that has an index value that has a higher fidelity than the index values ​​of other allocation candidates.

7. The quantum computing support program according to any one of claims 1 to 6, further causing the computer to execute a process of outputting, as a computation result of the first dynamic quantum circuit, a result of the quantum computing performed by the quantum computer in accordance with the second dynamic quantum circuit corresponding to the determined allocation.

8. A quantum computing assistance method in which a computer performs the following processes: based on a first dynamic quantum circuit in which gate operations to be performed vary depending on measurement results of a quantum state for a quantum bit at a predetermined measurement point, generate a plurality of assignment candidates indicating candidates for a plurality of second quantum bits in a quantum computer to be assigned to a plurality of first quantum bits indicated in the first dynamic quantum circuit; based on each of the plurality of assignment candidates, generate a second dynamic quantum circuit that can perform gate operations equivalent to those of the first dynamic quantum circuit by satisfying constraints on gate operations in the quantum computer; obtain measurement results at the measurement points in a plurality of quantum computations according to the second dynamic quantum circuit that correspond to some of the plurality of assignment candidates; based on the measurement results, calculate an index value for each of the plurality of assignment candidates that affects the fidelity when quantum computation is performed according to the corresponding second dynamic quantum circuit; and determine the assignment of the second quantum bits to the plurality of first quantum bits based on the index value for each of the plurality of assignment candidates.

9. An information processing device having a processing unit that generates, based on a first dynamic quantum circuit in which a gate operation to be performed varies depending on a measurement result of a quantum state for a quantum bit at a predetermined measurement point, a plurality of assignment candidates indicating candidates for a plurality of second quantum bits in a quantum computer to be assigned to a plurality of first quantum bits indicated in the first dynamic quantum circuit, generates, based on each of the plurality of assignment candidates, a second dynamic quantum circuit that can perform gate operations equivalent to those of the first dynamic quantum circuit while satisfying constraints on gate operations in the quantum computer, obtains measurement results at the measurement points in a plurality of quantum calculations according to the second dynamic quantum circuit corresponding to some of the plurality of assignment candidates, calculates, based on the measurement results, an index value that affects the fidelity when a quantum calculation is performed according to the corresponding second dynamic quantum circuit for each of the plurality of assignment candidates, and determines the assignment of the second quantum bits to the plurality of first quantum bits based on the index value for each of the plurality of assignment candidates.

Citation Information

Patent Citations

  • Fidelity Estimation for Quantum Computing Systems

    JP2022167926A

  • Quantum circuit optimization

    JP2022521143A

  • Standardized method of quantum state verification based on optimal strategy

    US20210374589A1

  • Patch and elided fidelity estimation

    US20220383180A1

  • Fidelity Estimation for Quantum Computing Systems

    JP2019517069A

Cited By

  • Dynamic quantum feedback system based on branch prediction

    CN120278291A

  • Information processing program, information processing method, and information processing device

    EP4779528A1