Skip to content

Modifying Physics Inspired Neural Network to use a quantum layer

Notifications You must be signed in to change notification settings

Danielle-Schuman/QDynamics

Repository files navigation

QDynamics

This is the repository of our project "QDynamics" (part of the PushQuantum "Quantum Entrepreneurship Laboratory"). In this Project, we aim to modify a Physics Inspired Neural Network (PINN) to use a quantum layer. This proof of concept intends to show that it is possible to use Quantum Neural Network layers in Neural Networks that solve Partial Differential Equations (PDEs). With these Hybrid Quantum-Classical Neural Networks, it will most likely be possible to speed up Computational Fluid Dynamics (CFD) calculations in the future.

Front-End

A Clickable Prototype of a Front-End for our CFD application using Figma can be found here.

PINN and QPINN

A classical implementation of a Physics Inspired Neural Network (PINN) solving the Burger's Equation (which we adapted from https://github.com/pierremtb/PINNs-TF2.0 ), as well as our modification of this network to incorporate a quantum layer, can be found in the following Google Colab notebook.

The quantum layer found in the hybrid quantum neural network is structured as seen in the figure below: Quantum Layer Circuit

We implemented the QPINN using Tensorflow Quantum. Unfortunately, since this framwork – like all Quantum Machine Learning Frameworks – is still very young, it does not provide the possibility to calculate higher-order gradients on quantum layers yet, which our application would require. Other people have also been experiencing this issue, so a corresponding feature will hopefully be provided soon. For this reason, our Quantum Physics-Inspired Neural Network (QPINN) is not entirely executable just yet.

Quantum Layer

To show that our Quantum Layer is most defininetely executable per se, we additionally provided a toy example using it in another neural network: keras_example_tfq.ipynb (or, as a Google Collab: https://colab.research.google.com/drive/1ngD5YMM7EeWnWxXgMZfk8GgXPdhSoexI)

Results

For the classical version of the algorithm, the result is shown below. For higher resolution, we may refer you to the .pdf version in our repository.

Result

Installation

Install requirements with:

pip -r requirements.txt




About

Modifying Physics Inspired Neural Network to use a quantum layer

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published