λambeq Gen II: A Quantum-Enhanced Interpretable and Scalable Text-based NLP Software Package

May 22, 2025
By Bob Coecke and Dimitri Kartsaklis
Introduction

Today we announce the next generation of λambeq , ’s quantum natural language processing (QNLP) package.

Incorporating recent developments in both quantum NLP and quantum hardware, λambeq Gen II allows users not only to model the semantics of natural language (in terms of vectors and tensors), but to convert linguistic structures and meaning directly into quantum circuits for real quantum hardware.

Five years ago, our team of Quantum Natural Language Processing (QNLP). In their work, the team realized that there is a direct correspondence between the meanings of words and quantum states, and between grammatical structures and quantum entanglement. As that article put it: “Language is effectively quantum native”.

Our team realized an NLP task on quantum hardware and provided the data and code via , attracting the interest of a then-nascent quantum NLP community, which has since grown around successive releases of λambeq. supported by on the arXiv.

첹: an open-source python library that turns sentences into quantum circuits, and then feeds these to quantum computers subject to VQC methodologies. Initial release in October 2021

From that moment onwards, anyone could play around with QNLP on the then freely available quantum hardware. Our λambeq software has been downloaded over 50,000 times, and the user community is supported by an active , where practitioners can interact with each other and with our development team.  

The QNLP Back-Story

In order to demonstrate that QNLP was possible, even on the hardware available in 2021, we focused exclusively on small noisy quantum computers. Our motivation was to produce some exploratory findings, looking for a potential quantum advantage for natural language processing using quantum hardware. We published in 2016, detailing a quadratic speedup over classical computers (in certain circumstances). We are strongly convinced that there is a lot more potential than indicated in that paper.

That first realization of QNLP marked a shift away from brute-force machine learning, which has now taken the world by storm in the shape of large language models (LLMs) running on algorithms called “transformers”.

Instead of the transformer approach, we decoded linguistic structure using a compositional theory of meaning. With deep roots in computational linguistics, our approach was inspired by research into compositional linguistic algorithms, and such as quantum teleportation. As we continued our work, it became clear that our approach reduced training requirements by relying on a natural relationship between linguistic structure and quantum structure, in practice.

Embedding recent progress in λambeq Gen II

We haven’t sat still, and neither have the teams working in the field of quantum hardware. ’s stack now performs at a level we only dreamed of in 2020. While we look forward to continued progress on the hardware front, we are getting ahead of these future developments by shifting the focus in our algorithms and software packages, to ensure we and λambeq’s users are ready to chase far more ambitious goals!

We moved away from the compositional theory of meaning that was the focus of , called DisCoCat, to called DisCoCirc. This enabled us to between text generation and text circuits, concluding that “text circuits are generative for text”.

Formally speaking, DisCoCirc embraces substantially more compositional structure present in language than DisCoCat does, and that pays off in many ways:

  • Firstly, the new theoretical backbone enables one to compose the structure of sentences into text structure, so we can now deal with large texts.
  • Secondly, the compositional structure of language is represented in a compressed manner, that, in fact, makes the formalism language-neutral, as reported in .
  • Thirdly, the augmented compositional linguistic structure, together with the requirement of learnability, makes a quantum model now canonical, and we now have solid theoretical evidence for genuine enhanced performance on quantum hardware, as shown in .  
  • Fourthly, the problems associated with trainability of quantum machine learning models vanish, thanks to compositional generalization, which was the .
  • Lastly, and surely not least, we of compositional interpretability and explored the myriad ways that it supports explainable AI (XAI), which we also discussed extensively in .

Today, our users can benefit from these recent developments with the release λambeq Gen II. Our open-source tools have always benefited from the attention and feedback we receive from our users. Please give it a try, and we look forward to hearing your feedback on λambeq Gen II.

Enjoy!

About

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

Blog
October 30, 2025
Scalable Quantum Error Detection

Typically, Quantum Error Detection (QED) is viewed as a short-term solution—a non-scalable, stop-gap until full fault tolerance is achieved at scale.

That’s just changed, thanks to a serendipitous discovery made by our team. Now, QED can be used in a much wider context than previously thought. Our team made this discovery while studying the contact process, which describes things like how diseases spread or how water permeates porous materials. In particular, our team was studying the quantum contact process (QCP), a problem they had tackled before, which helps physicists understand things like phase transitions. In the process (pun intended), they came across what senior advanced physicist, Eli Chertkov, described as “a surprising result.”

While examining the problem, the team realized that they could convert detected errors due to noisy hardware into random resets, a key part of the QCP, thus avoiding the exponentially costly overhead of post-selection normally expected in QED.

To understand this better, the team developed a new protocol in which the encoded, or logical, quantum circuit adapts to the noise generated by the quantum computer. They quickly realized that this method could be used to explore other classes of random circuits similar to the ones they were already studying.

The team put it all together on System Model H2 to run a complex simulation, and were surprised to find that they were able to achieve near break-even results, where the logically encoded circuit performed as well as its physical analog, thanks to their clever application of QED.  Ultimately, this new protocol will allow QED codes to be used in a scalable way, saving considerable computational resources compared to full quantum error correction (QEC).

Researchers at the crossroads of quantum information, quantum simulation, and many-body physics will take interest in this protocol and use it as a springboard for inventing new use cases for QED.

Stay tuned for more, our team always has new tricks up their sleeves.

Learn mode about System Model H2 with this video:

technical
All
Blog
October 23, 2025
Mapping the Hunt for Quantum Advantage

By Konstantinos Meichanetzidis

When will quantum computers outperform classical ones?

This question has hovered over the field for decades, shaping billion-dollar investments and driving scientific debate.

The question has more meaning in context, as the answer depends on the problem at hand. We already have estimates of the quantum computing resources needed for Shor’s algorithm, which has a superpolynomial advantage for integer factoring over the best-known classical methods, threatening cryptographic protocols. Quantum simulation allows one to glean insights into exotic materials and chemical processes that classical machines struggle to capture, especially when strong correlations are present. But even within these examples, estimates change surprisingly often, carving years off expected timelines. And outside these famous cases, the map to quantum advantage is surprisingly hazy.

Researchers at have taken a fresh step toward drawing this map. In a new theoretical framework, Harry Buhrman, Niklas Galke, and Konstantinos Meichanetzidis introduce the concept of “queasy instances” (quantum easy) – problem instances that are comparatively easy for quantum computers but appear difficult for classical ones.

From Problem Classes to Problem Instances

Traditionally, computer scientists classify problems according to their worst-case difficulty. Consider the problem of Boolean satisfiability, or SAT, where one is given a set of variables (each can be assigned a 0 or a 1) and a set of constraints and must decide whether there exists a variable assignment that satisfies all the constraints. SAT is a canonical NP-complete problem, and so in the worst case, both classical and quantum algorithms are expected to perform badly, which means that the runtime scales exponentially with the number of variables. On the other hand, factoring is believed to be easier for quantum computers than for classical ones. But real-world computing doesn’t deal only in worst cases. Some instances of SAT are trivial; others are nightmares. The same is true for optimization problems in finance, chemistry, or logistics. What if quantum computers have an advantage not across all instances, but only for specific “pockets” of hard instances? This could be very valuable, but worst-case analysis is oblivious to this and declares that there is no quantum advantage.

To make that idea precise, the researchers turned to a tool from theoretical computer science: Kolmogorov complexity. This is a way of measuring how “regular” a string of bits is, based on the length of the shortest program that generates it. A simple string like 0000000000 can be described by a tiny program (“print ten zeros”), while the description of a program that generates a random string exhibiting no pattern is as long as the string itself. From there, the notion of instance complexity was developed: instead of asking “how hard is it to describe this string?”, we ask “how hard is it to solve this particular problem instance (represented by a string)?” For a given SAT formula, for example, its polynomial-time instance complexity is the size of the smallest program that runs in polynomial time and decides whether the formula is satisfiable. This smallest program must be consistently answering all other instances, and it is also allowed to declare “I don’t know”.

In their new work, the team extends this idea into the quantum realm by defining polynomial-time quantum instance complexity as the size of the shortest quantum program that solves a given instance and runs on polynomial time. This makes it possible to directly compare quantum and classical effort, in terms of program description length, on the very same problem instance. If the quantum description is significantly shorter than the classical one, that problem instance is one the researchers call “qܱ𲹲”: quantum-easy and classically hard. These queasy instances are the precise places where quantum computers offer a provable advantage – and one that may be overlooked under a worst-case analysis.

Why “Queasy”?

The playful name captures the imbalance between classical and quantum effort. A queasy instance is one that makes classical algorithms struggle, i.e. their shortest descriptions of efficient programs that decide them are long and unwieldy, while a quantum computer can handle the same instance with a much simpler, faster, and shorter program. In other words, these instances make classical computers “queasy,” while quantum ones solve them efficiently and finding them quantum-easy. The key point of these definitions lies in demonstrating that they yield reasonable results for well-known optimisation problems.

By carefully analysing a mapping from the problem of integer factoring to SAT (which is possible because factoring is inside NP and SAT is NP-complete) the researchers prove that there exist infinitely many queasy SAT instances. SAT is one of the most central and well-studied problems in computer science that finds numerous applications in the real-world. The significant realisation that this theoretical framework highlights is that SAT is not expected to yield a blanket quantum advantage, but within it lie islands of queasiness – special cases where quantum algorithms decisively win.

Algorithmic Utility

Finding a queasy instance is exciting in itself, but there is more to this story. Surprisingly, within the new framework it is demonstrated that when a quantum algorithm solves a queasy instance, it does much more than solve that single case. Because the program that solves it is so compact, the same program can provably solve an exponentially large set of other instances, as well. Interestingly, the size of this set depends exponentially on the queasiness of the instance!

Think of it like discovering a special shortcut through a maze. Once you’ve found the trick, it doesn’t just solve that one path, but reveals a pattern that helps you solve many other similarly built mazes, too (even if not optimally). This property is called algorithmic utility, and it means that queasy instances are not isolated curiosities. Each one can open a doorway to a whole corridor with other doors, behind which quantum advantage might lie.

A North Star for the Field

Queasy instances are more than a mathematical curiosity; this is a new framework that provides a language for quantum advantage. Even though the quantities defined in the paper are theoretical, involving Turing machines and viewing programs as abstract bitstrings, they can be approximated in practice by taking an experimental and engineering approach. This work serves as a foundation for pursuing quantum advantage by targeting problem instances and proving that in principle this can be a fruitful endeavour.

The researchers see a parallel with the rise of machine learning. The idea of neural networks existed for decades along with small scale analogue and digital implementations, but only when GPUs enabled large-scale trial and error did they explode into practical use. Quantum computing, they suggest, is on the cusp of its own heuristic era. ‾ܰپ” will be prominent in finding queasy instances, which have the right structure so that classical methods struggle but quantum algorithms can exploit, to eventually arrive at solutions to typical real-world problems. After all, quantum computing is well-suited for small-data big-compute problems, and our framework employs the concepts to quantify that; instance complexity captures both their size and the amount of compute required to solve them.

Most importantly, queasy instances shift the conversation. Instead of asking the broad question of when quantum computers will surpass classical ones, we can now rigorously ask where they do. The queasy framework provides a language and a compass for navigating the rugged and jagged computational landscape, pointing researchers, engineers, and industries toward quantum advantage.

technical
All
Blog
September 15, 2025
Quantum World Congress 2025

From September 16th – 18th, (QWC) brought together visionaries, policymakers, researchers, investors, and students from across the globe to discuss the future of quantum computing in Tysons, Virginia.

is forging the path to universal, fully fault-tolerant quantum computing with our integrated full-stack. With our quantum experts were on site, we showcased the latest on Systems, the world’s highest-performing, commercially available quantum computers, our new software stack featuring the key additions of Guppy and Selene, our path to error correction, and more.

Highlights from QWC

Dr. Patty Lee Named the Industry Pioneer in Quantum

The Quantum Leadership Awards celebrate visionaries transforming quantum science into global impact. This year at QWC, Dr. Patty Lee, our Chief Scientist for Hardware Technology Development, was named the Industry Pioneer in Quantum! This honor celebrates her more than two decades of leadership in quantum computing and her pivotal role advancing the world’s leading trapped-ion systems. .

Keynote with 's CEO, Dr. Rajeeb Hazra

At QWC 2024, ’s President & CEO, Dr. Rajeeb “Raj” Hazra, took the stage to showcase our commitment to advancing quantum technologies through the unveiling of our roadmap to universal, fully fault-tolerant quantum computing by the end of this decade. This year at QWC 2025, Raj shared the progress we’ve made over the last year in advancing quantum computing on both commercial and technical fronts and exciting insights on what’s to come from . .

Panel Session: Policy Priorities for Responsible Quantum and AI

As part of the Track Sessions on Government & Security, ’s Director of Government Relations, Ryan McKenney, discussed “Policy Priorities for Responsible Quantum and AI” with Jim Cook from Actions to Impact Strategies and Paul Stimers from Quantum Industry Coalition.

Fireside Chat: Establishing a Pro-Innovation Regulatory Framework

During the Track Session on Industry Advancement, ’s Chief Legal Officer, Kaniah Konkoly-Thege, and Director of Government Relations, Ryan McKenney, discussed the importance of “Establishing a Pro-Innovation Regulatory Framework”.

events
All