Sequence Processing With Quantum Tensor Networks

Technology / Press Release January 12, 2024

January 11 ,2024 -- For the first time, Quantinuum researchers have run scalable quantum natural language processing (QNLP) models, able to parse and process real-world data, on a quantum computer. In a recent paper, the researchers define machine learning models for the task of classifying sequences – which can be anything from sentences in natural language, like movie reviews, to bioinformatic strings, like DNA sequences. Classifying sequences of symbols – letters, words, or longer fragments of text – is an obviously useful computational task, and has led to some of the decade’s biggest changes; we now see this technology in use in everything from chatbots to legal cases.  

Current classical models, which are based on neural networks, primarily look at the statistical distributions of where words are put with respect to each other – they don’t really consider the structure of language a priori (they could, but they don’t). In contrast, syntactic information scaffolds Quantinuum’s new quantum models, which are based on tensor networks, making them “syntax-aware”. Considering things like structure and syntax from the beginning allows scientists to create models with far fewer parameters, that require fewer gate operations to run, while allowing for interpretability thanks to the meaningful structure baked in from the start. Interpretability is the most pressing challenge in artificial intelligence (AI) — because if we don’t know why an algorithm has given an answer, we can’t trust it in critical applications, for instance in making medical decisions, or in scenarios where human lives are at stake.

Both neural and tensor networks can capture complex correlations in large data, but the way they do it is fundamentally different. In addition, since quantum theory inherently is described by tensor networks, using them to build quantum natural language processing models allows for the investigation of the potential that quantum processors can bring to natural language processing specifically, and artificial intelligence in general.

Thanks to best-in-class features like mid-circuit measurement and qubit reuse on Quantinuum’s H2-1 quantum processor, they were able to fit much larger circuits than one might naively expect. For example, the researchers were able to run a circuit that would normally take 64 qubits on only 11 qubits. Combined with the reduced number of gates required, these models are entirely feasible on current quantum hardware.

This paper shows us that we can run, train, and deploy QNLP models on present-day quantum computers. When compared to neural-network-based classifiers, the quantum model does just as well on this task in terms of prediction accuracy. What’s more, this work encourages the exploration of quantum language models, as sampling from quantum circuits of the types used in this work could require polynomially fewer resources than simulating them classically.