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.
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.
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.
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.
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.
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.”
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.
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.
From machine learning to quantum physics, tensor networks have been quietly powering the breakthroughs that will reshape our society. Originally developed by the legendary Nobel laureate Roger Penrose, they were first used to tackle esoteric problems in physics that were previously unsolvable.
Today, tensor networks have become indispensable in a huge number of fields, including both classical and quantum computing, where they are used everywhere from quantum error correction (QEC) decoding to quantum machine learning.
In this latest paper, we teamed up with luminaries from the University of British Columbia, California Institute of Technology, University of Jyväskylä, KBR Inc, NASA, Google Quantum AI, NVIDIA, JPMorgan Chase, the University of Sherbrooke, and Terra Quantum AG to provide a comprehensive overview of the use of tensor networks in quantum computing.
Part of what drives our leadership in quantum computing is our commitment to building the best scientific team in the world. This is precisely why we hired Dr. Reza Haghshenas, one of the world’s leading experts in tensor networks, and a co-author on the paper.
Dr. Haghshenas has been researching tensor networks for over a decade across both academia and industry. Dr. Haghshenas did postdoctoral work under Professor Garnet Chan at Caltech, a leading figure in the use of tensor networks for quantum physics and chemistry.
“Working with Dr. Garnet Chan at Caltech was a formative experience for me”, remarked Dr. Haghshenas. “While there, I contributed to the development of quantum simulation algorithms and advanced classical methods like tensor networks to help interpret and simulate many-body physics.”
Since joining Quantinuum, Dr. Haghshenas has led projects that bring tensor network methods into direct collaboration with experimental hardware teams — exploring quantum magnetism on real quantum devices and helping demonstrate early signs of quantum advantage. He also contributes to widely used simulation tools like QUIMB, helping the broader research community access these methods.
Dr. Haghshenas’ work sits in a broad and vibrant ecosystem exploring novel uses of tensor networks. Collaborations with researchers like Dr. Chan at Caltech, and NVIDIA have brought GPU-accelerated tools to bear on the forefront of applying tensor networks to quantum chemistry, quantum physics, and quantum computing.
Of particular interest to those of us in quantum computing, the best methods (that we know of) for simulating quantum computers with classical computers rely on tensor networks. Tensor networks provide a nice way of representing the entanglement in a quantum algorithm and how it spreads, which is crucial but generally quite difficult for classical algorithms. In fact, it’s partly tensor networks’ ability to represent entanglement that makes them so powerful for quantum simulation. Importantly, it is our in-house expertise with tensor networks that makes us confident we are indeed moving past classical capabilities.
Tensor networks are not only crucial to cutting-edge simulation techniques. At Quantinuum, we're working on understanding and implementing quantum versions of classical tensor network algorithms, from quantum matrix product states to holographic simulation methods. In doing this, we are leveraging decades of classical algorithm development to advance quantum computing.
A topic of growing interest is the role of tensor networks in QEC, particularly in a process known as decoding. QEC works by encoding information into an entangled state of multiple qubits and using syndrome measurements to detect errors. These measurements must then be decoded to identify the specific error and determine the appropriate correction. This decoding step is challenging—it must be both fast (within the qubit’s coherence time) and accurate (correctly identifying and fixing errors). Tensor networks are emerging as one of the most effective tools for tackling this task.
Tensor networks are more than just a powerful computational tool — they are a bridge between classical and quantum thinking. As this new paper shows, the community’s understanding of tensor networks has matured into a robust foundation for advancing quantum computing, touching everything from simulation and machine learning to error correction and circuit design.
At Quantinuum, we see this as an evolutionary step, not just in theory, but in practice. By collaborating with top minds across academia and industry, we're charting a path forward that builds on decades of classical progress while embracing the full potential of quantum mechanics. This transition is not only conceptual but algorithmic, advancing how we formulate and implement methods utilizing efficiently both classical and quantum computing. Tensor networks aren’t just helping us keep pace with classical computing; they’re helping us to transcend it.
Today, the Quantinuum software team is excited to announce Guppy, a new quantum programming language for the next generation of quantum computing—designed to work with upcoming hardware like Helios, our most powerful system yet. You can download Guppy today and start experimenting with it using our custom-built Selene emulator. Both Guppy and Selene are open source and are capable of handling everything from traditional circuits to dynamic, measurement-dependent programs such as quantum error correction protocols.
Guppy is a quantum-first programming language designed from the ground up to meet the needs of state-of-the-art quantum computers. Embedded in Python, it uses syntax that closely resembles Python, making it instantly familiar to developers. Guppy also provides powerful abstractions and compile-time safety that go far beyond traditional circuit builders like pytket or Qiskit.
Guppy is designed to be readable and expressive, while enabling precise, low-level quantum programming.
This example implements the gate V3 = (I + 2iZ)/√5 using a probabilistic repeat-until-success scheme[1].
If both X-basis measurements on the top two qubits return 0, the V3 gate is successfully applied to the input state |ψ⟩; otherwise, the identity is applied. Since this succeeds with a probability of 5/8, we can repeat the procedure until success.
Let’s implement this in Guppy.
First, we’ll define a helper function to prepare a scratch qubit in the |+⟩ state:
@guppy
def plus_q() -> qubit:
"""Allocate and prepare a qubit in the |+> state"""
q = qubit()
h(q)
return q
Next, a function for performing X-basis measurement:
@guppy
def x_measure(q: qubit @ owned) -> bool:
"""Measure the qubit in the X basis and return the result."""
h(q)
return measure(q)
The @owned annotation tells the Guppy compiler that we’re taking ownership of the qubit, not just borrowing it—a concept familiar to Rust programmers. This is required because measurement deallocates the qubit, and the compiler uses this information to track lifetimes and prevent memory leaks.
The @guppy decorator marks functions as Guppy source code. Oustide these functions, we can use regular Python - like setting a maximum attempt limit:
MAX_ATTEMPTS = 1000
With these pieces in place, we can now implement the full protocol:
@guppy
def v3_rus(q: qubit) -> int:
attempt = 0
while attempt < comptime(MAX_ATTEMPTS):
attempt += 1
a, b = plus_q(), plus_q()
toffoli(a, b, q)
s(q)
toffoli(a, b, q)
a_x, b_x = x_measure(a), x_measure(b)
if not (a_x or b_x):
break
z(q)
return attempt
What’s happening here?
There's a lot more to Guppy, including:
Explore more in the Guppy documentation
Helios represents a major leap forward for Quantinuum hardware—with more qubits, lower error rates, and advanced runtime features that require a new class of programming tools. Guppy provides the expressive power needed to fully harness Helios's capabilities—features that traditional circuit-building tools simply can't support.
See our latest roadmap update for more on Helios and what's coming.
Quantum hardware access is limited—but development shouldn't be. Selene is our new open-source emulator, designed to run compiled Guppy programs accurately—including support for noise modeling. Unlike generic simulators, Selene models advanced runtime behavior unique to Helios, such as measurement-dependent control flow and hybrid quantum-classical logic.
Selene supports multiple simulation backends:
Whether you're prototyping new algorithms or testing low-level error correction, Selene offers a realistic, flexible environment to build and iterate.
Guppy is available now on GitHub and PyPi under the Apache 2 license. Try it out with Selene, read the docs, and start building for the future of quantum computing today.
👉 Getting started with Guppy and Selene
1. Paetznick, A., & Svore, K. M. (2014). Repeat-Until-Success: Non-deterministic decomposition of single-qubit unitaries. arXiv preprint arXiv:1311.1074 ↩
Our next-generation quantum computer, Helios, will come online this year as more than a new chip. It will arrive as a full-stack platform that sets a new standard for the industry.
With our current and previous generation systems, H2 and H1, we have set industry records for the highest fidelities, pioneered the teleportation of logical qubits, and introduced the world’s first commercial application for quantum computers. Much of this success stems from the deep integration between our software and hardware.
Today, we are excited to share the details of our new software stack. Its features and benefits, outlined below, enable a lower barrier to entry, faster time-to-solution, industry-standard access, and the best possible user experience on Helios.
Most importantly, this stack is designed with the future in mind as Quantinuum advances toward universal, fully fault-tolerant quantum computing.
Register for our September 18th webinar on our new software stack
Our Current Generation Software Stack
Currently, the solutions our customers explore on our quantum hardware, which span cybersecurity, quantum chemistry, and quantum AI, plus third-party programs, are all powered by two middleware technologies:
Our Next Generation Software Stack
The launch of Helios will come with an upgraded software stack with new features. We’re introducing two key additions to the stack, specifically:
Moving forward, users will now leverage Guppy to run software applications on Helios and our future systems. TKET will be used solely as a compiler tool chain and for the optimization of Guppy programs.
Nexus, which remains as the default pathway to access our hardware, and third-party hardware, has been upgraded to support Guppy and provide access to Selene. Nexus also supports Quantum Intermediate Representation (QIR), an industry standard, which enables developers to program with languages like NVIDIA CUDA-Q, ensuring our stack stays accessible to the whole ecosystem.
With this new stack running on our next generation Helios system, several benefits will be delivered to the end user, including, but not limited to, improved time-to-solution and reduced memory error for programs critical to quantum error correction and utility-scale algorithms.
Below, we dive deeper into these upgrades and what they mean for our customers.
Designed for the Next Era of Quantum Computing
Guppy is a new programming language hosted in Python, providing developers with a familiar, accessible entry point into the next era of quantum computing.
As Quantinuum leads the transition from the noisy intermediate scale quantum (NISQ) era to fault-tolerant quantum computing, Guppy represents a fundamental departure from legacy circuit-building tools. Instead of forcing developers to construct programs gate-by-gate, a tedious and error-prone process, Guppy treats quantum programs as structured, dynamic software.
With native support for real-time feedback and common programming constructs like ‘if’ statements and ‘for’loops, Guppy enables developers to write complex, readable programs that adapt as the quantum system evolves. This approach unlocks unprecedented power and clarity, far surpassing traditional tools.
Designed with fault-tolerance in mind, Guppy also optimizes qubit resource management automatically, improving efficiency and reducing developer overhead.
All Guppy programs can be seamlessly submitted and managed through Nexus, our all-in-one quantum computing platform.
Find out more at guppylang.org
The Most Flexible Approach to Quantum Error Correction
When it comes to quantum error correction (QEC), flexibility is everything. That is why we designed Guppy to reduce barriers to entry to access necessary features for QEC.
Unlike platforms locked into rigid, hardware-specific codes, Quantinuum’s QCCD architecture gives developers the freedom to implement any QEC code. In a rapidly evolving field, this adaptability is critical: the ability to test and deploy the latest techniques can mean the difference between achieving quantum advantage and falling behind.
With Guppy, developers can implement advanced protocols such as magic state distillation and injection, quantum teleportation, and other measurement-based routines, all executed dynamically through our real-time control system. This creates an environment where researchers can push the limits of fault-tolerance now—not years from now.
In addition, users can employ NVIDIA’s CUDA-QX for out-of-the-box QEC, without needing to worry about writing their own decoders, simplifying the development of novel QEC codes.
By enabling a modular, programmable approach to QEC, our stack accelerates the path to fault-tolerance and positions us to scale quickly as more efficient codes emerge from the research frontier.
Real-Time Control for True Quantum Computing
Integrated seamlessly with Guppy is a next-generation control system powered by a new real-time engine, a key breakthrough for large-scale quantum computing.
This control layer makes our software stack the first commercial system to deliver full measurement-dependent control with undefined sequence length. In practical terms, that means operations can now be guided dynamically by quantum measurements as they occur—a critical step toward truly adaptive, fault-tolerant algorithms.
At the hardware level, features like real-time transport enable dynamic software capabilities, such as conditionals, loops, and recursion, which are all foundational for scaling from thousands to millions of qubits.
These advances deliver tangible performance gains, including faster time-to-solution, reduced memory error, and greater algorithmic efficiency, providing the foundational support required to convert algorithmic advances into useful real-world applications.
Quantum hardware access is limited, but development shouldn't be. Selene is our new open-source emulator, built to model realistic, entangled quantum behavior with exceptional detail and speed.
Unlike generic simulators, Selene captures advanced runtime behavior unique to Helios, including measurement-dependent control flow and hybrid quantum-classical logic. It runs Guppy programs out of the box, allowing developers to start building and testing immediately without waiting for machine time.
Selene supports multiple simulation backends, giving users state-of-the-art options for their specific needs, including backends optimized for matrix product state and tensor network simulations using NVIDIA GPUs and cuQuantum. This ensures maximum performance both on the quantum processor and in simulation.
These new features, and more, are available through Nexus, our all-in-one quantum computing platform.
Nexus serves as the middle layer that connects every part of the stack, providing a cloud-native SaaS environment for full-stack workflows, including server-side Selene instances. Users can manage Guppy programs, analyze results, and collaborate with others, all within a single, streamlined platform.
Further, Selene users who submit quantum state-vector simulations—the most complete and powerful method to simulate a general quantum circuit on a classical computer—through Nexus will be leveraging the NVIDIA cuQuantum library for efficient GPU-powered simulation.
Our entire stack, including Nexus and Selene, supports the industry-standard Quantum Intermediate Representation (QIR) as input, allowing users to program in their preferred programming language. QIR provides a common format for accessing a range of quantum computing backends, and Quantinuum Helios will support the full Adaptive Profile QIR This means developers can generate programs for Helios using tools like NVIDIA CUDA-Q, Microsoft Q#, and ORNL XACC.
Our customers choose Quantinuum as their top quantum computing partner because no one else matches our team or our results. We remain the leaders in quantum computing and the only provider of integrated quantum resources that will address our society’s most complex problems.
That future is already taking shape. With Helios and our new software stack, we are building the foundation for scalable, programmable, real-time quantum computing.