A Quantinuum-led team has built the quantum programming tools for real-time magic state distillation on a quantum computer

Researchers at Quantinuum and Microsoft’s Azure Quantum used the Quantum Intermediate Representation (QIR) to demonstrate a magic state distillation protocol for the first time on quantum hardware – a key element necessary for universal, fault-tolerant quantum computing

October 24, 2023

Building a quantum computer that offers advantages over classical computers is the goal of quantum computing groups worldwide. A competitive quantum computer must be “universal”, requiring the ability to perform all operations already possible on a classical computer, as well as new ones specific to quantum computing. Of course, that’s just the beginning – it should also be able to do this in a reasonable amount of time, to deal effectively with noise from the environment, and to perform computations to arbitrary accuracy.

This is a lot to get right, and over the years quantum computer scientists have described ways to solve these often-overlapping challenges. To deal with noise from the environment and achieve arbitrary accuracy, quantum computers need to be able to keep going even as noise accumulates on the quantum bits, or qubits, which hold the quantum information. Such fault-tolerance may be achieved using quantum error correction, where ensembles of physical qubits are encoded into logical qubits and those are used to counteract noise and perform computational operations called gates. Unfortunately, no single quantum error correction code plays well with the goal of universality because all codes lack a complete universal set of fault-tolerant gates (the technical reason for this comes down to the way quantum gates are executed between logical qubits – the native gate set on error-corrected logical qubits are known by experts as transversal gates, and they do not include all the gates needed for universal quantum computing).

The solution to this obstacle to universality is a magic state, a quantum state which provides for the missing gate when error correcting codes are used. High fidelity magic states are achieved by a process of distillation, which purifies them from other noisier magic states. It is widely recognized that magic state distillation is one of the totemic challenges on the path towards universal, fault-tolerant quantum computing. Quantinuum’s scientists, in close collaboration with a team at Microsoft, set out to demonstrate the distillation process in real-time using physical qubits on a quantum computer for the first time.

The results of this work are available in a new paper, Advances in compilation for quantum hardware -- A demonstration of magic state distillation and repeat until success protocols.

Magic state distillation

How does magic state distillation work? Imagine a factory, taking in many qubits in imperfect initial states at one end. Broadly speaking, the factory distills the imperfect states into an almost pure state with a smaller error probability, by sending them through a well-defined process over and over. In this case, the process takes in a group of five qubits. It applies a quantum error correcting code that entangles these five qubits, with four used to test whether the fifth, target qubit has been purified. If the process fails, the ensemble is discarded and the process repeats. If it succeeds, the newly distilled target qubit is kept and combined with four other successes to form a new ensemble, which then rejoins the process of continued purification. By undertaking this process many times, the purity of the magic state increases at each step, gradually moving towards the conditions required for universal, fault-tolerant quantum computing.

Despite being the subject of theoretical exploration over decades, real-time magic state distillation had never been realized on a quantum computer. In typical pioneering style, the Quantinuum and Microsoft team decided to take on this challenge. But before they could get started, they recognized that their toolset would have to be significantly sharpened up.

Creating new tools for quantum programming

At the heart of magic state distillation is a highly complex repeating process, which requires state-of-the-art protocols and control flow logic built on a best-in-class programming toolset. The research team turned to Quantum Intermediate Representation (QIR) to simplify and streamline the programming of this complex quantum computing process.

QIR is a is a quantum-specific code representation based on the popular open-sourced classical LLVM intermediate language, with the addition of structures and protocols that support the maturation and modernization of quantum computing. QIR includes elements that are essential in classical computing, but which are yet to be standardized in quantum computing, such as the humble programming loop.

Loops, which often take forms like "for...next" or "do...while," are central to programming, allowing code to repeat instructions in a stepwise manner until a condition is met. In quantum computing, this is a tough challenge because loops require control flow logic and mid-circuit measurement, which are difficult to realize in a quantum computer but have been demonstrated in Quantinuum’s System Model H1-1, Powered by Honeywell. Loops are essential for realizing magic state distillation and it’s well-understood that LLVM is great at optimizing complex control flow, including loops. This made magic state distillation a natural choice for demonstrating a valuable application of QIR and making for a great example of the use of a classical technique in a quantum context.

Result: demonstrating a magic state distillation protocol

The team used Quantinuum’s H1-1 quantum computer – benefiting from industry-leading components such as mid-circuit measurement, qubit reuse and feed-forward – to make possible the quantum looping required for a magic state distillation protocol, and becoming the first quantum computing team ever to run a real-time magic state distillation protocol on quantum hardware.

Four ways to achieve a quantum computer programmable loop

Building on this success, the team designed further experiments to assess the potential of four methods for exploring the use of a quantum protocol called a repeat-until-success (RUS) circuit to achieve a loop process. First, they hard-coded a loop directly into the extended OpenQASM 2.0, a widely used quantum assembly language, but which requires additional overhead to target advanced components on Quantinuum's very versatile H-Series quantum computer. Against this, they compared two alternative methods for coding a loop in a standard high-level programming language: controlled recursion, which was directed through both OpenQASM and through QIR; and a native for loop made possible within QIR.

The results were clear-cut: the hard-coded OpenQASM 2.0 loop performed as well as the theoretical prediction, maintaining high quality results after a number of loops, as did the natively-coded QIR for loop. The two recursive loops saw the quality of their results drop away fast as the loop limit was raised. But in a head-to-head between hard-coded OpenQASM and QIR, which converts high-level source code from many prominent and familiar languages into low-level machine code, QIR won hands-down on the basis of practicality.

A graph of a graphDescription automatically generated
Figure 1: comparison of programmed loops by the survival fidelity of the target qubit in the X-basis

Martin Roetteler, Director of Quantum Applications at Microsoft, shared: “This was a very exciting exploration of control flow logic on quantum hardware. In seeking to understand the capabilities of QIR to optimize programming structures on real hardware, we were rewarded with a clear answer, and an important demonstration of the capabilities of QIR.”

H2’s 32 qubits will power the next phase

In follow-up work, the team is now preparing to run a logical magic state protocol on the H2-1 quantum computer with its 32 high-fidelity qubits, and hopes to become the first group to successfully achieve logical magic state distillation. The features and fidelity offered by the H2 make it one of the best quantum computers currently capable of shooting for such a major milestone on the journey towards fault tolerance, while the current work demonstrates that, in QIR, the necessary control flow logic is now available to achieve it.

The paper discussed in this post was authored by Natalie C. Brown, John P. Campora III, Cassandra Granade, Bettina Heim, Stefan Wernli, Ciaran Ryan-Anderson, Dominic Lucchetti, Adam Paetznick, Martin Roetteler, Krysta Svore and Alex Chernoguzov.

About Quantinuum

Quantinuum, the world’s largest integrated quantum company, pioneers powerful quantum computers and advanced software solutions. Quantinuum’s technology drives breakthroughs in materials discovery, cybersecurity, and next-gen quantum AI. With over 500 employees, including 370+ scientists and engineers, Quantinuum leads the quantum computing revolution across continents. 

Blog
June 10, 2025
Our Hardware is Now Running Quantum Transformers!

If we are to create ‘next-gen’ AI that takes full advantage of the power of quantum computers, we need to start with quantum native transformers. Today we announce yet again that Quantinuum continues to lead by demonstrating concrete progress — advancing from theoretical models to real quantum deployment.

The future of AI won't be built on yesterday’s tech. If we're serious about creating next-generation AI that unlocks the full promise of quantum computing, then we must build quantum-native models—designed for quantum, from the ground up.

Around this time last year, we introduced Quixer, a state-of-the-art quantum-native transformer. Today, we’re thrilled to announce a major milestone: one year on, Quixer is now running natively on quantum hardware.

Why this matters: Quantum AI, born native

This marks a turning point for the industry: realizing quantum-native AI opens a world of possibilities.

Classical transformers revolutionized AI. They power everything from ChatGPT to real-time translation, computer vision, drug discovery, and algorithmic trading. Now, Quixer sets the stage for a similar leap — but for quantum-native computation. Because quantum computers differ fundamentally from classical computers, we expect a whole new host of valuable applications to emerge.  

Achieving that future requires models that are efficient, scalable, and actually run on today’s quantum hardware.

That’s what we’ve built.

What makes Quixer different?

Until Quixer, quantum transformers were the result of a brute force “copy-paste” approach: taking the math from a classical model and putting it onto a quantum circuit. However, this approach does not account for the considerable differences between quantum and classical architectures, leading to substantial resource requirements.

Quixer is different: it’s not a translation – it's an innovation.

With Quixer, our team introduced an explicitly quantum transformer, built from the ground up using quantum algorithmic primitives. Because Quixer is tailored for quantum circuits, it's more resource efficient than most competing approaches.

As quantum computing advances toward fault tolerance, Quixer is built to scale with it.

What’s next for Quixer?

We’ve already deployed Quixer on real-world data: genomic sequence analysis, a high-impact classification task in biotech. We're happy to report that its performance is already approaching that of classical models, even in this first implementation.

This is just the beginning.

Looking ahead, we’ll explore using Quixer anywhere classical transformers have proven to be useful; such as language modeling, image classification, quantum chemistry, and beyond. More excitingly, we expect use cases to emerge that are quantum-specific, impossible on classical hardware.

This milestone isn’t just about one model. It’s a signal that the quantum AI era has begun, and that Quantinuum is leading the charge with real results, not empty hype.

Stay tuned. The revolution is only getting started.

technical
All
Blog
June 9, 2025
Join us at ISC25

Our team is participating in ISC High Performance 2025 (ISC 2025) from June 10-13 in Hamburg, Germany!

As quantum computing accelerates, so does the urgency to integrate its capabilities into today’s high-performance computing (HPC) and AI environments. At ISC 2025, meet the Quantinuum team to learn how the highest performing quantum systems on the market, combined with advanced software and powerful collaborations, are helping organizations take the next step in their compute strategy.

Quantinuum is leading the industry across every major vector: performance, hybrid integration, scientific innovation, global collaboration and ease of access.

  • Our industry-leading quantum computer holds the record for performance with a Quantum Volume of 2²³ = 8,388,608 and the highest fidelity on a commercially available QPU available to our users every time they access our systems.
  • Our systems have been validated by a #1 ranking against competitors in a recent benchmarking study by Jülich Research Centre.
  • We’ve laid out a clear roadmap to reach universal, fully fault-tolerant quantum computing by the end of the decade and will launch our next-generation system, Helios, later this year.
  • We are advancing real-world hybrid compute with partners such as RIKEN, NVIDIA, SoftBank, STFC Hartree Center and are pioneering applications such as our own GenQAI framework.
Exhibit Hall

From June 10–13, in Hamburg, Germany, visit us at Booth B40 in the Exhibition Hall or attend one of our technical talks to explore how our quantum technologies are pushing the boundaries of what’s possible across HPC.

Presentations & Demos

Throughout ISC, our team will present on the most important topics in HPC and quantum computing integration—from near-term hybrid use cases to hardware innovations and future roadmaps.

Multicore World Networking Event

  • Monday, June 9 | 7:00pm – 9:00 PM at Hofbräu Wirtshaus Esplanade
    In partnership with Multicore World, join us for a Quantinuum-sponsored Happy Hour to explore the present and future of quantum computing with Quantinuum CCO, Dr. Nash Palaniswamy, and network with our team.
    Register here

H1 x CUDA-Q Demonstration

  • All Week at Booth B40
    We’re showcasing a live demonstration of NVIDIA’s CUDA-Q platform running on Quantinuum’s industry-leading quantum hardware. This new integration paves the way for hybrid compute solutions in optimization, AI, and chemistry.
    Register for a demo

HPC Solutions Forum

  • Wednesday, June 11 | 2:20 – 2:40 PM
    “Enabling Scientific Discovery with Generative Quantum AI” – Presented by Maud Einhorn, Technical Account Executive at Quantinuum, discover how hybrid quantum-classical workflows are powering novel use cases in scientific discovery.
See You There!

Whether you're exploring hybrid solutions today or planning for large-scale quantum deployment tomorrow, ISC 2025 is the place to begin the conversation.

We look forward to seeing you in Hamburg!

events
All
Blog
May 27, 2025
Teleporting to new heights

Quantinuum has once again raised the bar—setting a record in teleportation, and advancing our leadership in the race toward universal fault-tolerant quantum computing.

Last year, we published a paper in Science demonstrating the first-ever fault-tolerant teleportation of a logical qubit. At the time, we outlined how crucial teleportation is to realize large-scale fault tolerant quantum computers. Given the high degree of system performance and capabilities required to run the protocol (e.g., multiple qubits, high-fidelity state-preparation, entangling operations, mid-circuit measurement, etc.), teleportation is recognized as an excellent measure of system maturity.

Today we’re building on last year’s breakthrough, having recently achieved a record logical teleportation fidelity of 99.82% – up from 97.5% in last year’s result. What’s more, our logical qubit teleportation fidelity now exceeds our physical qubit teleportation fidelity, passing the break-even point that establishes our H2 system as the gold standard for complex quantum operations.

Figure 1: Fidelity of two-bit state teleportation for physical qubit experiments and logical qubit experiments using the d=3 color code (Steane code). The same QASM programs that were ran during March 2024 on the Quantinuum's H2-1 device were reran on the same device on April to March 2025. Thanks to the improvements made to H2-1 from 2024 to 2025, physical error rates have been reduced leading to increased fidelity for both the physical and logical level teleportation experiments. The results imply a logical error rate that is 2.3 times smaller than the physical error rate while being statistically well separated, thus indicating the logical fidelities are below break-even for teleportation.

This progress reflects the strength and flexibility of our Quantum Charge Coupled Device (QCCD) architecture. The native high fidelity of our QCCD architecture enables us to perform highly complex demonstrations like this that nobody else has yet to match. Further, our ability to perform conditional logic and real-time decoding was crucial for implementing the Steane error correction code used in this work, and our all-to-all connectivity was essential for performing the high-fidelity transversal gates that drove the protocol.

Teleportation schemes like this allow us to “trade space for time,” meaning that we can do quantum error correction more quickly, reducing our time to solution. Additionally, teleportation enables long-range communication during logical computation, which translates to higher connectivity in logical algorithms, improving computational power.

This demonstration underscores our ongoing commitment to reducing logical error rates, which is critical for realizing the promise of quantum computing. Quantinuum continues to lead in quantum hardware performance, algorithms, and error correction—and we’ll extend our leadership come the launch of our next generation system, Helios, in just a matter of months.

technical
All