Pre-analysis program, information processing device, and simulation method
The preliminary analysis program optimizes quantum bit order in DD-type quantum simulators by identifying and rearranging them based on simulation time, addressing the inefficiency in conventional DD-type quantum simulators and enhancing simulation speed.
Patent Information
- Application Number
- PCT/JP2023/007897
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Filing Date
- 2023-03-02
- Publication Date
- 2024-09-06
AI Technical Summary
Conventional DD-type quantum simulators experience prolonged simulation times due to the lack of consideration for the order of quantum bits, which affects execution speed, whereas methods for rearranging decision variables in classical logic circuits are not applicable to quantum circuits.
A preliminary analysis program that identifies and rearranges the order of quantum bits based on the simulation time of various quantum gates in a quantum circuit, prioritizing those with longer simulation times to optimize the order for faster execution.
This approach significantly speeds up the simulation time of DD-type quantum simulators by rearranging quantum bits to minimize the impact of time-consuming quantum gates, reducing the overall simulation time.
Smart Images

Figure JP2023007897_06092024_PF_FP
Abstract
Description
Pre-analysis program, information processing device, and simulation method
[0001] The present invention relates to a pre-analysis program and the like.
[0002] In recent years, quantum simulators using general-purpose computers have been used to develop quantum computer algorithms. A quantum simulator is a program that inputs quantum circuit information and calculates the quantum state. Generally, different types of quantum simulators are good at different quantum gates. In addition, quantum simulators that require the order of qubits are known to affect the execution speed of the simulation depending on the order of the qubits.
[0003] Types of quantum simulators include, for example, StateVector type, Decision Diagram (DD) type, and Tensor Network type. The StateVector type has the same execution time for any quantum circuit. The Tensor Network type is fast for quantum circuits with a small number of quantum gates, but may be difficult to execute for quantum circuits with a large number of quantum gates. The DD type is fast for quantum circuits without quantum gates with parameters, but slow for quantum circuits with quantum gates with parameters. For this reason, the order of quantum bits provided to the quantum simulator is necessary.
[0004] Here, DDs are used not only in simulations of quantum circuits but also in simulations of classical logic circuits. In the case of classical logic circuits, there are empirical rules for ordering decision variables to reduce execution time and memory requirements. The importance of ordering is disclosed, for example, in the non-patent document "Graph-Based Algorithms for Boolean Function Manipulation." Furthermore, in the case of classical logic circuits, a technique called dynamic reordering is known, which gradually reduces memory requirements by trying various permutations during the construction of a DD. Dynamic reordering is disclosed, for example, in the non-patent document "Dynamic variable ordering for ordered binary decision diagrams." Furthermore, techniques for generating binary decision diagrams corresponding to classical logic circuits have been disclosed (see, for example, Patent Documents 1 and 2).
[0005] Japanese Patent Application Publication No. 2001-109785 Japanese Patent Application Publication No. 10-040270 US Patent Application Publication No. 2005 / 0229124
[0006] However, conventional DD quantum simulators have the problem of long simulation times. For example, conventional DD quantum simulators do not rearrange the quantum bits. The execution speed of a DD quantum simulator is affected by the order of the quantum bits, but since no consideration is given to the order of the quantum bits, the simulation times are long.
[0007] In classical logic circuits, methods for rearranging the order of decision variables have been proposed, but these proposals are only for classical logic circuits and cannot be applied to quantum circuits.
[0008] In one aspect, the present invention aims to speed up the simulation time of a DD-type quantum simulator.
[0009] In one aspect, the pre-analysis program causes a computer to execute the following processes: count the number of quantum gates in order of longest simulation time for each quantum bit of a target quantum circuit, based on the relationship between the types of multiple quantum gates used in the quantum circuit and the simulation time in a quantum simulator using a decision diagram; identify quantum gates whose simulation time length is equal to or longer than a predetermined rank among the multiple types of quantum gates; if there are multiple types of quantum gates identified as equal to or longer than the predetermined rank, identify the number of quantum gates for each identified quantum gate; rearrange the order of the quantum bits to be provided to the quantum simulator in order of the number identified to be smallest; and output the rearranged order of the quantum bits.
[0010] According to one embodiment, the simulation time of a DD-type quantum simulator can be increased.
[0011] FIG. 1 is a diagram illustrating a functional configuration of an information processing device according to an embodiment. FIG. 2 is a diagram illustrating an example of characteristic information according to an embodiment. FIG. 3 is a diagram illustrating an example of count information according to an embodiment. FIG. 4 is a diagram illustrating an example of characteristic extraction according to an embodiment. FIG. 5 is a diagram illustrating an example of order generation according to an embodiment. FIG. 6 is a diagram illustrating an example of a final quantum state executed by a quantum simulator. FIG. 7 is a diagram illustrating an example of a flowchart of an order generation process according to an embodiment. FIG. 8 is a diagram illustrating an example of a result executed by a quantum simulator. FIG. 9 is a diagram illustrating an example of a computer that executes a pre-analysis program. FIG. 10 is a diagram illustrating a reference example of a quantum circuit. FIG. 11 is a diagram illustrating a reference example of a quantum state of a quantum circuit. FIG. 12 is a diagram illustrating a reference example of a DD mechanism. FIG. 13 is a diagram illustrating a reference example of a quantum state of a DD-type quantum simulator. FIG. 14 is a reference diagram illustrating how the shape of the DD changes with the order of the order.
[0012] Hereinafter, embodiments of the pre-analysis program, the information processing device, and the simulation method disclosed in the present application will be described in detail with reference to the accompanying drawings. However, the present invention is not limited to the embodiments.
[0013] First, we will explain the quantum circuit to be simulated by the quantum simulator.
[0014] FIG. 10 is a diagram showing a reference example of a quantum circuit. As shown in FIG. 10, quantum circuit QC0 is shown as an example of a quantum circuit. Quantum circuit QC0 is a quantum operation model described by a combination of quantum gates. The horizontal lines represent quantum bits (qubits). A quantum bit is the smallest unit of quantum information and has a quantum state of "0" or "1." Here, "q0," "q1," and "q2" are quantum bits.
[0015] A quantum gate is a gate that acts on a quantum bit and manipulates the quantum state of the quantum bit. Here, "H", "Y", "X", and "RY" are quantum gates. As an example, "H" is a single-qubit gate that controls the quantum state of one quantum bit. "X" and "Y" are multi-qubit gates that control the quantum states of multiple quantum bits. "RY" is a quantum bit gate with a parameter. Note that quantum gates are not limited to "H", "Y", "X", and "RY", and there are various types of quantum gates.
[0016] FIG. 11 is a diagram showing a reference example of the quantum state of a quantum circuit. As shown in FIG. 11, quantum circuit QC0 applies quantum gates to quantum bits, gradually changing the quantum state of the quantum bits to perform meaningful operations. Here, the probabilities of each quantum bit "q0", "q1", and "q2" being in each quantum state at timings <1>, <2>, <3>, and <4> are shown. At timing <1>, each quantum bit is in its initial state, so the probability of each quantum state being "000" is "1". The first "0" in "000" is the quantum state of "q0". The second "0" in "000" is the quantum state of "q1". The third "0" in "000" is the quantum state of "q2". The probability of each quantum state other than "000" is "0". That is, the probability that "q0", "q1", and "q2" will be in the quantum states "000", "001", "010", "011", "100", "101", "110", and "111" in that order is "1, 0, 0, 0, 0, 0, 0, 0". Each probability has been adjusted so that when squared and added together, it becomes "1".
[0017] At timing <2>, the probability that the quantum states of each quantum bit will be "000", "001", "100", or "101" is "0.5". The probability of each quantum state other than "000", "001", "100", or "101" is "0". In other words, the probability that "q0", "q1", and "q2" will be in the quantum states of "000", "001", "010", "011", "100", "101", "110", or "111", respectively, is "0.5, 0.5, 0, 0, 0.5, 0.5, 0, 0". Each probability has been adjusted so that when squared and added, it becomes "1".
[0018] Similarly, at timing <3> and timing <4>, the probabilities that "q0", "q1", and "q2" will be in the quantum states "000", "001", "010", "011", "100", "101", "110", and "111" in that order are calculated. The probabilities are adjusted so that squaring and adding them together equals "1".
[0019] Here, a DD-type quantum simulator is a program that uses DD to calculate a quantum state corresponding to a quantum circuit. DD is a data structure that can efficiently represent vectors and matrices. That is, DD can represent the quantum state of each quantum bit instead of a vector. In addition, DD may or may not have values on the edges, but in the embodiment, the case where the edges have values is applied. In addition, DD may also be referred to as a "decision graph" hereinafter.
[0020] Furthermore, the DD-type quantum simulator is characterized by being fast in a circuit that does not have a quantum gate having a parameter that is one of the quantum gates, but being slow in a quantum circuit that has a quantum gate having a parameter such as "RY" shown in Fig. 10. For this reason, the order in which the quantum bits are given to the quantum simulator is important.
[0021] Here, we will explain the mechanism of a DD (decision diagram) when the order of quantum bits "q0", "q1", and "q2" is given to a DD-type simulator. FIG. 12 is a diagram showing a reference example of the DD mechanism. The right diagram of FIG. 12 shows a DD (decision diagram). The left diagram of FIG. 12 shows the probability of each quantum state of each quantum bit at the timing <3> shown in FIG. 11 as a vector. The probability of each quantum state can be read in the decision diagram as follows. The nodes of the decision diagram represent each quantum bit. The quantum bits "q0", "q1", and "q2" are shown in order from the bottom up, represented by nodes. The left side of the node is "0", which indicates a quantum state. The right side of the node is "1", which indicates a quantum state.
[0022] For example, if we follow the dotted lines, the quantum states of "q2," "q1," and "q0" are expressed as "001" when expressed as a vector. The product of the values attached to the edges on the dotted lines is the value of the element of the probability vector. Therefore, the value of the element of the probability vector in which each quantum state is a vector of "001" is calculated as shown in formula (1) by multiplying it by the value of the edge on the dotted line.
[0023] A route with no edge will have a value of "0." Therefore, if the quantum states of "q2," "q1," and "q0" are "010" vectors, there is no quantum state edge where "q1" indicates "1," so the value of the element of the probability vector of the "010" vector will be "0."
[0024] DD-type quantum simulators use DD (decision diagrams) instead of holding quantum states as vectors, which eliminates the need to store the information volume of vectors and allows the volume of information in vectors to be compressed.
[0025] Fig. 13 is a diagram showing a reference example of the quantum state of a DD quantum simulator, in which the order of quantum bits "q0", "q1", and "q2" is given to the DD quantum simulator.
[0026] As shown in Figure 13, a DD-type quantum simulator performs quantum simulation by manipulating a DD (decision diagram) to change from <1> to <2>, from <2> to <3>, and from <3> to <4>, and calculating the quantum state each time. Here, the DD (decision diagram) with symbol g1 shows the quantum state of the quantum circuit at timing <1>. Since timing <1> is the initial state, the quantum state of "000" is shown by the DD. In other words, instead of having the quantum state as a vector "000", the DD shows the quantum state.
[0027] Furthermore, the DD (decision diagram) with symbol g2 shows the quantum state of the quantum circuit at timing <2>. That is, it shows the quantum state when DD is changed from <1> to <2>. That is, instead of holding the quantum state as a vector, DD shows the quantum state. The DD (decision diagram) with symbol g3 shows the quantum state of the quantum circuit at timing <3>. That is, it shows the quantum state when DD is changed from <2> to <3>. That is, instead of holding the quantum state as a vector, DD shows the quantum state. The DD (decision diagram) with symbol g4 shows the quantum state of the quantum circuit at timing <4>. That is, it shows the quantum state when DD is changed from <3> to <4>. That is, instead of holding the quantum state as a vector, DD shows the quantum state.
[0028] The change in DD shown in Figure 13 is when the order of quantum bits "q0", "q1", and "q2" is given to a DD quantum simulator. In general, DD quantum simulators often use the order written in the quantum circuit as is. However, the size and shape of the DD change depending on the order in which the quantum bits are given.
[0029] FIG. 14 is a reference diagram showing that the shape of the DD changes depending on the order of the arrangement. The left diagram of FIG. 14 is a DD (decision graph) when the order of the quantum bits is "q0", "q1", and "q2". The right diagram of FIG. 14 is a DD (decision graph) when the order of the quantum bits is "q2", "q1", and "q0". These two DDs (decision graphs) are DDs at the same timing for the same quantum circuit. Therefore, it can be seen that the shape of the DD (decision graph) changes depending on the order of the quantum bits, even for the same quantum circuit.
[0030] In other words, the order in which the qubits are added affects how the shape of the DD changes as the quantum circuit evolves over time. In other words, the simulation time changes. Therefore, unless careful consideration is given to the order in which the qubits are added, the simulation time increases.
[0031] Therefore, in the embodiment, a method for speeding up the simulation time of a DD type quantum simulator by devising the order in which quantum bits are provided will be described.
[0032] [Functional Configuration of Information Processing Device] FIG. 1 is a diagram illustrating the functional configuration of an information processing device according to an embodiment. Before simulating the quantum state of a quantum circuit using a quantum simulator 30, the information processing device 1 performs a pre-analysis to speed up the simulation time. As the pre-analysis, the information processing device 1 counts the number of quantum gates that take a long time to execute for each quantum bit of the quantum circuit to be simulated based on the characteristics of the DD-type quantum simulator 30. The information processing device 1 then rearranges the order of the quantum bits provided to the quantum simulator 30 in ascending order of the number of quantum gates that take the least amount of time. In other words, the information processing device 1 counts the number of quantum gates for each quantum bit of the quantum circuit in descending order of simulation time, identifies quantum gates whose simulation times are equal to or greater than a predetermined rank among multiple types of quantum gates, and, if multiple types of quantum gates are identified as equal to or greater than the predetermined rank, identifies the number of quantum gates for each identified quantum gate, and rearranges the order of the quantum bits provided to the quantum simulator 30 in ascending order of the number of identified quantum gates. The DD-type quantum simulator 30 refers to a simulator that performs simulation using a decision diagram. This DD-type quantum simulator 30 accepts the order of quantum bits for constructing a decision graph.
[0033] As shown in Fig. 1, the information processing device 1 has a control unit 10 and a storage unit 20. The control unit 10 has a characteristic extraction unit 11, an input unit 12, an order generation unit 13, and an order display unit 14. The storage unit 20 has characteristic information 21 and count information 22. The order generation unit 13 is an example of a counting unit and a sorting unit. The order display unit 14 is an example of an output unit.
[0034] The characteristic extraction unit 11 extracts the characteristics of the quantum simulator 30. The quantum simulator 30 here is a DD-type quantum simulator. For example, the characteristic extraction unit 11 generates a list of quantum gates that take a long time to execute as characteristic information 21 of the quantum simulator 30. As an example, the characteristic extraction unit 11 uses a quantum circuit to place a quantum gate to be investigated at a predetermined position of each of multiple quantum bits represented by horizontal lines in the quantum circuit and measure the execution time of the quantum gate. Then, the characteristic extraction unit 11 replaces the multiple quantum gates to be investigated one by one and measures the execution time of each quantum gate. Then, the characteristic extraction unit 11 generates a list of the types of quantum gates to be investigated, for example, in descending order of the time required for execution, and stores the list in the characteristic information 21. Note that, although the characteristic extraction unit 11 experimentally extracts the characteristics of the quantum simulator 30 using a quantum circuit, this is not limiting. The characteristic extraction unit 11 may also be configured to extract the characteristics of the quantum simulator 30 manually by an expert with knowledge of the characteristics of the quantum simulator 30.
[0035] An example of the characteristic information 21 will now be described with reference to FIG. 2 . FIG. 2 is a diagram illustrating an example of characteristic information according to an embodiment. As shown in FIG. 2 , the characteristic information 21 is a list listing quantum gates that take a long time to execute in order. That is, the order of quantum gates that take a long time to execute is used as the characteristic of the quantum simulator 30. Here, the characteristic information 21 lists quantum gates that take a long time to execute in the order [RX, RY, RZ] and [CX, CY, CZ]. "RX", "RY", and "RZ" are quantum gates of a type called parameter gates that have parameters, and have approximately the same execution time. "CX", "CY", and "CZ" are quantum gates of a type called control gates that act on two quantum bits, and take less time to execute than parameter gates. Note that the characteristic information 21 may also include a quantum gate "H" of a type called a single quantum bit that acts on a single quantum bit.
[0036] Returning to FIG. 1, the input unit 12 inputs information and characteristic information 21 of the target quantum circuit.
[0037] The order generator 13 rearranges the order of quantum bits to be provided to the quantum simulator 30 for the target quantum circuit. For example, the order generator 13 counts the number of quantum gates of each type provided for each quantum bit, based on the information about the target quantum circuit input by the input unit 12. The order generator 13 then stores the counting results in count information 22.
[0038] An example of the count information 22 will now be described with reference to FIG. 3 . FIG. 3 is a diagram illustrating an example of the count information according to the embodiment. As shown in FIG. 3 , the count information 22 is information that counts the number of quantum gates of each type for each quantum bit of a quantum circuit. The quantum gate types are arranged in order of the time required to execute them. Here, the count information 22 lists the quantum gates [RX, RY, RZ] and [CX, CY, CZ] in this order. For the quantum bit q0, one quantum gate of the type [CX, CY, CZ] is counted. For the quantum bit q1, one quantum gate of the type [RX, RY, RZ] is counted, and one quantum gate of the type [CX, CY, CZ] is counted. For the quantum bit q2, one quantum gate of the type [CX, CY, CZ] is counted.
[0039] Returning to FIG. 1 , the reordering unit 13 uses the count information 22 to rearrange the order of quantum bits to be provided to the quantum simulator 30 in ascending order of the number of quantum gates taking the longest simulation time. As an example, the reordering unit 13 refers to the count information 22 and selects quantum gate types in descending order of execution time. The reordering unit 13 then rearranges quantum bits with a large number of quantum gates of the selected type to the rear. During the rearrangement, the reordering unit 13 rearranges quantum bits with the same number of quantum gates into the same group. Furthermore, if a group exists among the already rearranged groups, the reordering unit 13 rearranges the quantum bits within the same group. That is, the reordering unit 13 rearranges the quantum bits so that the quantum bits with a large number of quantum gates taking the longest execution time are at the rear. In other words, the reordering unit 13 rearranges the quantum bits in descending order of the number of quantum gates taking the longest execution time.
[0040] The order display unit 14 displays the order of the quantum bits rearranged by the order generation unit 13 on, for example, a monitor.
[0041] After this, the quantum simulator 30 receives the order of the qubits displayed by the sorting order display unit 14 and information about the target quantum circuit, and simulates the quantum state of each qubit in the quantum circuit to be simulated. This allows the quantum simulator 30 to simulate qubits that take longer to execute later, thereby speeding up the simulation. This is explained below. When a quantum gate acts on a qubit, the lower qubits (later in the qubit order) are affected. If a quantum gate that takes longer to execute acts on qubits in a higher qubit order (earlier in the qubit order) part of the decision graph, the number of nodes to be updated increases and a large amount of new memory is likely to be required. Therefore, the inventors considered it best to have quantum gates that take longer to execute act on qubits that are lower in the decision graph (later in the qubit order). As a result, by moving qubits with longer quantum gates later in the order, the quantum simulator 30 allows the longer quantum gates to act on qubits in a lower qubit order (later in the qubit order) part of the decision graph, thereby speeding up the simulation.
[0042] [Example of characteristic extraction] Fig. 4 is a diagram illustrating an example of characteristic extraction according to an embodiment. Note that Fig. 4 illustrates an example in which the characteristic extraction unit 11 experimentally extracts characteristics of the quantum simulator 30 using a quantum circuit QC.
[0043] 4 shows a quantum circuit QCα. The quantum circuit QCα has about m quantum bits qα. The quantum circuit QCα has quantum gates "U" in predetermined positions and numbers for each quantum bit qα. The quantum bit with the most quantum gates "U" is the one that is the first in the quantum bit order and has about n quantum gates.
[0044] Under these circumstances, the characteristic extraction unit 11 uses the quantum circuit QCα to replace one quantum gate under investigation with a quantum gate "U" at a predetermined position and number for each of the m quantum bits qα1 to qαm, and measures the execution time of the quantum gate. The characteristic extraction unit 11 then replaces the quantum gate "U" with another quantum gate under investigation and measures the execution time of the other quantum gate. Similarly, the characteristic extraction unit 11 measures the execution time of all quantum gates under investigation. The characteristic extraction unit 11 then generates a list of the types of quantum gates under investigation, for example, in order of execution time, and stores the list in the characteristic information 21. The quantum gate "U" can be replaced with a quantum gate under investigation, such as "CX," "CY," "CZ," "RX," "RY," "RZ," or "H."
[0045] [Example of Sequencing Generation] Fig. 5 is a diagram showing an example of sequencing generation according to an embodiment. As shown in the upper part of Fig. 5, the sequencing generation unit 13 acquires information on the target quantum circuit QC0 and characteristic information 21 of the quantum simulator 30. In the characteristic information 21 of the quantum simulator 30, quantum gates that take a long time to execute are listed in the order [RX, RY, RZ] and [CX, CY, CZ]. Since "H" is a single-qubit gate and takes less time to execute than other types, it is not listed in the characteristic information 21 here.
[0046] "RX", "RY", and "RZ" are quantum gates of a type called parameter gates that have parameters. The execution times of "RX", "RY", and "RZ" are approximately the same. "CX", "CY", and "CZ" are quantum gates of a type called control gates that act on two quantum bits. The execution times of "CX", "CY", and "CZ" are shorter than those of "RX", "RY", and "RZ". Note that the quantum gates "X" and "Y" in quantum circuit QC0 are synonymous with "CX" and "CY", and refer to quantum gates of a type called control gates that act on two quantum bits.
[0047] Next, as shown in the middle of FIG. 5, the reordering unit 13 counts the number of quantum gates of each type provided for each quantum bit based on the information of the target quantum circuit QC0. Here, quantum bit "q0" has "H" and "Y" (synonymous with "CY") as quantum gates. Therefore, the reordering unit 13 counts "1" in [CX, CY, CZ] corresponding to "q0". Furthermore, quantum bit "q1" has "RY" and "X" (synonymous with "CX") as quantum gates. Therefore, for "q1", the reordering unit 13 counts "1" in [RX, RY, RZ] and counts "1" in [CX, CY, CZ]. Furthermore, quantum bit "q2" has "H", "Y" (synonymous with "CY"), and "X" (synonymous with "CX") as quantum gates. Therefore, the order generation unit 13 counts "2" into [CX, CY, CZ] corresponding to "q2." The order generation unit 13 then stores the counting result in the count information 22.
[0048] Next, as shown in the latter part of FIG. 5, the ordering generator 13 uses the count information 22 to rearrange the order of quantum bits to be provided to the quantum simulator 30 in ascending order of the number of quantum gates that take the longest time to execute.
[0049] First, the sorting sequence generator 13 selects quantum gate types in descending order of execution time by referring to the count information 22. Here, [RX, RY, RZ] in the first row is selected as the quantum gate type that takes the longest execution time.
[0050] The reordering unit 13 then rearranges the quantum bit with the largest number of quantum gates of the selected type to the end. During the rearrangement, the reordering unit 13 rearranges quantum bits with the same number of quantum gates into the same group. Here, the quantum bit with the largest number of quantum gates corresponding to the selected [RX, RY, RZ] is "q1," which counts "1." Therefore, the reordering unit 13 rearranges "q1" to the end. The quantum bits "q0" and "q2" both count the same number of "0." Therefore, the reordering unit 13 rearranges "q0" and "q2" into the same group. As a result, the reordering unit 13 rearranges "{q0, q1, q2}" to "{q0, q2}, {q1}."
[0051] Next, the sorting sequence generator 13 selects quantum gate types in descending order of execution time with reference to the count information 22. Here, [CX, CY, CZ] in the second row is selected as the quantum gate type that takes the next longest time to execute.
[0052] Then, the sorting sequence generator 13 sorts the quantum bit with the largest number of quantum gates of the selected type toward the end. During sorting, the sorting sequence generator 13 sorts quantum bits with the same number of quantum gates into the same group. Furthermore, if a group exists among the already sorted groups, the sorting sequence generator 13 sorts within the same group. Here, the quantum bit with the largest number of quantum gates corresponding to the selected [CX, CY, CZ] is "q2," which counts "2." "q2" belongs to the already sorted group {q0, q2}. Therefore, the sorting sequence generator 13 sorts "q2," which has the largest number of quantum gates, toward the end within the group {q0, q2}. As a result, the sorting sequence generator 13 sorts "{q0, q2}, {q1}" into "{q0}, {q2}, {q1}."
[0053] In this way, the reordering unit 13 can rearrange the quantum bits having the quantum gates that take a long time to act on the quantum bits that are in the lower part (later in the quantum bit order) of the decision graph by reordering the quantum bits having the quantum gates that take a long time to act on the quantum bits that are in the lower part (later in the quantum bit order) of the decision graph. As a result, the reordering unit 13 can speed up the simulation that will be executed subsequently by the quantum simulator 30.
[0054] Here, the final quantum state executed by the quantum simulator 30 will be described with reference to FIG. 6. FIG. 6 is a diagram showing an example of a final quantum state executed by the quantum simulator. The left diagram of FIG. 6 shows a final decision graph when the quantum simulator 30 is executed using the optimal order "{q1}, {q2}, {q0}" rearranged by the order generation unit 13. The right diagram of FIG. 6 shows a final decision graph when the quantum simulator 30 is executed using the reverse order "{q0}, {q2}, {q1}" of the optimal order rearranged by the order generation unit 13. The final decision graph represents the final quantum state.
[0055] 6, when the quantum simulator 30 executes the simulation in the reverse order of the optimal order, the quantum simulator 30 places the quantum bit "q0" having the quantum gate that takes a long time at the front, and the quantum gate that takes a long time acts on the quantum bit "q0" that is at the front of the decision graph. As a result, the quantum simulator 30 is likely to, for example, have an increased number of nodes to be updated or require a large amount of new memory, which increases the simulation execution time.
[0056] In contrast, as shown in the left diagram of Figure 6, the quantum simulator 30 places the quantum bit "q0" having a quantum gate that takes a long time at the rear, so that the quantum gate that takes a long time acts on the quantum bit "q0" that is in a lower part (later in quantum bit order) of the decision graph. As a result, the quantum simulator 30 shortens the execution time of the simulation, making it possible to speed up the simulation.
[0057] 7 is a diagram showing an example of a flowchart of the order generation process according to the embodiment. It is assumed that the characteristic information 21 of the quantum simulator 30 has already been extracted and stored.
[0058] 7, the information processing device 1 determines whether or not the information on the quantum circuit to be simulated and the characteristic information 21 of the quantum simulator 30 have been input (step S11). If it is determined that the information on the quantum circuit to be simulated and the characteristic information 21 of the quantum simulator 30 have not been input (step S11: No), the information processing device 1 repeats the determination process until the information is input.
[0059] On the other hand, if it is determined that the information on the quantum circuit to be simulated and the characteristic information 21 of the quantum simulator 30 have been input (step S11: Yes), the information processing device 1 counts the number of quantum gates of each type for each quantum bit (step S12). For example, the information processing device 1 counts the number of quantum gates of each type provided for each quantum bit based on the information on the quantum circuit to be simulated. Then, the information processing device 1 stores the counting results in count information 22.
[0060] The information processing device 1 then selects a set (type) of quantum gates that takes the longest time from the count information 22 (step S13). The information processing device 1 rearranges the quantum bits with the largest number of quantum gates from the number of quantum gates of each quantum bit corresponding to the selected set (type) to the end (step S14). Note that the information processing device 1 rearranges quantum bits with the same number of quantum gates by grouping them together. Furthermore, if a group exists among the already rearranged groups, the information processing device 1 rearranges the quantum bits within the same group.
[0061] Then, the information processing device 1 determines whether or not there is an unselected set (type) of quantum gates (step S15). If it is determined that there is an unselected set (type) of quantum gates (step S15: Yes), the information processing device 1 proceeds to step S13 to select an unselected set (type) of quantum gates.
[0062] On the other hand, if it is determined that there are no unselected sets (types) of quantum gates (step S15: No), the information processing device 1 outputs information on the rearranged quantum bits (step S16).Then, the information processing device 1 ends the rearrangement order generation process.
[0063] FIG. 8 is a diagram showing an example of the results of execution by a quantum simulator. FIG. 8 shows the execution time results when the quantum simulator 30 simulates the quantum state of a quantum circuit using "CNOT," "X" (synonymous with "CX"), and "RZ" as quantum gates. When the quantum simulator 30 accepts the optimal order of the quantum bits, the simulation time is 12.8 seconds. In contrast, when the quantum simulator 30 accepts the reverse order of the optimal order of the quantum bits, the simulation time is 16.3 seconds. Therefore, the quantum simulator 30 can speed up the execution time of the simulation when accepting the optimal order of the quantum bits compared to when accepting the reverse order.
[0064] Effects of the Embodiments According to the above embodiment, the information processing device 1 counts the number of quantum gates in order of longest simulation time for each quantum bit of the target quantum circuit based on the relationship between the types of quantum gates used in the quantum circuit and the simulation time in the quantum simulator 30 using a decision diagram. The information processing device 1 identifies quantum gates whose simulation times are equal to or longer than a predetermined rank among the multiple types of quantum gates. If there are multiple types of quantum gates identified as equal to or longer than the predetermined rank, the information processing device 1 identifies the number of quantum gates for each identified quantum gate and rearranges the order of the quantum bits provided to the quantum simulator 30 in order of the number of identified quantum gates. The information processing device 1 then outputs the rearranged order of the quantum bits. By providing the quantum simulator 30 with the order of the quantum bits rearranged in order of the number of quantum gates taking the least amount of time, the information processing device 1 can speed up the simulation performed by the decision-diagram-based quantum simulator 30.
[0065] Furthermore, according to the above embodiment, the information processing device 1 counts the number of quantum gates of each type for each quantum bit in the target quantum circuit. The information processing device 1 uses the number of quantum gates of each type counted for each quantum bit to sort the quantum bits in order of the number of quantum gates whose simulation time is equal to or longer than a predetermined rank. This enables the information processing device 1 to identify the sorting order of the quantum bits that shortens the simulation time.
[0066] Furthermore, according to the above embodiment, the information processing device 1 selects the quantum gate types in descending order of simulation time. The information processing device 1 rearranges the quantum bits so that the quantum bits with the largest number of quantum gates of the selected type are at the end, thereby rearranging the quantum bits in descending order of the number of quantum gates taking the longest simulation time. This enables the information processing device 1 to efficiently identify the order of quantum bits that will shorten the simulation time.
[0067] Furthermore, according to the above embodiment, the information processing device 1 rearranges quantum bits with the same number of quantum gates into the same group, and rearranges quantum bits belonging to the group within the group using the number of quantum gates of the type of quantum gate to be selected from the next time onwards. With this configuration, the information processing device 1 can accurately identify the order of quantum bits that shortens the simulation time.
[0068] Furthermore, according to the above embodiment, the information processing device 1 inputs the order of the output quantum bits to the quantum simulator 30 and causes the quantum simulator 30 to execute a simulation using a decision diagram. As a result, the quantum simulator 30 executes the simulation using the order of the quantum bits, thereby speeding up the simulation.
[0069] Note that the components of the illustrated information processing device 1 do not necessarily have to be physically configured as shown. In other words, the specific manner in which the information processing device 1 is distributed and integrated is not limited to that shown, and all or part of the information processing device 1 can be functionally or physically distributed and integrated in any unit depending on various loads, usage conditions, etc. For example, the input unit 12 and the sequence generation unit 13 may be integrated. Furthermore, the sequence generation unit 13 may be distributed into a generation unit that generates count information 22 and a sorting unit that sorts the order of quantum bits using the count information 22. Furthermore, the storage unit 20 may be connected to the information processing device 1 as an external device via a network.
[0070] The various processes described in the above embodiments can be realized by executing a prepared program on a computer such as a personal computer or a workstation. Therefore, an example of a computer that executes an information processing program that achieves the same functions as the information processing device 1 shown in Fig. 1 will be described below. Here, an information processing program that achieves the same functions as the information processing device 1 will be described as an example. Fig. 9 is a diagram showing an example of a computer that executes a pre-analysis program.
[0071] 9 , computer 200 includes a CPU (Central Processing Unit) 203 that executes various types of arithmetic processing, an input device 215 that accepts data input from a user, and a display device 209. Computer 200 also includes a drive device 213 that reads programs and the like from a storage medium, and a communication I / F (Interface) 217 that exchanges data with other computers via a network. Computer 200 also includes a memory 201 that temporarily stores various types of information, and an HDD (Hard Disk Drive) 205. Memory 201, CPU 203, HDD 205, display control unit 207, display device 209, drive device 213, input device 215, and communication I / F 217 are connected via a bus 219.
[0072] The drive device 213 is, for example, a device for the removable disk 211. The HDD 205 stores a pre-analysis program 205a and pre-analysis processing related information 205b. The communication I / F 217 manages the interface between the network and the inside of the device, and controls the input and output of data from other computers. The communication I / F 217 can be, for example, a modem or a LAN adapter.
[0073] The display device 209 displays a cursor, an icon, a tool box, and data such as documents, images, and function information. The display device 209 may be, for example, a liquid crystal display or an organic EL (Electroluminescence) display.
[0074] The CPU 203 reads the pre-analysis program 205a, loads it into the memory 201, and executes it as a process. Such a process corresponds to each functional unit of the information processing device 1. The pre-analysis processing related information 205b includes, for example, characteristic information 21 and count information 22. The removable disk 211, for example, stores each piece of information such as the pre-analysis program 205a.
[0075] Note that the pre-analysis program 205a does not necessarily have to be stored in the HDD 205 from the beginning. For example, the program may be stored in a "portable physical medium" such as a flexible disk (FD), CD-ROM, DVD disk, magneto-optical disk, or IC card that is inserted into the computer 200. The computer 200 may then read and execute the pre-analysis program 205a from the medium.
[0076] Furthermore, the processing performed by the information processing device 1 described in the above embodiment can be applied to quantum simulation that calculates the quantum state in a quantum circuit using a DD-type quantum simulator.
[0077] REFERENCE SIGNS LIST 1 Information processing device 10 Control unit 11 Property extraction unit 12 Input unit 13 Sorting order generation unit 14 Sorting order display unit 20 Storage unit 21 Property information 22 Count information 30 Quantum simulator
Claims
1. A pre-analysis program that causes a computer to execute the following processes: count the number of quantum gates in order of longest simulation time for each quantum bit of a target quantum circuit, based on the relationship between the types of multiple quantum gates used in a quantum circuit and the simulation time in a quantum simulator using a decision diagram; identify the quantum gates whose simulation time length is equal to or longer than a predetermined rank among the multiple types of quantum gates; if there are multiple types of quantum gates identified as equal to or longer than the predetermined rank, identify the number of quantum gates for each identified quantum gate; rearrange the order of the quantum bits to be provided to the quantum simulator in order of the number identified to be smallest; and output the rearranged order of the quantum bits.
2. The pre-analysis program according to claim 1, characterized in that the counting process counts the number of quantum gates of each type for each quantum bit of the target quantum circuit, and the sorting process uses the number of quantum gates of each type counted for each quantum bit to sort the quantum bits in order of the fewest number of quantum gates for which the simulation time length is equal to or greater than a predetermined rank.
3. The pre-analysis program according to claim 2, characterized in that the sorting process selects the types of quantum gates in order of the longest simulation time, and sorts the quantum bits in order of the number of quantum gates of the selected type in the rearrangement so that the quantum bits having the largest number of quantum gates of the selected type are placed at the end.
4. The pre-analysis program according to claim 3, characterized in that the rearrangement process rearranges quantum bits having the same number of quantum gates into the same group, and rearranges quantum bits belonging to the group within the group using the number of quantum gates of the type of quantum gate selected next time or later.
5. The pre-analysis program according to claim 1, further comprising inputting the order of the output quantum bits to the quantum simulator, and causing the quantum simulator to execute a simulation using the decision diagram.
6. An information processing device comprising: a counting unit that counts the number of quantum gates in order of the longest simulation time for each quantum bit of a target quantum circuit based on the relationship between the types of multiple quantum gates used in the quantum circuit and the simulation time in a quantum simulator using a decision diagram; a sorting unit that identifies quantum gates whose simulation time length is equal to or longer than a predetermined rank among the multiple types of quantum gates, and if there are multiple types of quantum gates identified as equal to or longer than the predetermined rank, identifies the number of quantum gates for each identified quantum gate, and sorts the order of the quantum bits to be provided to the quantum simulator in order of the identified number; and an output unit that outputs the sorted order of the quantum bits.
7. A method for simulating a quantum state using an information processing device and a quantum simulator, wherein the information processing device: counts the number of quantum gates in order of longest simulation time for each quantum bit of a target quantum circuit based on the relationship between multiple types of quantum gates used in a quantum circuit and the simulation time in a quantum simulator using a decision diagram; identifies quantum gates whose simulation time is equal to or longer than a predetermined rank among the multiple types of quantum gates; and if there are multiple types of quantum gates identified as equal to or longer than the predetermined rank, identifies the number of quantum gates for each identified quantum gate and rearranges the order of the quantum bits to be provided to the quantum simulator in order of least identified number; and the quantum simulator: accepts the rearranged order of the quantum bits; and uses the rearranged order of the quantum bits to simulate the quantum state of the quantum bits in the quantum circuit.
Citation Information
Patent Citations
Semiconductor integrated circuit and its design method
JP1998040270A
Method for designing pass transistor logical circuit
JP2001109785A
Distributed BDD reordering
US20050229124A1
Method and device for simulating quantum circuit
CN113723613A
Methods For General Stabilizer-Based Quantum Computing Simulation
US20150339417A1
