qiskit-qudits: A Qiskit Extension for Simulating Qudit Circuits
This paper introduces **qiskit-qudits**, a Qiskit extension that simulates arbitrary d-level qudits by encoding them into qubits with identity-padding to handle non-power-of-two dimensions, offering both standard gate decompositions and exact dense unitary synthesis for dimensions up to 16, while validating its implementation through numerical verification of the quantum Fourier transform and gate decompositions.
Original paper licensed under CC BY 4.0 (http://creativecommons.org/licenses/by/4.0/). This is an AI-generated explanation of the paper below. It is not written or endorsed by the authors. For technical accuracy, refer to the original paper. Read full disclaimer
In the world of quantum computing, the standard building block is the qubit, a tiny system that can exist in two states at once, often described as zero and one. But nature is not limited to just two options. Many physical systems, such as certain atoms or ions, naturally possess three, four, or even more distinct energy levels. Scientists call these multi-level systems qudits. While qubits are the foundation of current quantum computers, qudits offer a richer landscape for computation, potentially allowing for more efficient algorithms and better use of physical hardware. However, a significant hurdle has remained: the most popular software tools for designing quantum programs were built exclusively for two-level qubits. This meant that researchers wanting to experiment with qudits had to either write their own complex software from scratch or abandon the powerful tools that the broader community had developed.
Francesco Pudda has bridged this gap with a new software extension called qiskit-qudits. This tool allows scientists to design quantum circuits using multi-level qudits while still using the standard Qiskit software suite, which is widely used for building and testing quantum programs. The core achievement of this work is a clever translation method. Since the underlying hardware and the standard software both think in terms of two-level qubits, the new system encodes every multi-level qudit into a small group of qubits. For example, a three-level system is represented by two qubits, and a five-level system by three. This approach creates a slight inefficiency because the group of qubits can represent more states than the qudit actually uses, but the software is designed to ignore these extra, unused states. By treating these unused states as if they do nothing, the system ensures that the complex logic of the qudit works perfectly within the familiar language of qubits.
The researchers did not just build a theoretical idea; they created a fully functional library that integrates seamlessly with existing quantum workflows. The software defines a new set of instructions, or gates, that act on these multi-level systems. These gates can perform standard operations like shifting levels or creating complex superpositions. A key feature of the design is its ability to handle different sizes of qudits simultaneously. A single circuit can contain a three-level system, a four-level system, and a five-level system all working together, and the software manages the translation for each one automatically. When the number of levels is a power of two, the software breaks the operation down into a series of standard qubit steps that the computer's optimization tools can easily process. When the number of levels is not a power of two, the software uses a different method, calculating the exact mathematical transformation for the entire group of qubits at once. This ensures that the system works correctly for any size up to sixteen levels, a range that covers many practical physical systems.
To prove that their translation method was accurate, the team ran rigorous numerical tests. They compared the behavior of their software against the known mathematical rules for a specific type of quantum operation called the quantum Fourier transform, which is a fundamental tool in many quantum algorithms. They tested this across various sizes, including those that do not fit neatly into powers of two. The results showed that the software's output matched the theoretical expectations with extreme precision, with errors so small they were effectively zero for practical purposes. They also verified that every single type of gate they created behaved exactly as intended, whether it was a simple shift or a complex multi-level interaction. The tests confirmed that the software correctly handles the "unused" parts of the encoded space, ensuring that no information leaks out or gets corrupted during the process.
The paper also highlights the trade-offs involved in this approach. Because the system uses extra qubits to represent each qudit, it requires more memory to simulate on a classical computer than a native qudit simulator would. For very large systems, this overhead becomes significant, and the researchers note that for pure simulation of massive systems, a tool built specifically for qudits might still be more efficient. However, for the vast majority of current use cases, the benefit of using the standard Qiskit ecosystem outweighs this cost. The software allows researchers to draw circuits at the qudit level, run them through standard optimization passes, and prepare them for execution on real quantum hardware or simulators without needing to manually rewrite the code.
One of the most practical aspects of this work is how it handles measurement. When a quantum system is measured, the result must be converted back from the raw qubit data into the meaningful levels of the qudit. The new software includes a decoding layer that performs this translation automatically. It also includes a safety mechanism to detect "leakage," a situation where a system accidentally ends up in a state that does not correspond to any valid level of the qudit. In a perfect simulation, this should never happen, but on real hardware or when noise is introduced, it can occur. The software allows users to choose how to handle these rare events, either by discarding the bad data or by flagging it for review, making the simulation results more reliable and transparent.
The work represents a significant step forward in making quantum computing more accessible and versatile. By turning the theoretical concepts of multi-level quantum systems into a working, translatable software layer, it removes a major barrier for researchers. The team verified that their method works for dimensions ranging from two up to sixteen, covering the needs of many current experimental platforms. While the software relies on a specific encoding strategy that adds a layer of complexity, the author demonstrates that this complexity is managed effectively, allowing the standard tools of the quantum community to operate on a much broader range of physical systems. The result is a tool that lets scientists explore the full potential of multi-level quantum mechanics without having to abandon the powerful, established infrastructure they already rely on.
Drowning in papers in your field?
Get daily digests of the most novel papers matching your research keywords — with technical summaries, in your language.