Showing posts with label variational quantum eigensolver. Show all posts
Showing posts with label variational quantum eigensolver. Show all posts

Tuesday, December 9, 2025

Quantinuum Technical Workshop

Yesterday I attended a workshop by Quantinuum, introducing their latest Helios chip to the Singapore quantum ecosystem. The programme included tutorials on hybrid quantum-classical computing workflows, including real-time measurement and conditional circuit operations, as well as applications to quantum error correction and quantum chemistry.

As someone who previously worked on NISQ processors and interested in trying out the latest generation of quantum processors, it was exciting to learn more about the new capabilities that are available:

  • Real-time qubit measurements and reset combined with conditional operations open new opportunities for circuit design, such as the use of probabilistically generated magic states to reduce circuit depth.
  • Gate fidelities are improved by an order of magnitude! 
  • It seems like quantum error correction can actually work on real hardware!

 At the same time, some of the big challenges we struggled with before remain open problems:

  • Trapped ion systems are slow. Current "error correction" capabilities are practically limited to error detection and post-selection - full-on error correction requires too big an overhead in terms of circuit depths. There is a need to carefully tailor the error correction code to the specific problem and hardware.
  • Quantum chemistry use cases seem to have hit a wall in terms of the complexity of implementing the second-quantized Hamiltonians - circuit depths and required number of measurements become intractable well before one can use all of the available physical qubits. Switching from variational algorithms to subspace methods only partially addresses this.

And some other thorny issues mentioned during the discussion breaks:

  • With superconducting quantum processors or other platforms with fixed qubit positions, one often has the luxury of choosing the best set of the qubits on the device and avoiding bad ones. This isn't supported on the Quantinuum processors due to the qubit shuttling - you have to use whatever you're given and can't keep track of which ions are the best to use. This might make the performance more unpredictable from day to day. One suggested approach was to instead perform a tomography on the different quantum logic regions of the device (where the gates are actually performed), to see if there is substantial variation in their fidelities.
  • Because the gates are so slow, zero noise extrapolation (a simple and effective error mitigation scheme) have limited noise data to work with. Methods to generate more data (by probabilistically expanding only some of the two-qubit gates) need to execute many more circuits, giving a big overhead in terms of compilation time.
  • Conditional circuit operations such as post-selection can substantially increase the number of shots required and expenses incurred by the end-user.
All in all, it was great to see the broad interest in the hardware and insightful technical questions from the audience. Looking forward to seeing what Singaporean researchers get up to with the new Helios processor once it is installed and operational in Singapore late next year!

Thursday, November 20, 2025

Double-bracket quantum algorithms

Recently Marek Gluza visited SUTD to give a seminar on double-bracket quantum algorithms. This is an interesting family of quantum optimization algorithms based on Riemannian geometry, which diagonalize an operator (or minimize an energy) using gradient descent in the space of unitary operators. For example, minimization of energy via this gradient descent is realized as the flow,

$$ \partial_t \rho = [ [\rho (t), H], \rho(t) ], $$

where the first commutator $[\rho(t), H]$ is the energy gradient in the space of unitary operators - the direction that locally minimises the energy of the state $\rho(t)$ - and the second commutator evolves $\rho(t)$ in this direction. In other words, this is a nonlinear evolution governed by the effective time-dependent Hamiltonian $H_{\mathrm{eff}} = [\rho(t),H]$. Similar flows were introduced by R. W. Brockett in the 1990s as a way to use dynamical systems to diagonalize matrices. When implemented with a finite step size $s$, this flow recursively generates better approximations to the ground state as

$$ \rho_{k+1} =  e^{s [\rho, H]} \rho_k.$$

Because of the recursion (you need to first generate $\rho_k$ before applying the next set of gates to make $\rho_{k+1}$), the circuit depth grows exponentially with the number of steps. On the other hand, in contrast to variational quantum algorithms (where one has to measure gradients of all the classical control parameters of the circuit), to implement the double-bracket flow you only need specify the initial state $\rho_0$ and the step size $s$, avoiding big problems such as barren plateaux and choosing an appropriate variational ansatz. Double-bracket flow is guaranteed to converge, so it can pick up after other methods get stuck.

Marek noted that because of the circuit depth blow up, a warm start is essential to get the best performance. For example, one might optimize a shallow variational quantum circuit such as QAOA to obtain a low energy state, followed by a few steps of double-bracket flow to home in on the ground state.

This is a great example of how quantum computing can draw inspiration from classical algorithms and control theory, giving a fresh application of the humble idea of optimization via gradient descent! 

The slides are available here.

Thursday, February 8, 2024

Transformer quantum states: more than meets the eye?

The large language models that have boomed in power and popularity over the last year are based on a neural network architecture called the transformer. Transformers were originally designed to efficiently learn complicated long range correlations arising in natural language processing and are now being applied to other areas, including many-body quantum physics, where they being used as flexible variational quantum states. 

Interest in neural network quantum states has grown rapidly since 2017, when Carleo and Troyer showed that a neural network architecture called the Restricted Boltzmann Machine could be trained to find the ground state wavefunction of the transverse-field Ising and antiferromagnetic Heisenberg models. One limitation with this original work was the difficulty of computing expectation values of the ground state using this architecture, since the trained network takes as its input a spin configuration and returns the corresponding probability amplitude, meaning that time-consuming Monte-Carlo sampling is needed to evaluate expectation values.

Monte-Carlo sampling can be avoided using different parameterizations of the many-body quantum state. For example, the autoregressive quantum state encodes the many-body wavefunction $\Psi(\boldsymbol{s})$ as a product of conditional probability distributions:

$$\Psi(\boldsymbol{s}) = \prod_{i=1}^N \psi_i(s_1 | s_1,...,s_{i-1}) = \psi_1(s_1) \psi_2(s_2|s_1) \psi_3 (s_3 | s_2 s_1) ...\psi_N(s_N| s_{N-1}...s_2 s_1) $$

One can thereby draw unbiased samples from the many-body ground state by first drawing the first spin, $s_1$, according to the learned probability distribution $\psi_1(s_1)$, followed by $s_2$ according to the conditional probability distribution $\psi_2(s_2 | s_1)$, and so on until a complete spin configuration is obtained. However, there is a conservation of misery in that we avoid Monte Carlo sampling but instead need to learn an exponential number of conditional probability distributions! Luckily, it is empirically observed that a single neural network is able to encode all this information, if we allow it to take as an additional input a hidden vector $h_i$ that encodes information as to the previously-drawn spins. This gives the neural network an autoregressive structure, in that the output from one pass is sequentially fed back into its input.

The autoregressive quantum states were inspired by the autoregressive neural networks developed for natural language processing tasks. The performance and scalability of autoregressive neural networks is limited by the need for sequential processing to generate a single sample, the potential for vanishing gradients making it difficult to train the network, and a bias of the learned probability distribution to the recently-sampled spins. More advanced formulations based on masked convolutional networks are able to generate entire configurations using a single evaluation of the network, but still encounter issues with trainability and encoding distributions exhibiting complex correlations.

Then along came the transformer architecture. The innovation here was the inclusion of multiple parameterized transformations to the input data that can be trained to pick out different features and (long-range) correlations – the multi-head attention. Once the key features are identified by the multi-head attention, a relatively simple feed-forward neural network is sufficient to compute the output probability. The success at this architecture for language modelling is now inspiring many studies on applications to many-body physics.

One line of research is exploring transformer neural networks as a flexible ansatz capable of describing families of many-body quantum systems, exemplified by the paper "Transformer quantum state: A multipurpose model for quantum many-body problems." In this work, the transformer neural network was trained to learn the many-body ground states of a family of Ising models. Thus, it takes as its input model parameters (e.g. the applied magnetic field strength), and then draws samples of ground state spin configurations. The model can also extrapolate to predict properties of ground states not included in the training data, albeit with lower accuracy, particularly when attempting to extrapolate across a phase transition. The network can also be "inverted" to perform a maximum likelihood estimation of the system's parameters given a few spin configurations drawn from its ground state, analogous to shadow tomography of many-body quantum states.

A second line of research is exploring the use of transformers as a means of accurately computing ground state energies from specific strongly-correlated model Hamiltonians, such as the Shastry-Sutherland model, see for example the paper "Transformer Variational Wave Functions for Frustrated Quantum Spin Systems". In this case, an architecture called the vision transformer is trained to learn the complex correlations present in the ground state. The biggest challenge is training the network, which is particularly difficult for complex-valued networks, however recent work has shown that a two-stage architecture that applies a real-valued transformer followed by a complex fully-connected neural network can be trained more easily.

What next for this hot topic? Better training methods or more easily-trainable transformer architectures are needed, since in training data for quantum many-body systems is much harder to come by than web-scraped training data for large language models. Future research on applications of classical transformer neural networks will likely be divided between problem-specific models tailored to solve certain hard many-body problems, and less accurate general purpose "foundation" models which may be useful for generating initial guesses for other more precise iterative methods. Beyond this, quantum and quantum-inspired generalisations of the transformer architecture are also cool directions to watch!

Monday, April 11, 2022

Generalised coherent states for variational quantum circuits

One challenge with designing variational quantum algorithms is choosing a good ansatz for the parameterised quantum circuit. One needs to balance multiple competing requirements: 

1. The circuit needs to be complex enough to be able to express a good solution to the problem at hand.

2. The parameterisation should be simple enough to admit analytical calculation of gradients, so that the solution can be found efficiently using gradient descent.

3. The circuit should generate non-trivial quantum entanglement, which is a necessary (but not sufficient) condition for a classical computer to be inefficient at obtaining the same solution.

The most common choices for parameterised circuits either do not meet all three requirements, or give rise to very deep circuits that cannot be run on current quantum processors.

Last week I saw an interesting preprint posted to arXiv:

A Variational Ansatz for the Ground State of the Quantum Sherrington-Kirkpatrick Model

This work builds on an earlier paper by the same group: Generalization of group-theoretic coherent states for variational calculations.

The authors consider variational quantum states based on generalised coherent states, which are formed by applying a single qubit and two qubit (entangling) rotations. Crucially, the form of the ansatz enables expectation values of Pauli operators (required to obtained energies and gradients) to be measured efficiently, with the required number of measurements scaling polynomially in the system size. At the same time, the non-trivial entanglement of the generalised coherent states means that evaluating the overlap between different parameterised states is a classically hard task.

These properties seem quite promising for quantum kernel methods: the analytical gradients would allow one to optimise key properties of the quantum feature map, while the model output (quantum state overlaps with the training data) remains hard to simulate classically.

It is interesting to speculate on whether these parameterised quantum states could be adapted form the basis for a quantum perceptron; they are simple and efficiently trainable, but I am not sure whether they are also modular and can be stacked to form a deep quantum neural network.

Friday, March 12, 2021

Quantum chemistry on near-term quantum computers: the measurement problem

Quantum chemistry calculations including computing the ground state energies of complex molecules are touted as a promising application of near-term quantum computers. While numerous small-scale proof-of-concept calculations have been performed for small molecules, whether near-term quantum algorithms will offer any useful advantage over existing classical computers remains an intensely-debated question.

The variational quantum eigensolver is a leading candidate for near-term quantum computers. This algorithm uses a hybrid quantum-classical feedback loop to optimise the parameters of the quantum gates and minimise the required circuit depth. Each iteration of this algorithm requires estimating the energy of the trial solution, which requires O(1/ε^2) measurements to achieve an accuracy of ε. This becomes a severe bottleneck as the problem size is increased. 

For example, Google's recent paper preparing the Hartree-Fock wavefunction required 250,000 measurements to estimate each observable to sufficient accuracy, translating to a few seconds to perform a single iteration of the algorithm with N=12 qubits. They employed clever tricks to obtain the N^2 one-particle reduced density matrix elements required to compute the energy using only N+1 measurements. When electronic correlations are taken into account, N^4 two-particle reduced density matrix elements are needed to estimate energies. This poor scaling must be improved for the variational quantum eigensolver to have any practical applications.

Interestingly, larger error-corrected quantum computers may not solve this problem: Pessimists estimate that millions of qubits and years of runtime will be required to run error-corrected algorithms such as quantum phase estimation on useful problem sizes.

One approach towards tackling this problem is to use more efficient problem encodings. The most-commonly employed second quantization approach uses N qubits to encode N electron orbitals, and can represent states containing up to N electrons. However, typically the number of orbitals needs to be considerably larger than the number of electrons K in order to achieve convergence to accurate ground state energies. Alternatively, using a first quantization encoding can encode the quantum state using K log N qubits. Estimating the energy then requires measuring elements of a Hamiltonian with ~(KN)^2 nonzero elements. However, one needs to be careful to ensure that the required antisymmetry of the trial wavefunction is preserved. Nevertheless, this approach may be superior for achieving chemical accuracy when a large number of basis states is required. Further discussion on this point can be found in this paper.

Some other useful references I read today on this topic:

This preprint estimates runtimes for applying the quantum phase estimation algorithm to compute energies of catalysts.

This preprint proposes a Bayesian approach to estimating energies with runtime interpolating between the 1/ε^2 of the variational quantum eigensolver and the 1/ε of quantum phase estimation, which trades longer circuit depths for fewer required measurements.

This preprint discusses the measurement problem further.