Patent Description:
Computer program compiling has been well studied for classical computers for many years. The known computing methods however may not apply in the context of quantum computing.

<NPL>) describes a compiler for a scalable processor with a surface code architecture. It takes into account the elementary gate set and qubit connectivity constraints.

<NPL>) describes a computer-aided design flow for quantum circuits using a greedy heuristic scheduler.

Additional features and advantages of the concepts herein disclosed are set forth in the description which follows.

This disclosure relates to quantum computing. Quantum computing is a non-classical computing technology relying on the use of qubits as unit of memory. More specifically, this disclosure relates to a compiling method for quantum computing. Compiling permits translating a first representation of a computer program into a second representation. In this disclosure, compiling permits translating a higher level representation such as a quantum circuit comprising quantum gates to be applied to one or more qubits into a lower level representation. A higher level representation should be understood as being more likely to be directly understood by a human being, while a lower level representation should be understood as being more suitable for implementation onto a computing system, in this case a quantum computer. The quantum computing system is a trapped ion quantum computing system. An example of a low level representation for a trapped ion quantum computing system would describe the movement of specific ions within the trapped ion system. Such a description of movement at the system level is called a shuttling schedule. Example low level representations should take limitations of a system into account. In particular, example low level representations should take hardware limitations of a system into account.

An example trapped ion quantum system <NUM> is represented in <FIG>. The system <NUM> of <FIG> comprises <NUM> locations <NUM>-<NUM> and <NUM> qubits <NUM>-<NUM>. The system <NUM> is represented at a given moment, whereby locations <NUM> and <NUM> are empty, location <NUM> holds <NUM> qubits being qubits <NUM> and <NUM>, and locations <NUM> and <NUM> each comprise a single qubit, respectively qubit <NUM> and qubit <NUM>. Each qubit corresponds in this system to a trapped ion.

The method refers to a quantum circuit. A quantum circuit should be understood as a representation of the application of quantum gates on one or more qubits. Quantum gates are transformations applied to one of more qubits. In other words, quantum gates are basic quantum circuit operation. Example of quantum gates comprise Hadamar gates, SWAP gates, CNOT gates, Controlled-Z gates or Pauli gates.

In some representations of quantum circuits, qubits are represented along different lines, each line representing one qubit. A quantum gate operating on a qubit is placed onto the line corresponding to the qubit. In some cases, a quantum gate involves more than one qubit, in which case such quantum gate may not only be placed on the line corresponding to one of such qubits, be will also be linked by a segment to another line corresponding to another of such qubit to which the quantum gat will be applied. An example quantum circuit <NUM> is represented on <FIG>. Quantum circuit <NUM> is a representation comprising <NUM> different qubits q0-q4, each represented by a line, in this case a horizontal line. Each qubit may be represented as being submitted to a quantum gate, time flowing from left to right in <FIG>. Quantum gates are represented by rectangles placed onto the line corresponding to a qubit to which they are applied. In <FIG>, the first quantum gate <NUM> represented on the far left is a Hadamar gate "H" applied to qubit q0. The following gate <NUM> is a Controlled-Phase gate of angle pi/2gate applying to qubit q0 after application of the first Hadamar gate, and to qubit q1, to which such following gate <NUM> is also linked, in this case by a vertical segment. It should be noted that quantum gate <NUM> requires completing quantum gate <NUM> in order to take place. In other words, quantum gate <NUM> is dependent on quantum gate <NUM>.

In order to apply a given gate such as gates represented in <FIG> to one or more qubits in a system as represented in <FIG>, such qubits should in such examples be in the same location. In other words, quantum gate <NUM> may be applied to the qubits <NUM> and <NUM> located in location <NUM>. Taking this into account, one realizes that applying to a given quantum computing system a given quantum circuit may be a complex operation, whereby qubits may have to be moved from one location to another a number of times. This is rendered even more complex when additional limitations, such as hardware limitations, exist.

An example of hardware limitation is that in some quantum computing hardware systems, only some specific locations may permit executing some specific quantum gates. In an example, a location such as location <NUM> is a Laser Interaction Zone or LIZ as illustrated in <FIG> whereas the other locations <NUM>, <NUM>, <NUM> and <NUM> are different locations which do not permit interaction with a laser. As a consequence, in such a system, while any location may permit swapping qubits as illustrated in <FIG>, or moving all qubits present at one location to a neighbor location as illustrated in <FIG>, only specific location such as LIZ location may permit splitting two qubits placed in the LIZ into two neighboring locations, or uniting two qubits into a LIZ location from two neighboring locations. In other words, in some examples a shuttling may comprise locations, whereby each location permits swapping qubits if the location holds two qubits as per <FIG> for example; and/or moving all qubits present at the location to a neighbor empty location as per <FIG> for example. In the same or other examples, the shuttling comprises a specialized location, whereby qubits may be joined into the specialized location from neighboring locations if the specialized location is empty as per the bottom part of <FIG> for example; whereby qubits may be split from the specialized location towards neighboring empty locations as per the top part of <FIG> for example; and whereby qubits located at the specialized location may all be submitted to a quantum gate. Such specific location may be a laser interaction zone, LIZ. In some examples, the specific location comprises <NUM> qubits, and whereby the <NUM> qubits are submitted to more than one quantum gate successively at the specific location, for example in order to limit the movement of qubits while proceeding with the execution of a shuttling.

In some examples, the shuttling comprises locations, whereby each location may either be empty, comprise one qubit, or comprise <NUM> qubits. In some example, the shuttling comprises locations, whereby none of the locations of the shuttling may comprise at a give moment <NUM> qubits or more.

Such example limitations render the compiling particularly complex. It is an objective of the method according to this disclosure to solve issues related to such a complex compiling process.

The method according to this disclosure comprises ordering quantum gates of a nearest neighbor quantum circuit. A nearest neighbor quantum circuit is a quantum circuit for which gates operate on nearest neighbors. A nearest neighbor quantum circuit may be provided as such, or may be produced based on a quantum circuit which applies quantum gates to qubits which may not be nearest neighbors. If a quantum circuit is provided in order to proceed with a method according to this disclosure is not a nearest neighbor quantum circuit, the method may comprise, prior to the ordering, proceeding with SWAP insertion on a source quantum circuit in order to obtain the nearest neighbor quantum circuit. SWAP insertion may for example comprise inserting one or more SWAP quantum gates permitting approximating a qubit to another qubit in order to turn a quantum circuit which comprises quantum gates applied to qubits which are not nearest neighbors into an equivalent nearest neighbor quantum circuit. An equivalent quantum circuit is a quantum circuit which will provide the same final results as a given original quantum circuit. The quantum circuit illustrated in <FIG> comprises quantum gates which applies to qubits which are not nearest neighbors. This is assuming that in <FIG>, q0 has only one nearest neighbor which is q1, q1 has two nearest neighbors being q0 and q2, q2 has two nearest neighbors being q1 and q3, etc..

An example of nearest neighbor quantum circuit is illustrated in <FIG>. As illustrated in <FIG>, the various quantum gates comprised in the quantum circuit are applied to nearest neighbor qubits. In fact, the neighbor quantum circuit is illustrated in <FIG> is equivalent to the quantum circuit of <FIG>, whereby qubits have been swapped to form an equivalent nearest neighbor quantum circuit.

The method according to this disclosure comprises ordering quantum gates of a nearest neighbor quantum circuit in function of dependencies between the quantum gates. Ordering the quantum gates in function of dependencies implies that for example quantum gate <NUM> of <FIG> would come after quantum gate <NUM> of <FIG>, because a given quantum gate which should be applied to a qubit to which a previous quantum gate was applied would be placed after such previous quantum gate. <FIG> illustrates an example of a representation of the dependencies between quantum gates based on the nearest neighbor quantum circuit of <FIG>, in the form of a PERT (Program Evaluation Review Technique) diagram.

The method according to this disclosure comprises ordering quantum gates of a nearest neighbor quantum circuit in function of dependencies between the quantum gates to obtain a quantum gates hierarchical order, the hierarchical order comprising a succession of front lines comprising multiple respective quantum gates of the nearest neighbor quantum circuit. The hierarchical order should be understood as an order to proceed with operating quantum gates when taking dependencies into account. While such a hierarchical order could in very simple cases, form a linear hierarchical order without branching, in most cases the hierarchical order with comprise branching, the branching leading to the possibility to choose between different gates. Such stages in the hierarchical order comprising different choices as to executing a next gate correspond to a front line. Front lines <NUM>-<NUM> comprising multiple respective quantum gates of the nearest quantum circuit are represented in <FIG>.

The method according to this disclosure comprises successively selecting, for each front line, and following the hierarchical order, a shuttling for each respective quantum gate of the front line. An example of shuttling is illustrated in <FIG> represents a starting point illustrating the positioning of <NUM> qubits in a quantum system comprising <NUM> locations, the central location being, in this example, a LIZ location. In this example, let us assume that the qubit represented by trapped ion <NUM> located in location <NUM> should be displaced to the LIZ in order to be submitted to a quantum gate which may only take place in the LIZ location. The shuttling will in this example involve, in a first step, liberating the LIZ by moving qubits <NUM> from location <NUM> to location <NUM> and qubits <NUM> and <NUM> from the LIZ location to location <NUM>. This first step will lead to the situation described in <FIG>. In a second step, leading to <FIG>, the qubit <NUM> will be moved into the LIZ in order to be submitted to the quantum gate concerned.

Another example of shuttling is illustrated in Figured 9D to <NUM>, whereby two qubits which originally were away from the LIZ in <FIG> are moved progressively into the LIZ in <FIG>. This is done by, from <FIG>, moving away <NUM> qubits present in the LIZ, then translating the two qubits which originally were away from the LIZ in <FIG> so they surround the empty LIZ in order to, between <FIG>, join them into the LIZ. In this example, qubits should be isolated as single qubits in opposite neighboring location of the empty LIZ to be brought together into the LIZ. If successive quantum gates may be applied to <NUM> qubits located in a LIZ, such qubits may be maintained in the LIZ.

A further example of shuttling is illustrated in Figured 9D to <NUM>, whereby <NUM> qubits originally together in a LIZ as per <FIG> are split away from the LIZ in <FIG>, whereby such splitting away takes place after emptying the locations being neighbor to the LIZ, in order to proceed with the split. Indeed, in such examples, a qubit may not be placed in a location which is not an empty location.

As mentioned above, a shuttling is selected for each respective quantum gate of the front line. Because each front line comprises multiple respective quantum gates, a choice should be made. Indeed, according to the method hereby described, the shuttling selection is, for each front line, based on a predefined constraint. Such predefined constraint permits selecting in which order of quantum gate shuttling should be built for a given front line. It is indeed an objective of the method according to this disclosure to determine a specific path to build a shuttling corresponding to a quantum circuit when numerous paths are otherwise available.

In other words, if a user is provided with a quantum circuit C and with hardware H corresponding to a quantum computing system, numerous shuttling or shuttling schedule possibilities may exist to implement the quantum circuit using the quantum computing system. If a set <IMG>(H) of all possible shuttling schedules is defined which are equivalent to circuit C taking into account the characteristics or limitations of hardware H, an example resolution of the technical problem may be formulated as solving: <MAT> where function f is a function from <IMG>(H) towards <IMG>. Finding a shuttling schedule close to a global optimal point will be permitted by the method according to the description.

In some examples, the constraint is a dimensional constraint. Using a dimensional constraint may permit taking dimensional limitations of a quantum computing system into account. Dimensional limitations may for example comprise a maximum number of locations. Different quantum systems may have different dimensional constraints. In some examples, the dimensional constraint applies to a trapped ion quantum computer. Example of dimensional constraints which may apply to a trapped ion quantum computer comprises a limited number of locations and a limited number of qubits.

In some examples, the constraint comprises reducing a number of SWAPs. Reducing a number of SWPAs may permit gaining time when proceeding with the execution of a quantum program. Reducing a number of SWAPs should be understood as reducing the number of time where two qubits located on a same location are swapped.

In some examples, the constraint comprises reducing a total distance covered by qubits. Again in this case, an advantage of reducing such distance may lead to a gain of time when executing a compiled quantum program by way of a shuttling according to the methods hereby disclosed. The total distance may be calculated by cumulatively adding all the movements of all the qubits required to complete the execution of a shuttling. In the example of <FIG>, the total distance would be the sum of the distance covered by the qubits which are being moved, i.e. qubits <NUM>, <NUM>, <NUM> and <NUM>. If one would count a move of one qubit from one location to a neighbor location as <NUM>, the distance covered by qubit <NUM> is <NUM> (a move from location <NUM> to the LIZ), the distance covered by qubit <NUM> is <NUM> (a move from location <NUM> to location <NUM>) and each of <NUM> and <NUM> would also move of <NUM> (from the LIZ location to location <NUM>). In <FIG>, the total distance covered by qubits would thereby be of <NUM>. In this example, applying a SWAP gate as illustrated in <FIG> would count <NUM> (zero) as distance. In other words, applying a SWAP gate would not contribute to a total distance calculation.

In some examples, the constraint comprises reducing a total number of successive states of a shuttling schedule, again aiming at reducing the time taken to execute a shuttling schedule. In the example of <FIG>, the shuttling schedule comprises <NUM> states, corresponding to the state of <FIG>, the state of <FIG> and the state of <FIG>. Passing from one state of a shuttling schedule to another may take place in one operation. Operations comprises applying a quantum gate, displacing qubits as a group from one location to a neighbor location in a same direction, even if the qubits pertaining to the group are located on different location (such as qubits <NUM>, <NUM> and <NUM> moved as a group between <FIG>), splitting <NUM> qubits located together on a specialized location to move them onto neighbor locations in opposite directions as per the top part of <FIG>, or joining into a same specialized location <NUM> qubits which were single qubits on opposite neighbor locations of the specialized location as per the bottom part of <FIG>.

One should note that the predefined constraint may comprise a plurality of sub constraints, for example following a rule or priorities. For example, a constraint may comprise a main priority reducing a number of SWAPS, followed by a second priority of reducing a total distance covered by qubits. Following such a predefined constraint permits selecting which quantum gate may be selected for building a shuttling schedule.

In the example PERT diagram illustrated in <FIG> (used in this example by a method according to this disclosure to obtain the shuttling schedule illustrated on <FIG>), the constraint or metric used was to minimize or reduce the total distance. For each front line of the <FIG>, a choice was made according to this constraint. If for example a first qubit is relatively far from the LIZ compared to a second qubit, moving the first qubit to the LIZ is costly (i.e. it increases the total distance). The method should in this case therefore lead to applying the gate acting on qubits closer to the LIZ (since the constraint or metric is to minimize or reduce the total distance.

In the case of front line <NUM>: This front line <NUM> placed after applying SWAP gate <NUM> represented on <FIG>, <FIG> and <FIG>, is used to decide whether the H gate <NUM> (acting on qubit <NUM> as per <FIG> corresponding to the trajectory <NUM> in <FIG>) or the Ctrl-PH gate <NUM> (acting on qubits <NUM> and <NUM> as per <FIG>) is applied. Since the qubit <NUM> (as per <FIG>, corresponding to the trajectory <NUM> in <FIG>) is far from the LIZ (positioned in <FIG> at position <NUM>) as indicated by the partial shuttling schedule (the schedule represented in <FIG> is progressively built, top to bottom, through the methods hereby disclosed - the decision point represented by front line <NUM> being placed directly below applying the SWAP gate <NUM> in <FIG>), applying the Ctrl-PH gate would significantly increase a lot the total distance. The H gate <NUM> is therefore applied instead to qubit <NUM> or qo in <FIG>. In <FIG>, read from left to right, the qubit q0 is first submitted to a H gate, then to a Ctrl-PH(PI/<NUM>) gate together with q1, then swapped with q1 as illustrated by <NUM>. As illustrated in <FIG>, read from top to bottom, the resulting shuttling schedule proceeds with gate <NUM> prior to proceeding with gate <NUM>.

In the case of front line <NUM>, this front line is used to decide whether the phase <NUM> illustrated by <NUM> (Ctrl-PH acting on qubits <NUM> and <NUM>) or the phase <NUM> illustrated by <NUM> (Ctrl-PH acting on qubits <NUM> and <NUM>) is applied. Since no gate has been applied on the qubit <NUM> when this front line <NUM> is met, the qubit <NUM> happens to have been moved away from the LIZ (the LIZ being a high interaction zone, if a qubit is unused, this qubit will be likely have been moved away from the LIZ during earlier steps). Applying first the gate <NUM> phase <NUM> would therefore relatively increase the total distance of the partial schedule and phase <NUM> corresponding to <NUM> is applied instead, as illustrated in <FIG>.

In some examples whereby, prior to the ordering, the method comprises proceeding with SWAP insertion on a source quantum circuit in order to obtain the nearest neighbor quantum circuit, the predefined constraint is also taken into account to proceed with SWAP insertion.

An example quantum computing compiling method <NUM> according to this disclosure is illustrated in <FIG>. In this example, block <NUM> comprises ordering quantum gates of a nearest neighbor quantum circuit in function of dependencies between the quantum gates to obtain a quantum gates hierarchical order, the hierarchical order comprising a succession of front lines comprising multiple respective quantum gates of the nearest neighbor quantum circuit. In this example, block <NUM> comprises successively selecting, for each front line, and following the hierarchical order, a shuttling for each respective quantum gate of the front line. In this example, the shuttling selection is, for each front line, based on a predefined constraint.

Another example quantum computing compiling method <NUM> according to this disclosure is illustrated in <FIG>. In this example, block <NUM> comprises proceeding with SWAP insertion on a source quantum circuit in order to obtain the nearest neighbor quantum circuit prior to ordering, in block <NUM>, quantum gates of a nearest neighbor quantum circuit in function of dependencies between the quantum gates to obtain a quantum gates hierarchical order, the hierarchical order comprising a succession of front lines comprising multiple respective quantum gates of the nearest neighbor quantum circuit. In this example, block <NUM> comprises successively selecting, for each front line, and following the hierarchical order, a shuttling for each respective quantum gate of the front line. In this example, the shuttling selection is, for each front line, based on a predefined constraint.

<FIG> illustrates an example computer system <NUM> comprising a processor <NUM>, a memory <NUM> and a networking module <NUM>, the processor <NUM> being configured to operate according to any of the methods hereby described. Processor <NUM> may comprise electronic circuits for computation managed by an operating system.

<FIG> also illustrates a non-transitory machine-readable or computer readable storage medium, such as, for example, memory or storage unit <NUM>, whereby the non-transitory machine-readable storage medium is encoded with instructions <NUM> executable by a processor such as processor <NUM>, the machine-readable storage medium comprising instructions <NUM> to operate processor <NUM> to perform as per any of the example methods hereby described.

A computer readable storage according to this disclosure may be any electronic, magnetic, optical or other physical storage device that stores executable instructions. The computer readable storage may be, for example, Random Access Memory (RAM), an Electrically Erasable Programmable Read Only Memory (EEPROM), a storage drive, and optical disk, and the like. As described hereby, the computer readable storage may be encoded with executable instructions according to the methods hereby described.

Storage or memory may include any electronic, magnetic, optical or other physical storage device that stores executable instructions as described hereby.

Claim 1:
A computer-implemented trapped ion quantum computing compiling method comprising:
- ordering quantum gates of a nearest neighbor quantum circuit of a trapped ion system, for which the quantum gates operate on nearest neighbor trapped ion qubits, in function of dependencies between the quantum gates to obtain a quantum gates hierarchical order, the hierarchical order comprising a succession of front lines comprising multiple respective quantum gates of the nearest neighbor quantum circuit, the hierarchical order being an order to proceed with operating the quantum gates when taking dependencies into account, the hierarchical order being linear or comprising branchings, each branching comprising different choices as to executing a next gate which corresponds to a respective front line;
- successively selecting, for each front line, and following the hierarchical order, in which order of quantum gates of said front line a shuttling should be built, wherein a shuttling schedule is progressively built from each shuttling selection;
- whereby the shuttling selection is, for each front line, based on a predefined constraint;
- whereby the shuttling schedule describes the movement of trapped ion qubits within the trapped ion system ; and
- implementing the shuttling schedule on a trapped ion computer.