We use Differentiable Quantum Circuits [6] to solve the PDE system describing the battery. This is a variational algorithm combining physics informed learning with spectral numerical methods. The quantum circuit consists of a feature map encoding, which transforms the input variable, in our case time and space into a spectral basis. The features are recombined with a variational ansatz with trainable parameters. From the measurements we can calculate an expectation value of an observable, which represents the value of the encoded function. Two advantages of DQCs are, first, that the feature maps are differentiable by using the parameter shift rule and thus allowing us to get exact analytical derivatives of the encoded functions at the evaluated points. And second, as the feature maps are continuous, there is no need for discretization in either the space or time domain.
In our work we investigate the applicability of this method to solve realistic problems, on the example of a set of coupled non-linear PDEs describing the transport in an electrochemical cell. The modelled quantities are the concentration profile of Lithium ions in the electrolyte, the concentration in the electrodes, as well as the potentials of the electrodes and the electrolyte [7]. Most of these variables are time and space dependent and are coupled through a non-linear Butler-Volmer reaction rate with exponential behaviour [8].
In our approach each variable is encoded in its own quantum circuit. We compared different feature maps, based on Chebyshev and Fourier encodings. Additionally, we investigated making the frequencies in the feature maps trainable by adding additional parameters to the feature map encoding [9], which leads to a higher expressivity of the quantum circuit. The variational circuit consists of a hardware efficient ansatz which is measured using an Ising type Hamiltonian.
The optimization of the variational circuits is based on a loss function that is constructed analogous to classical PINNs. We collect all the outputs and derivatives with respect to a random set of evaluation points and calculate the partial differential equations. The same is done for the initial and boundary conditions and any other constraints. The sum of this different contributions forms the full loss function.
We derived several adaptions of the optimization strategy to improve trainability in a real-world application of electrochemical models. A pretraining on initial conditions emerged as essential, as the equations for reaction kinetics are highly sensitive on the overpotential. This ensures physical consistent conditions once the reaction parts are included in the loss function. A stepwise increase of the external current, driving the reactions, helps to further avoid large gradients.
Additionally, a more complex model, adding different domains of the anode, separator and cathode as well as additional equations describing the storage of Lithium in the electrodes was tested. This consists of 5 variables and about 30 different terms in the loss function. A full solution of a DQC was not possible with the current simulator, but we show the representation of the results within a quantum circuit to estimate the representability.