Next Article in Journal
A Model and Quantitative Framework for Evaluating Iterative Steganography
Previous Article in Journal
Fundamental Limits of an Irreversible Heat Engine
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Transpiling Quantum Assembly Language Circuits to a Qudit Form

by
Denis A. Drozhzhin
,
Anastasiia S. Nikolaeva
*,
Evgeniy O. Kiktenko
and
Aleksey K. Fedorov
Laboratory of Quantum Information Technologies, National University of Science and Technology “MISIS”, Moscow 119049, Russia
*
Author to whom correspondence should be addressed.
Entropy 2024, 26(12), 1129; https://doi.org/10.3390/e26121129
Submission received: 7 November 2024 / Revised: 9 December 2024 / Accepted: 19 December 2024 / Published: 23 December 2024
(This article belongs to the Special Issue Quantum Computing with Trapped Ions)

Abstract

:
In this paper, we introduce the workflow for converting qubit circuits represented by Open Quantum Assembly format (OpenQASM, also known as QASM) into the qudit form for execution on qudit hardware and provide a method for translating qudit experiment results back into qubit results. We present the comparison of several qudit transpilation regimes, which differ in decomposition of multicontrolled gates: qubit as ordinary qubit transpilation and execution, qutrit with  d = 3  levels and single qubit in qudit, and ququart with  d = 4  levels and 2 qubits per ququart. We provide several examples of transpiling circuits for trapped ion qudit processors, which demonstrate potential advantages of qudits.

1. Introduction

A digital model of quantum computing relies on performing quantum logical operations under qubits, which are quantum analogs of classical bits allowing superposition states [1,2,3]. It is expected that quantum processors of sufficiently high performance may be superior to classical counterparts in various computational problems [3,4], such as prime factorization [5], optimization [6], and simulating complex (quantum) systems [7,8]. Key building blocks for realizing quantum processors based on various physical platforms, such as superconducting circuits [9,10], semiconductor quantum dots [11,12,13,14], photonic systems [15,16], neutral atoms [17,18,19,20], and trapped ions [21,22,23] have been demonstrated. Although quantum advantage has been shown in several experiments with noisy intermediate-scale quantum (NISQ) devices [9,10,15], finding the path towards large-scale quantum computing remains an open question.
A promising approach to scaling ion-based quantum processors is to use additional levels for encoding quantum information, which is at the heart of the concept of qudit-based quantum processors. Qudit-based quantum information processing has been widely studied both theoretically and experimentally during the last decades [24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63]. Experimental results include demonstrations of qudit processors based on trapped ions [64,65,66,67], superconducting circuits [68,69], and quantum light [61]. Specifically, in the case of trapped ions, high-fidelity control over multilevel systems has been shown [64,65,66,67,70]. Qudits can be used both for storing multiple qubits and for using higher levels as ancillas in the case of the decomposition of multiqubit gates. However, as soon as the majority of algorithms are formulated in the qubit form, in order to use qudits, one needs a procedure for transforming qubit circuits in the qudit form to achieve an advantage in terms of the resulting fidelity.
In this work, we focus on the problem of efficient transforming quantum circuits that are expressed via Quantum Assembly (QASM) format to the qudit form. We focus our attention on this format since QASM is the widely used representation of qubit circuits, and many quantum frameworks can handle QASM code according to the desired algorithm. Frameworks qiskit [71] and cirq [72] are commonly used to implement qubit algorithms and run them on quantum hardware, with the ability to optimize qubit circuits and perform topology-aware multiqubit transpilation. Processing of qudit circuits is also the topic of several research, such as the simulation platform for hybrid quantum systems QuDiet [73], which introduces a special QASM format for qudit execution, or the numerical qudit optimization framework bqskit [74]. The distinguishing feature of our transpilation approach is to take qubit QASM circuit, store qubit into qudits, execute circuit on qudit device, and provide qubit results back to a user. From this perspective, our technique provides a seamless qubit circuit interface to the user and utilizes the benefits of qudits with different dimensionality.
To maximize the potential of qudits to execute qubit circuits, we introduce several key concepts that cannot be reached using earlier developed quantum circuit frameworks. Firstly, in our paper, we introduce the idea of a customizable transpiling process with target device description using runtime. While other frameworks often operate with native gates as unitary matrices to perform numerical optimization [74], our transpiler omits a unitary representation of native gates and relies on analytical decompositions and composition rules in terms of native gates and mathematical expressions. These rules can be defined for any quantum device to use in our transpiler seamlessly. Moreover, we propose to use for these rules the similar QASM description format (analytical formulas in the form of syntactic rules). These facts simplify the process of operating with the transpiler and greatly reduce the computing complexity of transpiling and optimizing qubit circuits.
The second idea is the process of unmapping samples obtained via the qudit quantum computer. Using the qubit-to-qudit mapping from transpiler, one can convert these results back to qubit form. This process provides the opportunity to use qudit quantum hardware or a simulator to run any qubit circuit in QASM form and obtain the circuit’s statistics corresponding to qubits defined in the QASM file.
The third is the idea of efficient multiqubit gate decomposition in terms of qudit gates. Using qudit-based transpilation techniques, we expect to benefit in quantum circuit fidelity due to reducing the number of noisy two-qudit operations. We present a comparison of several qudit execution regimes, whose main difference is in the decomposition of multicontrolled gates: qubit as ordinary qubit transpilation and execution, qutrit with  d = 3  levels and single qubit in qudit, and ququart with  d = 4  levels and 2 qubits per ququart.
The paper is organized as follows. In Section 2, we briefly revise the specification of the QASM format. In Section 3, we discuss basic gates for qudit circuit construction. In Section 4, we consider the trapped ion qudit quantum processor as a concrete example of a hardware platform for the transpilation process and provide a description of JSON format for the record of the qudit circuit. In Section 5, we present a developed general transpilation workflow and a concrete realization of transpilation methods for input QASM circuits, which allows one to obtain implementable on a hardware qudit circuit for ion qudits with  d = 3  and  d = 4  levels. In Section 6, we benchmark a transpiler developed on widely used quantum algorithms and compare its different regimes with a qubit qiskit transpiler and between each other. Finally, we conclude this paper in Section 7.

2. Quantum Circuits in the QASM Format

The QASM format [75] is a widely used format for writing qubit quantum circuits in gate-based model in a text form. QASM format could be generated using one of the quantum computing frameworks (e.g., qiskit [71]), from user-defined logic or could be written manually. It is allowed due to the syntactical and semantic simplicity of the QASM representation, which consists of gates, measures, and barrier operations along with their conditional variants. This set of operations is sufficient for quantum program execution on real hardware or on a simulator.
QASM was designed to formalize quantum computations and fully describe quantum circuits. A QASM file is composed of a series of instructions, each of which represents a specific operation that is to be executed on the hardware (see Appendix A).
QASM format does not specify what type of quantum system it uses: qubit or qudit. Although all qubit operations can be expressed using QASM, certain qudit operations may not be expressible due to the lack of a suitable description for the level structure and operations associated with qudits. So, in our experiments, we use the QASM format for qubit quantum circuits, which describe the quantum logic of a program, and as input to the transpiler, which converts QASM circuit into qudit form for further execution on qudit hardware. We also provide JSON format specification for qudit circuit description in Section 4.

3. Qudit Circuits

By analogy with qubit-based quantum computing, one can implement quantum circuits with d-level quantum systems, qudits. On the existing qudit-based hardware, single-qudit operation  U d i j , which acts on a d-level qudit, is usually implemented as a unitary  2 × 2  matrix acting on a linear span of i-th and j-th levels (see an example for a trapped ion platform [64,65] and for a superconducting platform [69]). Single-qudit operation  U d i j  can be defined with the use of a qudit extension of Pauli matrices  σ x i j σ y i j  and  σ z i j , acting on i-th and j-th levels, that are the analogs to the qubit Pauli matrices extended with zeroes:
σ x i j = | j i | + | i j | , σ y i j = i | j i | i | i j | , σ z i j = | i i | | j j | ,
where  i , j { 0 , , d 1 } ; d is the number of levels in the qudit; and  i  stands for an imaginary unit. These matrices satisfy the following relations:
σ a i j σ b i j a , b { x , y , z } = ε i j if a = b , σ b i j σ a i j otherwise ,
where  ε i j = | i i | + | j j |  is the identity matrix acting on i-th and j-th levels.
Single-qudit native operations for a trapped ion and a superconducting platform are defined as a rotation with two angle parameters  θ  and  ϕ . Parameter  θ  specifies the angle of rotation that is determined by pulse length in a qudit system. Parameter  ϕ  specifies the axis of rotation in the  X Y  plane within the Bloch sphere. Using a qudit extension of Pauli matrices, we can obtain a matrix representation for a single-qudit operation  R i j :
R i j ( θ , ϕ ) = exp i θ σ ϕ i j ,
where
σ ϕ i j = cos ϕ σ x i j + sin ϕ σ y i j ,
and the following symmetry relations are fulfilled:
R i j ( θ , ϕ ) = R i j ( θ , ϕ ) ,
R j i ( θ , ϕ ) = R i j ( θ , ϕ ) ,
R i j ( θ , ϕ ) = R i j ( θ , ϕ ± π ) ,
R i j ( θ + 2 π n , ϕ ) = R i j ( θ , ϕ ) ,
R i j ( θ , ϕ + 2 π m ) = R i j ( θ , ϕ ) ,
where the arbitrary integers are n and m.
We note that we define  R i j  gate without  1 2  factor to preserve  2 π  periodicity for all parameters. However, typical definitions of single-qubit gate  R qb  and single-qudit gate  R qd i j  depend on the  θ 2  parameter:
R qb ( θ , ϕ ) = exp i θ 2 σ x ,
R qd i j ( θ , ϕ ) = exp i θ 2 σ ϕ i j .
While the qubit operation satisfies the relation  R qb ( θ + 2 π , ϕ ) = R qb ( θ , ϕ )  and, therefore, two operations become equivalent up to global phase factor  1 , the qudit  R qd i j  operation does not hold this equivalence:
R qd i j ( θ + 2 π , ϕ ) = E i j ε i j cos θ 2 + i σ ϕ i j sin θ 2 ,
R qd i j ( θ + 2 π , ϕ ) + R qd i j ( θ , ϕ ) = 2 E i j ,
where
E i j = k i , j | k k | = Id ε i j
and  Id  is an identity matrix.
Along with  R i j  operation, qudit devices provide the possibility to apply a phase operation  Ph i  and Z rotation  RZ i j , which can be often implemented virtually (see [67] for the trapped ions and [69] for the superconducting platform), and hence, does not contribute to generating errors:
Ph i ( θ ) = exp i θ ε i = E i + e i θ ε i ,
RZ i j ( θ ) = exp i θ σ z i j = E i j + e i θ ε i + e i θ ε j .
Another crucial type of operation for quantum computations is entangling a two-qudit gate. The specific form of two-qudit operations varies depending on the physical platform considered. In theoretical papers, two-qudit  CZ i | j  and  C X i | j k  gates are commonly considered:
CZ i | j : | i , j | i , j , | x , y | x , y i f   x i or y j ,
CX i | j k : | i , j | i , k , | i , k | i , j , | x , y | x , y i f   x i or y j , k .
However, trapped ion qudit-based quantum computers operate with a Mølmer–Sørensen gate [76 XX i j | k l :
XX i j | k l ( θ ) = exp i θ σ x i j σ x k l ,
where the pairs of levels  i , j  and  k , l  refer to the first and second qubits, respectively. Within superconducting processors, an iSWAP gate of the following form can be typically implemented:
iSWAP i j | k l ( θ ) : | i , k e l θ | j , l , | j , l e l θ | i , k , .
Notably, a real quantum device implies selection rules, which determine allowed level pairs for single-qudit and two-qudit gates. We define a  SWAP i j  operation between levels i and j as  R i j ( π 2 , π 2 )  to solve the issue. Effectively, it swaps the population between i-th and j-th levels, allowing us to decompose any  R i j  into the sequence of allowed swaps and transitions. For any i, j and s, the following identity holds:
G n i = SWAP n i s G n s SWAP n s i ,
where  G n j  is the pattern for operation that involves the i-th level in n-th qudit in register, e.g.,  R n i · XX n · i · · · XX · n · · i · , etc., and ∘ denotes the operations’ composition, where operations are applied in a left-to-right order. Also, for this decomposition to be valid, the operation pattern  G n j  cannot involve an s-th level. For example, for  XX  gate, the level swap is performed as follows:
XX n | m i j | k l ( θ ) = SWAP n i s Id m XX n | m s j | k l ( θ ) SWAP n s i Id m .

4. Trapped Ion Qudit Quantum Computer

As a concrete example of a qudit device for the transpilation process, we consider the trapped ion qudit-based processor developed in Refs. [65,67]. The authors implemented qudit-trapped ion computations (in this work, we consider at most  d = 4 ) using the  R ion 0 i Ph ion i  and  XX ion 01 | 01  native gate set. These gates are equivalent to the defined ones in the previous section with parameter modifications:
Ph ion i ( θ ) = Ph i ( θ ) , R ion 0 i ( θ , ϕ ) = R 0 i ( θ 2 , ϕ ) , XX ion 01 | 01 ( θ ) = XX 01 | 01 ( θ ) .
Considering the allowed level transitions for  Yb + 171  ion qudits and Equation (21), it is possible to decompose any sequence of qudit operations  Ph i R i j  and  XX i j | k l  into the sequence of ion native gates  Ph ion i R ion 0 i  and  XX ion 01 | 01  [63].
Operations  Ph ion i R ion 0 i  and  XX ion 01 | 01  on allowed levels are stored in an ion quantum computer description format (see Appendix B).

5. Qasm-to-Qudit Form Transpilation

In our model, qudit circuits can only be constructed with the native gate set for a given quantum device. Native gates are the operations physically allowed on the device, and, usually, a set of native gates contains single-particle and two-particle operations. On the other hand, QASM is a more general quantum circuit description format. It can represent not only a sequence of physical gates but rather quantum logic for this circuit with, for example,  U ( θ , ϕ , λ )  and controlled  CX  or multiqubit Toffoli operations. Hence, in some cases, even qubit circuits in QASM format could not be executed on the device as is.
The transpiler aims to bridge the gap between high-level software and hardware representations of a circuit and to facilitate the process of translating QASM code into a qudit circuit. We divide the transpilation process into three steps, as depicted in Figure 1: qubit transpilation, qubit–qudit transpilation (or qudit transpilation, which is performed according to qubit-to-qudit mapping), and qudit circuit optimization. At the end of transpilation, an optimized qudit circuit can be stored in a format suitable for execution on the target device.
In the first step, the ‘pure’ qubit transpilation takes place. It parses QASM code into an abstract syntax tree, which is used as a circuit representation within the transpiler, and converts a sequence of logical quantum gates into a native gate set using decompositions of the most used gates (e.g.,  U ( θ , ϕ , λ ) CX MCX , etc.). This process is divided into two phases: preprocessor and optimizer. Each phase could be tuned according to the chosen target device.
At the first phase, the preprocessor performs parsing and checking the semantics of the QASM file. Any encountered error in source code is supplemented with a descriptive error message and the line number and position to refer to it in source code. Next, it expands all QASM gates into the native gate set for the device using the provided qelib1.inc file, which consists of many applied gate declarations according to OpenQASM 2.0 standard. After the preprocessor phase, the user obtains a sequence of native qubit gates. Here, the optimizer could be enabled to reduce the number of operations and produce an equivalent gate sequence.
At the second phase, the optimizer undergoes the subsequences of gates from the source circuit and tries to match them with a predefined set of symmetry relations and gate contraction rules, which can be defined in a separate matcher file matcher.script. The matcher file represents the set of rules in the form of mathematical expressions that can be derived from target device operations’ relations. Due to such a form, this file can be written by developers and scientists for a given device without using a matrix representation of the native gate.
Along with the native gate set, the file with gate declarations qelib1.inc and rule set matcher.script represent the runtime for the given target device. We describe the content of qelib1.inc and matcher.script more precisely in Appendix C. For now, the transpiler supports one of the following runtimes and corresponding native gate sets:
  • Quantum emulator:
    U , CX .
  • Trapped ion quantum computer:
    RZ , R , XX .
  • Trapped ion intermediate representation:
    RZ , R , CZ , MCZ .
where n, m and other lower indices denote qubits (or qudits) where the operation acts on. Quantum emulator and trapped ion quantum computer runtimes are suitable for the case of qubit execution. Trapped ion intermediate representation is the special runtime, which should not resemble any quantum hardware or quantum simulator. However, this runtime produces a qubit circuit with an extended gate set and passes it into the following step. This extended circuit represents an intermediate format that allows the transpiler to choose a qudit decomposition for  RZ R  and  CZ  for a given type of qudit.
Another point of introducing this runtime is that it contains decompositions for multiqubit gates (e.g., Fredkin  CSWAP  or multicontrolled Toffoli  MCX ) in terms of  MCZ  gates. For many qudit parameters, this gate has special form in the qudit circuit that will arise during the second step of transpilation. The resulting qudit circuit will only contain  XX i j | k l  gates as two-qudit operations. Additionally, the qudit optimization step could be enabled to reduce the length of the qudit sequence of gates. Qudit optimization rules are described in the third step of the transpiler.
In the second step, the transpiler uses a qubit circuit transpiled with a trapped ion intermediate representation runtime from the first step to produce a qudit circuit. Along with the number of parameter of levels in qudit d, it uses a parameter b that defines how many qubits from the original circuit can be embedded in each qudit from the generated qudit circuit. Qudit, containing at least  2 b  levels, is able to represent qubit register with b qubits by placing register states on  2 b  qubit levels. If the number of levels is  d > 2 b , then the remaining levels are considered as ancillary. An example of qudit structure is presented in Figure 2. Qubits ( d = 2 ) or qutrits ( d = 3 ) can only store a single qubit, whereas ququarts ( d = 4 ) can store one or two qubits.
To store all qubits from the QASM circuit into qudits, the transpiler produces a qubit–qudit mapping. The result is two sets of indices  Q n  and  I n  for any qubit index  n { 0 , 1 , , N 1 } , where N is the size of the register in the original circuit:  Q n  stands for qudit index in the qudit register and  I n { 0 , 1 , , b 1 }  stands for a qubit index within a single qudit. The current implementation of the transpiler assigns indices in a straightforward manner, as shown in Figure 3 Q n : = n / b  and  I n : = n mod b . Although the straightforward mapping is sufficient for qubit and qutrit transpilation, it may produce a less efficient ququart circuit. In this case, users can specify custom mapping based on their circuit. The aspect of proper mapping will be discussed in Section 6. Also, it is intended to develop an algorithm that uses heuristics to generate proper mapping that minimizes the number of two-qudit gates in the resulting circuit [77].
These indices are used to convert the qubit circuit into qudit operations. Single-qubit gates for the case  b = 1  (implies  n : I n = 0 ) are mapped as
R n ( θ , ϕ ) R Q n 01 ( θ , ϕ ) ,
RZ n ( θ ) Ph Q n 1 ( θ ) .
For  b > 1 , the transpiler decomposes  R  and  RZ , considering the position of the qubit within a single qudit ( I n  index). This decomposition consists of  2 b 1  qudit gates  R i j  and  Ph k , respectively. Levels i, j and k are obtained explicitly from the  I n  index of a qubit. For example, for  b = 2 ,
R n ( θ , ϕ ) R Q n 01 ( θ , ϕ ) R Q n 23 ( θ , ϕ ) if I n = 0 , R Q n 02 ( θ , ϕ ) R Q n 13 ( θ , ϕ ) if I n = 1 ,
RZ n ( θ ) Ph Q n 1 ( θ ) Ph Q n 3 ( θ ) if I n = 0 , Ph Q n 2 ( θ ) Ph Q n 3 ( θ ) if I n = 1 .
Notably, decompositions of multiqubit gates can benefit for some qudit parameters d and b. For this case, we used a special trapped ion intermediate representation runtime in the first stage on qudit transpilation. With this runtime, we obtained an optimized circuit that contains multiqubit  MCZ  gates, and in the second stage, we utilized these gates to produce the efficient decomposition using different values for transpilation parameters d and b. In our paper, we focus on several cases of qudit transpilation.
The first case is that of qutrits ( d = 3 ) or ququarts ( d = 4 ) with  b = 1 , having a special  MCZ  gate decomposition [62], which efficiently uses higher levels and produces a sequence of  2 N 3 O N XX 01 | 01  operations, whereas a straightforward qubit algorithm [78] will require  O 2 N CX / CZ  operations or  O N  operations with  O N  ancillary qubits (here, N is the number of qubits involved).
The second case is that of qudits with  b > 1  and  d = 2 b . In this case, all levels are occupied by qubits, thus no ancillary levels can be used.  MCZ  gates can be represented in terms of  CZ  gates using standard qubit decomposition. However, some of the operations will end up acting on two qubits in a single qudit, and hence, will be decomposed into  Ph m  gate instead of  XX i j | k l  for qubits in different qudits [79]. Considering the matrix representation of  CZ , the following definition for a two-qudit gate is obtained:
CZ n m Ph Q n 3 ( π ) if Q n = Q m XX Q n Q m i 3 | j 3 ( π ) if Q n Q m
where  i = 2 I n  and  j = 2 I m .
Due to the permutation symmetry of  MCZ  gate, we can virtually swap qubits to obtain an efficient circuit. There is no issue in the case of qubit transpilation; however, for many qudit cases, it can minimize the amount of qudit  XX  gates in template decomposition. The analysis of qubit permutations in  MCZ  for qudits will be considered in future works.
The third step of transpilation consists of optimizing the qudit circuit according to the allowed level transitions and the production of the qudit circuit descriptor for execution, as described in Section 4. The circuit after the second step consists of qudit operations  Ph i R i j  and  XX i j | k l , while the trapped ion computer accepts operations with specific transition levels only. The transpiler uses level swap operations  SWAP i j  from Equation (21) whenever possible and keeps only the operations allowed by a selection rule:
G n i SWAP n i s G n s SWAP n s i ,
G n i { R n i · ( · i ) , XX n · i · | · · ( · i | · · ) , XX · | n · · | i · ( · · | · i ) } ,
where  G n i  is a pattern for operation acting at the i-th level in the n-th qudit. Using this rule, the transpiler is able to convert any  R i j  or  XX i j | k l  operation into the sequence of allowed transitions for a given adjacency graph between levels in a given qudit device.
Along with the conversion of the allowed operations, the transpiler optimizes the resulting qudit circuit. Although most initial gates from QASM are already optimized during qubit transpilation, the circuit has the potential for optimization after applying level swaps and  MCZ  gate decompositions. This optimization step differs from qubit optimization due to more specific matching rules. They include combinations of rotations and removing operations that are non-affecting on measurement results  Ph i θ :
Ph i θ 1 Ph i θ 2 Ph i θ 1 + θ 2
Ph i ( 2 n π ) Id
R i j θ 1 , ϕ R i j θ 2 , ϕ R i j θ 1 + θ 2 , ϕ
R j i ( θ , ϕ ) R i j ( θ , ϕ )
R i j ( 2 n π , ϕ ) Id
XX i j k l θ 1 XX i j k l θ 2 XX i j k l θ 1 + θ 2
XX i j k l ( 2 n π ) Id
Rules are designed to preserve the unitary matrix of the circuit, to reduce the amount of  R i j  and  XX i j | k l  operations and to try to move  Ph i  to the end of the circuit. The last is used to remove trailing phases since they are not affecting measuring in computational Z-basis. Yet this step doesn’t preserve unitary matrix of the circuit and is considered optional.
At the end, the transpiler is able to produce a qudit circuit in the format presented in Section 3. Since this format supports several circuits in a single JSON file, all input QASM files are placed into a single output file.
Notably, qudit circuits and qudit computers operate with qudits and dits (classical numbers  0 , 1 , , d 1 ), rather than qubits and bits. This fact leads to the problem of unmapping qudit experiment samples into qubit results. Given qudit computer execution output is an array of qudit states and samples counts, we only have to convert qudit states into qubit states using the mapping.
Qudit state is represented either as an array of numbers (e.g., [0, 1, 2, 1, 2]), or as a string (e.g., “01212”). Firstly, since each qudit consists of b qubits, dits  0 , 1 , , 2 b 1  are the only values that should be observed in an experiment. Although other dits with values  2 b  are still can be sampled, they are considered as an error and can be excluded from qubit samples (strict mode) as shown in Figure 4. The other way to handle higher dits is to interpret them as the highest allowed level  2 b 1  (non-strict mode). Secondly, dits can be converted into binary representation (0“000”, 1“001”, etc.), where each bit corresponds to one of the qubit from the original circuit. The index of the qubit can be obtained by inverting qubit-to-quqit mapping, using indices  Q n  and  I n . For each dit at position Q from the sampling and for each bit within dit I, we find a qubit index n such that  Q = Q n  and  I = I n . In strict mode, if there is no qubit n we assert that I-th bit in Q-th dit is 0, which is possible if there are empty places for qubits in the mapping. Otherwise, in non-strict mode, we just ignore bits not in the mapping and set them to 0. This is equivalent to a partial trace of qudit state over the valid qubit states. Transpiler steps with qubit-to-qudit mapping, along with qudit samples post-processing (unmapping), represent the main part of the workflow qubit circuit execution on qudit-based hardware (Figure 5). In total, any hardware-agnostic QASM circuit serves as an input to this workflow, with the possibility of using custom qubit-to-quqit mapping. After the workflow execution, we obtain qubit results that can be matched with our input circuit. This approach was introduced in [77] and developed in this paper.

6. Comparison of Transpilation Approaches

To benchmark developed transpiler techniques, in Table 1, we provide a comparison of output circuits for different commonly used cases and different transpiler options that include optimization, qudit level count d, and qubits per qudit parameter b. The With optimization column implies all optimization techniques from Section 5, whereas Without optimization column only decomposes the QASM circuit into  I q c C i r c u i t .  Moreover, we used the Qiskit [71] quantum computing framework using  q i s k i t . q a s m 2 . l o a d  and  q i s k i t . t r a n s p i l e  functions that convert the QASM circuit to a native gate set for a given target and perform optimizations. In our case, this was for the trapped ion quantum computer with native gates  RZ R  and  XX . However, to our knowledge, the Qiskit framework is not able to produce qudit circuits. So, it can only be compared with the developed transpiler with parameters  d = 2  and  b = 1 , which is equivalent to the qubit transpilation.
We choose the following list of circuits for a comparison of different transpilation regimes:
  • Bernstein–Vazirani algorithm:
    The identification of  101 2  binary string on 3 qubits and 1 ancillary qubit;
    The identification of  10101 2  binary string on 5 qubits and 1 ancillary qubit.
  • Grover algorithm:
    Finding  000 2  binary string on 3 qubits and 1 ancillary qubit;
    Finding  0000 2  binary string on 4 qubits and 1 ancillary qubit.
  • Swap test:
    Orthogonal qubit states on 3 qubits;
    Orthogonal 2-qubits states on 5 qubits.
These input qubit circuits have a representation in QASM format, which is the same for every regime:
  • qiskit q i s k i t . q a s m 2 . l o a d q i s k i t . t r a n s p i l e  with trapped-ion basic gates;
  • qubit: level count  d = 2 , qubits per qudit  b = 1 ;
  • qutrit: level count  d = 3 , qubits per qudit  b = 1 ;
  • ququart: level count  d = 4 , qubits per qudit  b = 2 .
We note that the qiskit regime is only shown as optimized since  q i s k i t . t r a n s p i l e  always optimizes the input circuit.
Firstly, the effect of circuit optimization can be clearly observed. For every circuit from the list, an optimization pass reduces the number of  R  gates at least by 41%. Furthermore, some cases have a reduction of up to 79% in gate amount in the case of Grover’s algorithm for qubit regime. Notably, the whole circuit can be optimized if the optimizer decides that it is equivalent to the  Id  operation. In these experiments, we did not use barriers in the circuits.
Secondly, our transpiler shows better output (in terms of the amount of  R  gates) than the  q i s k i t . t r a n s p i l e  function. However, this result is obtained by the increased number of  RZ  gates in an output circuit. However, regarding the fact that  RZ  gates are implemented virtually on qudit quantum computer, our optimization results can be considered more effective.
Thirdly, qutrit and ququart regimes can also optimize the amount of  XX  gates. This result has more impact since two-qudit gates are more subjected to errors than single-qudit gates. This effect takes place in circuits with a large number of qubits. However, the single-qudit gate amount for these regimes is much greater than the qubit amount. This is due to our optimization workflow that only optimizes gates on the same levels, but the circuit can contain gates on all pairs of levels. One can consider a simplistic approach to choosing a preferable regime for running a circuit. Given estimates of single-qubit and two-qubit gate errors ( e 1 b  and  e 2 b ), as well as single-qudit and two-qudit gate errors ( e 1 d  and  e 2 d ), the resulting errors in a qubit-based and qudit-based circuit can be approximately upper-bounded as
E b = e 1 b N 1 b + e 2 b N 2 b , E d = e 1 d N 1 d + e 2 d N 2 d ,
where  N 1 b ( d )  and  N 2 b ( d )  are the numbers of single-qubit (qudit) and two-qubit (qudit) gates correspondingly. Comparing  E b  and  E b  can help one to choose the best way to run the circuit on the available hardware. We note that  N 1 b ( d )  can be calculated without including virtual phase gates. We also note that, due to the mentioned fact that the optimization workflow optimizes gates at the same level, but a circuit may contain gates between all pairs of levels, the idea of whole qudit optimization arises. This can decompose any sequence of operations or a general single-qudit unitary matrix into the most optimal sequence in terms of the number of  R  gate amount, as was conducted in [80].
It is worth noting that the performance of the ququart regime is significantly influenced by the qubit-to-qudit mapping. Specifically, the way in which qubits are distributed among qudits has a significant impact on the resulting number of entangling gates. Within a straightforward mapping, for example, three qubits that are affected by the Fredkin  CSWAP  gate in the Swap test (2 qubit states) algorithm are placed in separate ququarts, resulting in 16  XX  gates in the qudit circuit. However, with a more carefully designed mapping, it is possible to store two of these qubits in a single ququart, reducing the number of  XX  gates to 8. This example demonstrates that different mappings can lead to better or worse results than the qubit regime. Therefore, finding an optimal mapping for a particular circuit is crucial when running a qubit circuit on a qudit platform.

7. Conclusions

In this paper, we provided the general workflow for converting qubit QASM circuits into qudit circuits and compared transpilation for different regimes. With different values for parameters d (dimension of qudit) and b (qubit count in a single qudit), the transpiler uses different decomposition approaches and produces a qudit circuit, which can be executed on a quantum computer with qudit dimension  d . Parameters d and b should be chosen reasonably for a given problem. The first example is that circuits with a high arity of  MCX / MCZ  gates benefit from the qutrit regime since it decomposes a multiqubit gate into  2 N 3  two-qudit operations, whereas qubit decomposition has at least  O N  two-qudit gates. The second example is circuits with distinct pairs of qubits with a high weight of interconnection (amount of two-qubit gates) within a pair and low interconnection between pairs. Using the ququart regime and an appropriate qubit-to-qudit mapping can greatly reduce the amount of two-qudit gates compared to the qubit regime, although optimal mapping could be performed automatically (locally for each  MCZ  and globally for a whole circuit). Since naive mapping optimization via finding the best qubit permutation requires  O N ! , we leave the nearly optimal mapping finding feature to future versions of the transpiler.
We also consider qudit circuit optimization that reduces qudit gate amount in the resulting circuit. For different regimes, the reducing factor is in the range of 40% to 80%. Optimization routine accounts allowed transitions for  R  and  XX  gates for a given target qudit system. However, current optimization can be further improved to produce the most optimal output. This is the main focus for future work.

Author Contributions

Conceptualization, A.S.N.; Methodology, E.O.K.; Software, D.A.D.; Validation, E.O.K.; Investigation, D.A.D.; Writing—original draft, D.A.D. and A.S.N.; Writing—review & editing, E.O.K. and A.K.F.; Supervision, A.S.N. and A.K.F.; Funding acquisition, A.K.F. All authors have read and agreed to the published version of the manuscript.

Funding

The work of D.A.D. and A.S.N. was supported by RSF Grant No. 24-71-00084 (developing data post-processing methods for qudit-based architectures). E.O.K. and A.K.F. acknowledge support from the Priority 2030 program at the NIST “MISIS” under the project K1-2022-027.

Institutional Review Board Statement

Not applicable.

Data Availability Statement

Data are contained within the article.

Conflicts of Interest

The authors declare no conflicts of interest.

Appendix A. QASM Format Instructions

Open Quantum Assembly format [75] is commonly used for quantum circuit description. It allows us to represent a circuit as a sequence of instructions.
Quantum and classical register declarations. These instructions define the use of qubits and classical bits in the following circuit: Users can specify them by the register name and register size:
  • Quantum register qreg q[N];
  • Classical register creg c[M].
Quantum operations’ definitions and declarations. These statements describe which gates can be used in the circuit and define their parameters. opaque operation states that a gate is already presented on the target device, and gate operation defines gate decomposition in terms of previously defined gates and opaque operations. Typically, all useful quantum gates are defined in "qelib1.inc":
  • Gate definition gate U(a, b, c) q {…}
  • Gate declaration opaque U(a, b, c) q.
Apply gate instruction. With predefined quantum registers and gates, users are able to construct a circuit by applying a gate to a qubit or a set of qubits:
  • X q[0]; U(0.0, 1.0, 2.0) q[2];
  • CX q[0], q[1].
Barrier statement. Special barrier statement does nothing in a quantum circuit and prevents an optimization by gate merging:
  • barrier q[0], q[2];
Reset statement. Collapses qubit state and sets it to  | 0 :
  • reset q[0].
Measure statement. Performs a measurement of qubit and places its result (0 or 1) in a classical bit. At the end of experiments, users should measure qubits and store results in classical bits since QASM semantics states that quantum computer should produce samples according to measured classical bits:
  • measure q[0] -> c[0].
Conditional statement. Determines whether the inner statement runs according to value in a classical bit:
  • if (c[0] == 1) X q[0];
  • if (c[0] == 1) reset q[0].

Appendix B. Ion Quantum Computer Circuit Description Format

Qudit circuits for an ion quantum computer can be written as a JSON file containing an array of objects:
I q c J s o n F o r m a t = I q c C i r c u i t [ ]
Each object  I q c C i r c u i t  represents a single circuit to execute; hence, it is allowed to describe and execute several circuits in a single file. Circuit contains information, which could be used to execute qudit circuit:
I q c C i r c u i t = { " r e p e t i t i o n s " : i n t e g e r , " l e v e l s " : i n t e g e r , " s e q u e n c e " : I q c O p e r a t i o n [ ] }
where  " r e p e t i t i o n s "  parameter denotes the number of shots to collect circuit’s statistics,  " l e v e l s "  denotes qudit level count d and  " s e q u e n c e "  represents the sequence of qudit operations itself.
Operation  I q c O p e r a t i o n  is equivalent to one of the qudit gates given by Equation (23) with the given angles and levels parameters:
I q c O p e r a t i o n = I q c P h G a t e | I q c R G a t e | I q c X X G a t e
I q c P h G a t e = { " t y p e " : " R z " , " a n g l e " : f l o a t , " u p p e r _ s t a t e " : i n t e g e r , " q u d i t " : i n t e g e r }
I q c R G a t e = { " t y p e " : " R p h i " , " a n g l e " : f l o a t , " a x i s " : f l o a t , " u p p e r _ s t a t e " : i n t e g e r , " q u d i t " : i n t e g e r }
I q c X X G a t e = { " t y p e " : " X X " , " a n g l e " : f l o a t , " u p p e r _ s t a t e " : i n t e g e r , " q u d i t s " : i n t e g e r [ ] }
where  " a n g l e "  and  " a x i s "  parameters represent  θ  and  ϕ  from Equation (23), respectively; divided by  π " u p p e r _ s t a t e "  stands for level i with the exception of  I q c X X G a t e , where  " u p p e r _ s t a t e " : 1  is the only supported level.  " q u d i t "  and  " q u d i t s "  are the numbers of qudqudits on which the given operation is acting.

Appendix C. Transpiler’s Runtime Description: qelib1.inc and matcher.script

qelib1.inc is the standard included file from the QASM specification. It has the purpose of storing all definitions of gates ( o p a q u e  or  g a t e  instructions), which can be used to construct quantum circuits. There is no regregulation on how to define a native gate set in QASM, yet we use the following notations:
  • o p a q u e —Declares gate without definition. We consider these declarations as native gates of the given device.
  • g a t e —Defines gate in terms of previously declared gates. This can be any gate ( U CX , Toffoli, Fredking).
Transpile uses this notation in the first phase of the qubit transpilation step. Any gate call in the QASM file that it sees is either opaque or  g a t e . Each  g a t e  is decomposed into the sequence of gate calls. This process runs until there are only  o p a q u e  gates (also known as native gates) in the circuit.
Our qelib1.inc for trapped ion intermediate representation is depicted in Figure A1.
The matcher.script file is the extension to a target device description that is used in the optimization phase of qubit transpilation as the list of optimization rules. Each rule has one of the following properties:
  • Reducing sequence length:
    RZ ( θ 1 ) RZ ( θ 2 ) RZ ( θ 1 + θ 2 ) .
  • Replacing complex gates with simpler equivalent sequences:
    R ( θ 1 , ϕ 1 ) R ( θ 2 , ϕ 2 ) R ( θ , ϕ ) RZ ( θ ) .
  • Replacing gate parameters according to symmetries:
    R ( θ + 4 π , ϕ ) R ( θ , ϕ ) R ( 0 , ϕ ) Id .
  • Preserving some ordering in a sequence (in this case, the transpiler will try to move  RZ  to the end of the circuit):
    RZ ( φ ) R ( θ , ϕ ) R ( θ , ϕ φ ) RZ ( φ )
    but not
    R ( θ , ϕ ) RZ ( φ ) RZ ( φ ) R ( θ , ϕ + φ ) .
Figure A1. Examples of gate definitions from trapped ion intermediate representation runtime. Native gates for this runtime are labeled with opaque keyword.
Figure A1. Examples of gate definitions from trapped ion intermediate representation runtime. Native gates for this runtime are labeled with opaque keyword.
Entropy 26 01129 g0a1
To implement these rules in matcher.script, we defined a special description language, similar to C and QASM. Examples of the rules are depicted in Figure A2.
The transpiler operates with the circuit pattern, which is a sequence of gates acting on the same set of qubits. In matcher.script, it is represented as a composition of gates using the bullet “.” operator. For example, “ r z ( a )   x   .   c z   x , y ”, where  r z  and  c z  are native gates from selected runtime, x and y are qubit patterns and a is a parameter pattern. The matcher goes through each subsequence of gates in the original circuit and tries to find rules to apply and acquire actual values for qubit and parameter patterns. With these values, the matcher runs a code block from the source code and obtains a new sequence of gates via the  r e t u r n  instruction. The returned value is also a composition of gates using bullet. However, all the qubits and parameters already have concrete values.
Figure A2. Examples of optimization rules from trapped ion intermediate representation runtime.
Figure A2. Examples of optimization rules from trapped ion intermediate representation runtime.
Entropy 26 01129 g0a2

References

  1. Brassard, G.; Chuang, I.; Lloyd, S.; Monroe, C. Quantum computing. Proc. Natl. Acad. Sci. USA 1998, 95, 11032–11033. [Google Scholar] [CrossRef]
  2. Ladd, T.D.; Jelezko, F.; Laflamme, R.; Nakamura, Y.; Monroe, C.; O’Brien, J.L. Quantum computers. Nature 2010, 464, 45–53. [Google Scholar] [CrossRef]
  3. Fedorov, A.K.; Gisin, N.; Beloussov, S.M.; Lvovsky, A.I. Quantum computing at the quantum advantage threshold: A down-to-business review. arXiv 2022, arXiv:2203.17181. [Google Scholar] [CrossRef]
  4. Scholten, T.L.; Williams, C.J.; Moody, D.; Mosca, M.; Hurley, W.; Zeng, W.J.; Troyer, M.; Gambetta, J.M. Assessing the Benefits and Risks of Quantum Computers. arXiv 2024, arXiv:2401.16317. [Google Scholar] [CrossRef]
  5. Shor, P. Algorithms for quantum computation: Discrete logarithms and factoring. In Proceedings of the Proceedings 35th Annual Symposium on Foundations of Computer Science, Santa Fe, NM, USA, 20–22 November 1994; pp. 124–134. [Google Scholar] [CrossRef]
  6. Blekos, K.; Brand, D.; Ceschini, A.; Chou, C.H.; Li, R.H.; Pandya, K.; Summer, A. A Review on Quantum Approximate Optimization Algorithm and its Variants. arXiv 2023, arXiv:2306.09198. [Google Scholar] [CrossRef]
  7. Lloyd, S. Universal Quantum Simulators. Science 1996, 273, 1073–1078. [Google Scholar] [CrossRef]
  8. Daley, A.J.; Bloch, I.; Kokail, C.; Flannigan, S.; Pearson, N.; Troyer, M.; Zoller, P. Practical quantum advantage in quantum simulation. Nature 2022, 607, 667–676. [Google Scholar] [CrossRef]
  9. Arute, F.; Arya, K.; Babbush, R.; Bacon, D.; Bardin, J.C.; Barends, R.; Biswas, R.; Boixo, S.; Brandao, F.G.S.L.; Buell, D.A.; et al. Quantum supremacy using a programmable superconducting processor. Nature 2019, 574, 505–510. [Google Scholar] [CrossRef]
  10. Wu, Y.; Bao, W.S.; Cao, S.; Chen, F.; Chen, M.C.; Chen, X.; Chung, T.H.; Deng, H.; Du, Y.; Fan, D.; et al. Strong Quantum Computational Advantage Using a Superconducting Quantum Processor. Phys. Rev. Lett. 2021, 127, 180501. [Google Scholar] [CrossRef]
  11. Loss, D.; DiVincenzo, D.P. Quantum computation with quantum dots. Phys. Rev. A 1998, 57, 120–126. [Google Scholar] [CrossRef]
  12. Xue, X.; Russ, M.; Samkharadze, N.; Undseth, B.; Sammak, A.; Scappucci, G.; Vandersypen, L.M.K. Quantum logic with spin qubits crossing the surface code threshold. Nature 2022, 601, 343–347. [Google Scholar] [CrossRef]
  13. Madzik, M.T.; Asaad, S.; Youssry, A.; Joecker, B.; Rudinger, K.M.; Nielsen, E.; Young, K.C.; Proctor, T.J.; Baczewski, A.D.; Laucht, A.; et al. Precision tomography of a three-qubit donor quantum processor in silicon. Nature 2022, 601, 348–353. [Google Scholar] [CrossRef]
  14. Noiri, A.; Takeda, K.; Nakajima, T.; Kobayashi, T.; Sammak, A.; Scappucci, G.; Tarucha, S. Fast universal quantum gate above the fault-tolerance threshold in silicon. Nature 2022, 601, 338–342. [Google Scholar] [CrossRef]
  15. Zhong, H.S.; Wang, H.; Deng, Y.H.; Chen, M.C.; Peng, L.C.; Luo, Y.H.; Qin, J.; Wu, D.; Ding, X.; Hu, Y.; et al. Quantum computational advantage using photons. Science 2020, 370, 1460–1463. [Google Scholar] [CrossRef]
  16. Madsen, L.S.; Laudenbach, F.; Askarani, M.F.; Rortais, F.; Vincent, T.; Bulmer, J.F.F.; Miatto, F.M.; Neuhaus, L.; Helt, L.G.; Collins, M.J.; et al. Quantum computational advantage with a programmable photonic processor. Nature 2022, 606, 75–81. [Google Scholar] [CrossRef]
  17. Ebadi, S.; Wang, T.T.; Levine, H.; Keesling, A.; Semeghini, G.; Omran, A.; Bluvstein, D.; Samajdar, R.; Pichler, H.; Ho, W.W.; et al. Quantum phases of matter on a 256-atom programmable quantum simulator. Nature 2021, 595, 227–232. [Google Scholar] [CrossRef]
  18. Scholl, P.; Schuler, M.; Williams, H.J.; Eberharter, A.A.; Barredo, D.; Schymik, K.N.; Lienhard, V.; Henry, L.P.; Lang, T.C.; Lahaye, T.; et al. Quantum simulation of 2D antiferromagnets with hundreds of Rydberg atoms. Nature 2021, 595, 233–238. [Google Scholar] [CrossRef]
  19. Henriet, L.; Beguin, L.; Signoles, A.; Lahaye, T.; Browaeys, A.; Reymond, G.O.; Jurczak, C. Quantum computing with neutral atoms. Quantum 2020, 4, 327. [Google Scholar] [CrossRef]
  20. Graham, T.M.; Song, Y.; Scott, J.; Poole, C.; Phuttitarn, L.; Jooya, K.; Eichler, P.; Jiang, X.; Marra, A.; Grinkemeyer, B.; et al. Multi-qubit entanglement and algorithms on a neutral-atom quantum computer. Nature 2022, 604, 457–462. [Google Scholar] [CrossRef]
  21. Zhang, J.; Pagano, G.; Hess, P.W.; Kyprianidis, A.; Becker, P.; Kaplan, H.; Gorshkov, A.V.; Gong, Z.X.; Monroe, C. Observation of a many-body dynamical phase transition with a 53-qubit quantum simulator. Nature 2017, 551, 601–604. [Google Scholar] [CrossRef]
  22. Blatt, R.; Roos, C.F. Quantum simulations with trapped ions. Nat. Phys. 2012, 8, 277–284. [Google Scholar] [CrossRef]
  23. Hempel, C.; Maier, C.; Romero, J.; McClean, J.; Monz, T.; Shen, H.; Jurcevic, P.; Lanyon, B.P.; Love, P.; Babbush, R.; et al. Quantum Chemistry Calculations on a Trapped-Ion Quantum Simulator. Phys. Rev. X 2018, 8, 031022. [Google Scholar] [CrossRef]
  24. Farhi, E.; Gutmann, S. Analog analogue of a digital quantum computation. Phys. Rev. A 1998, 57, 2403–2406. [Google Scholar] [CrossRef]
  25. Kessel, A.R.; Yakovleva, N.M. Implementation schemes in NMR of quantum processors and the Deutsch-Jozsa algorithm by using virtual spin representation. Phys. Rev. A 2002, 66, 062322. [Google Scholar] [CrossRef]
  26. Muthukrishnan, A.; Stroud, C.R. Multivalued logic gates for quantum computation. Phys. Rev. A 2000, 62, 052309. [Google Scholar] [CrossRef]
  27. Nielsen, M.A.; Bremner, M.J.; Dodd, J.L.; Childs, A.M.; Dawson, C.M. Universal simulation of Hamiltonian dynamics for quantum systems with finite-dimensional state spaces. Phys. Rev. A 2002, 66, 022317. [Google Scholar] [CrossRef]
  28. Wang, X.; Sanders, B.C.; Berry, D.W. Entangling power and operator entanglement in qudit systems. Phys. Rev. A 2003, 67, 042323. [Google Scholar] [CrossRef]
  29. Klimov, A.B.; Guzmán, R.; Retamal, J.C.; Saavedra, C. Qutrit quantum computer with trapped ions. Phys. Rev. A 2003, 67, 062313. [Google Scholar] [CrossRef]
  30. Bagan, E.; Baig, M.; Muñoz Tapia, R. Minimal measurements of the gate fidelity of a qudit map. Phys. Rev. A 2003, 67, 014303. [Google Scholar] [CrossRef]
  31. Vlasov, A.Y. Algebra of quantum computations with higher dimensional systems. In First International Symposium on Quantum Informatics; Ozhigov, Y.I., Ed.; International Society for Optics and Photonics; SPIE: Bellingham, DC, USA, 2003; Volume 5128, pp. 29–36. [Google Scholar] [CrossRef]
  32. Greentree, A.D.; Schirmer, S.G.; Green, F.; Hollenberg, L.C.L.; Hamilton, A.R.; Clark, R.G. Maximizing the Hilbert Space for a Finite Number of Distinguishable Quantum States. Phys. Rev. Lett. 2004, 92, 097901. [Google Scholar] [CrossRef]
  33. O’Leary, D.P.; Brennen, G.K.; Bullock, S.S. Parallelism for quantum computation with qudits. Phys. Rev. A 2006, 74, 032334. [Google Scholar] [CrossRef]
  34. Bogdanov, Y.I.; Moreva, E.V.; Maslennikov, G.A.; Galeev, R.F.; Straupe, S.S.; Kulik, S.P. Polarization states of four-dimensional systems based on biphotons. Phys. Rev. A 2006, 73, 063810. [Google Scholar] [CrossRef]
  35. Moreva, E.V.; Maslennikov, G.A.; Straupe, S.S.; Kulik, S.P. Realization of Four-Level Qudits Using Biphotons. Phys. Rev. Lett. 2006, 97, 023602. [Google Scholar] [CrossRef]
  36. Ralph, T.C.; Resch, K.J.; Gilchrist, A. Efficient Toffoli gates using qudits. Phys. Rev. A 2007, 75, 022313. [Google Scholar] [CrossRef]
  37. Lanyon, B.P.; Weinhold, T.J.; Langford, N.K.; O’Brien, J.L.; Resch, K.J.; Gilchrist, A.; White, A.G. Manipulating Biphotonic Qutrits. Phys. Rev. Lett. 2008, 100, 060504. [Google Scholar] [CrossRef]
  38. Baek, S.Y.; Straupe, S.S.; Shurupov, A.P.; Kulik, S.P.; Kim, Y.H. Preparation and characterization of arbitrary states of four-dimensional qudits based on biphotons. Phys. Rev. A 2008, 78, 042321. [Google Scholar] [CrossRef]
  39. Ionicioiu, R.; Spiller, T.P.; Munro, W.J. Generalized Toffoli gates using qudit catalysis. Phys. Rev. A 2009, 80, 012312. [Google Scholar] [CrossRef]
  40. Ivanov, S.S.; Tonchev, H.S.; Vitanov, N.V. Time-efficient implementation of quantum search with qudits. Phys. Rev. A 2012, 85, 062321. [Google Scholar] [CrossRef]
  41. Kiktenko, E.O.; Fedorov, A.K.; Man’ko, O.V.; Man’ko, V.I. Multilevel superconducting circuits as two-qubit systems: Operations, state preparation, and entropic inequalities. Phys. Rev. A 2015, 91, 042312. [Google Scholar] [CrossRef]
  42. Kiktenko, E.; Fedorov, A.; Strakhov, A.; Man’ko, V. Single qudit realization of the Deutsch algorithm using superconducting many-level quantum circuits. Phys. Lett. A 2015, 379, 1409–1413. [Google Scholar] [CrossRef]
  43. Song, C.; Su, S.L.; Wu, J.L.; Wang, D.Y.; Ji, X.; Zhang, S. Generation of tree-type three-dimensional entangled states via adiabatic passage. Phys. Rev. A 2016, 93, 062321. [Google Scholar] [CrossRef]
  44. Bocharov, A.; Roetteler, M.; Svore, K.M. Factoring with qutrits: Shor’s algorithm on ternary and metaplectic quantum architectures. Phys. Rev. A 2017, 96, 012306. [Google Scholar] [CrossRef]
  45. Gokhale, P.; Baker, J.M.; Duckering, C.; Brown, N.C.; Brown, K.R.; Chong, F.T. Asymptotic Improvements to Quantum Circuits via Qutrits. In Proceedings of the 46th International Symposium on Computer Architecture, New York, NY, USA, 22–26 June 2019; ISCA ’19. pp. 554–566. [Google Scholar] [CrossRef]
  46. Luo, Y.H.; Zhong, H.S.; Erhard, M.; Wang, X.L.; Peng, L.C.; Krenn, M.; Jiang, X.; Li, L.; Liu, N.L.; Lu, C.Y.; et al. Quantum Teleportation in High Dimensions. Phys. Rev. Lett. 2019, 123, 070505. [Google Scholar] [CrossRef]
  47. Low, P.J.; White, B.M.; Cox, A.A.; Day, M.L.; Senko, C. Practical trapped-ion protocols for universal qudit-based quantum computing. Phys. Rev. Res. 2020, 2, 033128. [Google Scholar] [CrossRef]
  48. Neeley, M.; Ansmann, M.; Bialczak, R.C.; Hofheinz, M.; Lucero, E.; O’Connell, A.D.; Sank, D.; Wang, H.; Wenner, J.; Cleland, A.N.; et al. Emulation of a Quantum Spin with a Superconducting Phase Qudit. Science 2009, 325, 722–725. [Google Scholar] [CrossRef]
  49. Lanyon, B.P.; Barbieri, M.; Almeida, M.P.; Jennewein, T.; Ralph, T.C.; Resch, K.J.; Pryde, G.J.; O’Brien, J.L.; Gilchrist, A.; White, A.G. Simplifying quantum logic using higher-dimensional Hilbert spaces. Nat. Phys. 2009, 5, 134–140. [Google Scholar] [CrossRef]
  50. Straupe, S.; Kulik, S. The quest for higher dimensionality. Nat. Photonics 2010, 4, 585–586. [Google Scholar] [CrossRef]
  51. Fedorov, A.; Steffen, L.; Baur, M.; da Silva, M.P.; Wallraff, A. Implementation of a Toffoli gate with superconducting circuits. Nature 2012, 481, 170–172. [Google Scholar] [CrossRef]
  52. Mischuck, B.E.; Merkel, S.T.; Deutsch, I.H. Control of inhomogeneous atomic ensembles of hyperfine qudits. Phys. Rev. A 2012, 85, 022302. [Google Scholar] [CrossRef]
  53. Peterer, M.J.; Bader, S.J.; Jin, X.; Yan, F.; Kamal, A.; Gudmundsen, T.J.; Leek, P.J.; Orlando, T.P.; Oliver, W.D.; Gustavsson, S. Coherence and Decay of Higher Energy Levels of a Superconducting Transmon Qubit. Phys. Rev. Lett. 2015, 114, 010501. [Google Scholar] [CrossRef]
  54. Svetitsky, E.; Suchowski, H.; Resh, R.; Shalibo, Y.; Martinis, J.M.; Katz, N. Hidden two-qubit dynamics of a four-level Josephson circuit. Nat. Commun. 2014, 5, 5617. [Google Scholar] [CrossRef] [PubMed]
  55. Braumüller, J.; Cramer, J.; Schlör, S.; Rotzinger, H.; Radtke, L.; Lukashenko, A.; Yang, P.; Skacel, S.T.; Probst, S.; Marthaler, M.; et al. Multiphoton dressing of an anharmonic superconducting many-level quantum circuit. Phys. Rev. B 2015, 91, 054523. [Google Scholar] [CrossRef]
  56. Kues, M.; Reimer, C.; Roztocki, P.; Cortés, L.R.; Sciara, S.; Wetzel, B.; Zhang, Y.; Cino, A.; Chu, S.T.; Little, B.E.; et al. On-chip generation of high-dimensional entangled quantum states and their coherent control. Nature 2017, 546, 622–626. [Google Scholar] [CrossRef] [PubMed]
  57. Godfrin, C.; Ferhat, A.; Ballou, R.; Klyatskaya, S.; Ruben, M.; Wernsdorfer, W.; Balestro, F. Operating Quantum States in Single Magnetic Molecules: Implementation of Grover’s Quantum Algorithm. Phys. Rev. Lett. 2017, 119, 187702. [Google Scholar] [CrossRef]
  58. Sawant, R.; Blackmore, J.A.; Gregory, P.D.; Mur-Petit, J.; Jaksch, D.; Aldegunde, J.; Hutson, J.M.; Tarbutt, M.R.; Cornish, S.L. Ultracold polar molecules as qudits. New J. Phys. 2020, 22, 013027. [Google Scholar] [CrossRef]
  59. Pavlidis, A.; Floratos, E. Quantum-Fourier-transform-based quantum arithmetic with qudits. Phys. Rev. A 2021, 103, 032417. [Google Scholar] [CrossRef]
  60. Rambow, P.; Tian, M. Reduction of circuit depth by mapping qubit-based quantum gates to a qudit basis. arXiv 2021, arXiv:2109.09902. [Google Scholar] [CrossRef]
  61. Chi, Y.; Huang, J.; Zhang, Z.; Mao, J.; Zhou, Z.; Chen, X.; Zhai, C.; Bao, J.; Dai, T.; Yuan, H.; et al. A programmable qudit-based quantum processor. Nat. Commun. 2022, 13, 1166. [Google Scholar] [CrossRef]
  62. Nikolaeva, A.S.; Kiktenko, E.O.; Fedorov, A.K. Decomposing the generalized Toffoli gate with qutrits. Phys. Rev. A 2022, 105, 032621. [Google Scholar] [CrossRef]
  63. Nikolaeva, A.S.; Kiktenko, E.O.; Fedorov, A.K. Universal quantum computing with qubits embedded in trapped-ion qudits. Phys. Rev. A 2024, 109, 022615. [Google Scholar] [CrossRef]
  64. Ringbauer, M.; Meth, M.; Postler, L.; Stricker, R.; Blatt, R.; Schindler, P.; Monz, T. A universal qudit quantum processor with trapped ions. Nat. Phys. 2022, 18, 1053–1057. [Google Scholar] [CrossRef]
  65. Aksenov, M.A.; Zalivako, I.V.; Semerikov, I.A.; Borisenko, A.S.; Semenin, N.V.; Sidorov, P.L.; Fedorov, A.K.; Khabarova, K.Y.; Kolachevsky, N.N. Realizing quantum gates with optically addressable 171Yb+ ion qudits. Phys. Rev. A 2023, 107, 052612. [Google Scholar] [CrossRef]
  66. Hrmo, P.; Wilhelm, B.; Gerster, L.; van Mourik, M.W.; Huber, M.; Blatt, R.; Schindler, P.; Monz, T.; Ringbauer, M. Native qudit entanglement in a trapped ion quantum processor. Nat. Commun. 2023, 14, 2242. [Google Scholar] [CrossRef] [PubMed]
  67. Zalivako, I.V.; Nikolaeva, A.S.; Borisenko, A.S.; Korolkov, A.E.; Sidorov, P.L.; Galstyan, K.P.; Semenin, N.V.; Smirnov, V.N.; Aksenov, M.A.; Makushin, K.M.; et al. Towards multiqudit quantum processor based on a 171Yb+ ion string: Realizing basic quantum algorithms. arXiv 2024, arXiv:2402.03121. [Google Scholar] [CrossRef]
  68. Hill, A.D.; Hodson, M.J.; Didier, N.; Reagor, M.J. Realization of arbitrary doubly-controlled quantum phase gates. arXiv 2021, arXiv:2108.01652. [Google Scholar] [CrossRef]
  69. Roy, T.; Li, Z.; Kapit, E.; Schuster, D.I. Realization of two-qutrit quantum algorithms on a programmable superconducting processor. arXiv 2022, arXiv:2211.06523. [Google Scholar] [CrossRef]
  70. Low, P.J.; White, B.; Senko, C. Control and Readout of a 13-level Trapped Ion Qudit. arXiv 2023, arXiv:2306.03340. [Google Scholar] [CrossRef]
  71. Javadi-Abhari, A.; Treinish, M.; Krsulich, K.; Wood, C.J.; Lishman, J.; Gacon, J.; Martiel, S.; Nation, P.D.; Bishop, L.S.; Cross, A.W.; et al. Quantum computing with Qiskit. arXiv 2024, arXiv:2405.08810. [Google Scholar] [CrossRef]
  72. Cirq Developers. Cirq. 2024. Available online: https://zenodo.org/records/11398048 (accessed on 7 November 2024). [CrossRef]
  73. Chatterjee, T.; Das, A.; Bala, S.K.; Saha, A.; Chattopadhyay, A.; Chakrabarti, A. QuDiet: A classical simulation platform for qubit-qudit hybrid quantum systems. IET Quantum Commun. 2023, 4, 167–180. [Google Scholar] [CrossRef]
  74. Younis, E.; Iancu, C.C.; Lavrijsen, W.; Davis, M.; Smith, E.; USDOE. Berkeley Quantum Synthesis Toolkit (BQSKit) v1; Lawrence Berkeley National Laboratory (LBNL): Berkeley, CA, USA, 2021. [Google Scholar] [CrossRef]
  75. Cross, A.W.; Bishop, L.S.; Smolin, J.A.; Gambetta, J.M. Open Quantum Assembly Language. arXiv 2017, arXiv:1707.03429. [Google Scholar] [CrossRef]
  76. Sørensen, A.; Mølmer, K. Quantum Computation with Ions in Thermal Motion. Phys. Rev. Lett. 1999, 82, 1971–1974. [Google Scholar] [CrossRef]
  77. Nikolaeva, A.S.; Kiktenko, E.O.; Fedorov, A.K. Efficient realization of quantum algorithms with qudits. arXiv 2021, arXiv:2111.04384. [Google Scholar] [CrossRef]
  78. Barenco, A.; Bennett, C.H.; Cleve, R.; DiVincenzo, D.P.; Margolus, N.; Shor, P.; Sleator, T.; Smolin, J.A.; Weinfurter, H. Elementary gates for quantum computation. Phys. Rev. A 1995, 52, 3457–3467. [Google Scholar] [CrossRef] [PubMed]
  79. Kiktenko, E.O.; Nikolaeva, A.S.; Fedorov, A.K. Realization of quantum algorithms with qudits. arXiv 2023, arXiv:2311.12003. [Google Scholar] [CrossRef]
  80. Younis, E.; Goss, N. QSweep: Pulse-Optimal Single-Qudit Synthesis. arXiv 2023, arXiv:2312.09990. [Google Scholar] [CrossRef]
Figure 1. General scheme of transpilation process and changing the format of the circuits (arrows with caption) during transpilation.
Figure 1. General scheme of transpilation process and changing the format of the circuits (arrows with caption) during transpilation.
Entropy 26 01129 g001
Figure 2. Qudit levels to qubit state mapping for  b = 1  and  b = 2 . For any qudit levels d and qubits in qudit b, all qudit levels are divided into  2 b qubit levels and  d 2 b  ancillary levels. Each qubit level digit is converted into qubit state using its binary representation, whereas ancillary levels are used for specific decompositions.
Figure 2. Qudit levels to qubit state mapping for  b = 1  and  b = 2 . For any qudit levels d and qubits in qudit b, all qudit levels are divided into  2 b qubit levels and  d 2 b  ancillary levels. Each qubit level digit is converted into qubit state using its binary representation, whereas ancillary levels are used for specific decompositions.
Entropy 26 01129 g002
Figure 3. Example for a straightforward mapping for  b = 2 . White blocks represent the initial qubits from the QASM circuit. Qubits are uniquely assigned with  Q n  and  I n  indices. The straightforward mapping assigns  Q = 0  to the first pair of qubits,  Q = 1  to the second pair, and so on. Within a single pair, qubits are distinguished by index I.
Figure 3. Example for a straightforward mapping for  b = 2 . White blocks represent the initial qubits from the QASM circuit. Qubits are uniquely assigned with  Q n  and  I n  indices. The straightforward mapping assigns  Q = 0  to the first pair of qubits,  Q = 1  to the second pair, and so on. Within a single pair, qubits are distinguished by index I.
Entropy 26 01129 g003
Figure 4. Two possible ways to convert qudit state back to qubit state. The first is strict mode which considers levels  2 b  as an error and excludes them from resulting samples. The second is non-strict mode, which converts these levels to the highest allowed level.
Figure 4. Two possible ways to convert qudit state back to qubit state. The first is strict mode which considers levels  2 b  as an error and excludes them from resulting samples. The second is non-strict mode, which converts these levels to the highest allowed level.
Entropy 26 01129 g004
Figure 5. Qudit transpilation, quantum execution and sample unmapping form the workflow for qubit circuit execution on qudit-based hardware.
Figure 5. Qudit transpilation, quantum execution and sample unmapping form the workflow for qubit circuit execution on qudit-based hardware.
Entropy 26 01129 g005
Table 1. Comparison of transpilation for different regimes. We produce the circuits for each case and permute qubits manually in order to obtain a minimum  XX  count in the ququart regime. This permutation does not affect the gate count in qiskit, qubit and qutrit regimes.
Table 1. Comparison of transpilation for different regimes. We produce the circuits for each case and permute qubits manually in order to obtain a minimum  XX  count in the ququart regime. This permutation does not affect the gate count in qiskit, qubit and qutrit regimes.
NameRegimeWithout OptimizationWith Optimization
RZ Count R Count XX Count RZ Count R Count XX Count
Bernstein–Vazirani
identify  101 2  string
qiskit---0242
qubit162226132
qutrit162226132
ququart257215421
Bernstein–Vazirani
identify  10101 2  string
qiskit---0363
qubit243238193
qutrit243239193
ququart3710627582
Grover
find  000 2  string
qiskit---4357
qubit224867136
qutrit144249184
ququart2517247824
Grover
find  0000 2  string
qiskit---3012840
qubit9322336374736
qutrit2913516187316
ququart130704203135320
SWAP test
1 qubit states
qiskit---3247
qubit224278117
qutrit143654155
ququart2213241594
SWAP test
2 qubits states
qiskit---64714
qubit448214151914
qutrit28701072810
ququart44256811148
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Share and Cite

MDPI and ACS Style

Drozhzhin, D.A.; Nikolaeva, A.S.; Kiktenko, E.O.; Fedorov, A.K. Transpiling Quantum Assembly Language Circuits to a Qudit Form. Entropy 2024, 26, 1129. https://doi.org/10.3390/e26121129

AMA Style

Drozhzhin DA, Nikolaeva AS, Kiktenko EO, Fedorov AK. Transpiling Quantum Assembly Language Circuits to a Qudit Form. Entropy. 2024; 26(12):1129. https://doi.org/10.3390/e26121129

Chicago/Turabian Style

Drozhzhin, Denis A., Anastasiia S. Nikolaeva, Evgeniy O. Kiktenko, and Aleksey K. Fedorov. 2024. "Transpiling Quantum Assembly Language Circuits to a Qudit Form" Entropy 26, no. 12: 1129. https://doi.org/10.3390/e26121129

APA Style

Drozhzhin, D. A., Nikolaeva, A. S., Kiktenko, E. O., & Fedorov, A. K. (2024). Transpiling Quantum Assembly Language Circuits to a Qudit Form. Entropy, 26(12), 1129. https://doi.org/10.3390/e26121129

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop