mirror of
https://github.com/autistic-symposium/ml-quantum-tensorflow-py.git
synced 2025-05-13 12:02:14 -04:00
Update README.md
This commit is contained in:
parent
3e27c6fb73
commit
3f9e66d6c0
1 changed files with 25 additions and 10 deletions
35
README.md
35
README.md
|
@ -1,8 +1,16 @@
|
||||||
# 🍒 QuantumFlow: Quantum Tensorflow Machine Learning deployment in K8s
|
## ⚛️🔋 QuantumFlow: Quantum Computin Tensorflow in K8s
|
||||||
|
|
||||||
<br>
|
<br>
|
||||||
|
|
||||||
## Theoretical Introduction
|
#### 👉 this repository contains my work deploying a quantum computing version of tensorflow in kubernets.
|
||||||
|
|
||||||
|
<br>
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
### Theoretical Introduction
|
||||||
|
|
||||||
|
<br>
|
||||||
|
|
||||||
* With the recent progress in the development of quantum computing, the development of new quantum ML models could have a profound impact on the world’s biggest problems, leading to breakthroughs in the areas of medicine, materials, sensing, and communications.
|
* With the recent progress in the development of quantum computing, the development of new quantum ML models could have a profound impact on the world’s biggest problems, leading to breakthroughs in the areas of medicine, materials, sensing, and communications.
|
||||||
|
|
||||||
|
@ -21,41 +29,44 @@
|
||||||
|
|
||||||
* A key feature of TensorFlow Quantum is the ability to simultaneously train and execute many quantum circuits. This is achieved by TensorFlow’s ability to parallelize computation across a cluster of computers, and the ability to simulate relatively large quantum circuits on multi-core computers.
|
* A key feature of TensorFlow Quantum is the ability to simultaneously train and execute many quantum circuits. This is achieved by TensorFlow’s ability to parallelize computation across a cluster of computers, and the ability to simulate relatively large quantum circuits on multi-core computers.
|
||||||
|
|
||||||
|
<br>
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
|
||||||
|
### Steps:
|
||||||
|
|
||||||
<br>
|
<br>
|
||||||
|
|
||||||
## Steps:
|
#### Prepare a quantum dataset
|
||||||
|
|
||||||
### Prepare a quantum dataset
|
|
||||||
|
|
||||||
- Quantum data is loaded as tensors (a multi-dimensional array of numbers).
|
- Quantum data is loaded as tensors (a multi-dimensional array of numbers).
|
||||||
- Each quantum data tensor is specified as a quantum circuit written in Cirq that generates quantum data on the fly.
|
- Each quantum data tensor is specified as a quantum circuit written in Cirq that generates quantum data on the fly.
|
||||||
- The tensor is executed by TensorFlow on the quantum computer to generate a quantum dataset.
|
- The tensor is executed by TensorFlow on the quantum computer to generate a quantum dataset.
|
||||||
|
|
||||||
### Evaluate a quantum neural network model
|
#### Evaluate a quantum neural network model
|
||||||
|
|
||||||
- The researcher can prototype a quantum neural network using Cirq that they will later embed inside of a TensorFlow compute graph.
|
- The researcher can prototype a quantum neural network using Cirq that they will later embed inside of a TensorFlow compute graph.
|
||||||
- Parameterized quantum models can be selected from several broad categories based on knowledge of the quantum data's structure.
|
- Parameterized quantum models can be selected from several broad categories based on knowledge of the quantum data's structure.
|
||||||
- The goal of the model is to perform quantum processing in order to extract information hidden in a typically entangled state.
|
- The goal of the model is to perform quantum processing in order to extract information hidden in a typically entangled state.
|
||||||
|
|
||||||
### Sample or Average
|
#### Sample or Average
|
||||||
|
|
||||||
- Measurement of quantum states extracts classical information in the form of samples from a classical random variable.
|
- Measurement of quantum states extracts classical information in the form of samples from a classical random variable.
|
||||||
- The distribution of values from this random variable generally depends on the quantum state itself and on the measured observable.
|
- The distribution of values from this random variable generally depends on the quantum state itself and on the measured observable.
|
||||||
- As many variational algorithms depend on mean values of measurements, also known as expectation values, TFQ provides methods for averaging over several runs involving steps (1) and (2).
|
- As many variational algorithms depend on mean values of measurements, also known as expectation values, TFQ provides methods for averaging over several runs involving steps (1) and (2).
|
||||||
|
|
||||||
### Evaluate a classical neural networks model
|
#### Evaluate a classical neural networks model
|
||||||
|
|
||||||
- Once classical information has been extracted, it is in a format amenable to further classical post-processing.
|
- Once classical information has been extracted, it is in a format amenable to further classical post-processing.
|
||||||
- As the extracted information may still be encoded in classical correlations between measured expectations, classical deep neural networks can be applied to distill such correlations.
|
- As the extracted information may still be encoded in classical correlations between measured expectations, classical deep neural networks can be applied to distill such correlations.
|
||||||
|
|
||||||
### Evaluate Cost Function
|
#### Evaluate Cost Function
|
||||||
|
|
||||||
- Given the results of classical post-processing, a cost function is evaluated.
|
- Given the results of classical post-processing, a cost function is evaluated.
|
||||||
- This could be based on how accurately the model performs the classification task if the quantum data was labeled, or other criteria if the task is unsupervised.
|
- This could be based on how accurately the model performs the classification task if the quantum data was labeled, or other criteria if the task is unsupervised.
|
||||||
|
|
||||||
### Evaluate Gradients & Update Parameters
|
#### Evaluate Gradients & Update Parameters
|
||||||
|
|
||||||
- After evaluating the cost function, the free parameters in the pipeline should be updated in a direction expected to decrease the cost.
|
- After evaluating the cost function, the free parameters in the pipeline should be updated in a direction expected to decrease the cost.
|
||||||
- This is most commonly performed via gradient descent.
|
- This is most commonly performed via gradient descent.
|
||||||
|
@ -66,6 +77,8 @@
|
||||||
|
|
||||||
### Pre-requisites
|
### Pre-requisites
|
||||||
|
|
||||||
|
<br>
|
||||||
|
|
||||||
* [Vagrant](https://www.vagrantup.com/).
|
* [Vagrant](https://www.vagrantup.com/).
|
||||||
* [Virtual Box](https://www.virtualbox.org/).
|
* [Virtual Box](https://www.virtualbox.org/).
|
||||||
* [Kubeflow and MiniKF](https://www.kubeflow.org/docs/other-guides/virtual-dev/getting-started-minikf/).
|
* [Kubeflow and MiniKF](https://www.kubeflow.org/docs/other-guides/virtual-dev/getting-started-minikf/).
|
||||||
|
@ -78,4 +91,6 @@
|
||||||
|
|
||||||
### References
|
### References
|
||||||
|
|
||||||
|
<br>
|
||||||
|
|
||||||
* [Announcing TensorFlow Quantum: An Open Source Library for Quantum Machine Learning](https://ai.googleblog.com/2020/03/announcing-tensorflow-quantum-open.html).
|
* [Announcing TensorFlow Quantum: An Open Source Library for Quantum Machine Learning](https://ai.googleblog.com/2020/03/announcing-tensorflow-quantum-open.html).
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue