Skip to content

Commit

Permalink
Added READMEs
Browse files Browse the repository at this point in the history
  • Loading branch information
gonfeco committed Oct 14, 2024
1 parent 9ba4d3f commit 87d5abd
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 1 deletion.
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ The *Quantum Quantitative Finance Library* is structured as a standard Python li
3. **Phase Estimation (PE) package**: Located at *QQuantLib/PE*, this package includes modules for phase estimation algorithms applicable in amplitude estimation procedures.
4. **Amplitude Estimation (AE) package**: Situated in *QQuantLib/AE*, this package focuses on implementing various amplitude estimation algorithms.
5. **Finance package**: Housed in *QQuantLib/finance*, this package implements modules for employing amplitude estimation techniques to solve financial problems.
6. **Quantum Machine Learning for VaR (qml4var)**: Located in *QQuantLib/qml4var*, this package focus on implementing mandatory workflow for building and training **Parametric Quantum Circuits (PQC)** that can be used as a surrogate models for complex and time-consuming financial distributions. The trained surrogate models can be used for risk analysis and *VaR* computations.
6. **QPU package**: Located at *QQuantLib/qpu*, this package comprises modules for selecting different EVIDEN Quantum Process Units (**QPU**s) compatible with the QQuantLib library.
7. **Utils package**: Positioned at *QQuantLib/utils*, this package contains multiple modules with utilities utilized across other packages.

Expand All @@ -30,10 +31,11 @@ A series of Jupyter notebooks have been developed in the **misc/notebooks** fold

## Benchmark folder

In the benchmark folder, two Python packages are presented to assess the performance of various amplitude estimation algorithms (and their configurations) and different information encoding techniques in quantum circuits developed within the library:
In the benchmark folder, three Python packages are presented to assess the performance of various quantum algorithms:

1. **compare_ae_probability**: This package enables easy configuration of different amplitude estimation algorithms and their application to a simple amplitude estimation problem (this is getting the probability of a fixed state when a probability density array is loaded into a quantum circuit).
2. **q_ae_price**: This package simplifies the configuration of price estimation problems for different financial derivatives (call and put options, and futures) and solves them using various configurations of quantum amplitude estimation algorithms.
3. **qml4var**: This package allows to the user trains **PQC** that can be used of surrogate models of time consuming financial distribution functions.

## Acknowledgements

Expand Down
14 changes: 14 additions & 0 deletions benchmark/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Benchmark utilities

This folder contains three different packages that allows to the user executes benchmarks for testing the more important parts of the *QQuantLib*:

* **compare_ae_probability**: this package allows the user to test and compare the different quantum **AE** algorithms, from *QQuantLib*, easily. This can be done using the *probabiliy_estimation* module from command line. More information, how to uses and summary of results can be found in the notebook *CompareAEalgorithmsOnPureProbability.ipynb* (located inside the folder).
* **q_ae_price**: this package allows the user to test and compare different quantum **AE** algorithms, from **QQuantLib**, for pricing different options derivatives (using the **Black-Scholes** model for stock evolution). More information, how to use and summary of results can be found in the notebook: *Compare_AE_algorithms_On_PriceEstimation.ipynb* (located inside of the folder). Two different modules can be found:
* *benchmark_ae_option_price.py*: allows the user compute the option price using **AE** algorithms for an user defined option problem (python benchmark_ae_option_price.py -h for help)
* benchmark_ae_option_price_step_po.py: allows the user the compute the price of a derivative using different **AE** algorithms when the payoff function can take positive and negative values. In this case, the positive and negative parts of the payoff are loaded separately and two different estimations, using quantum **AE** algorithms, are obtained. These values should be post-processed to obtain the final desired value.
* **qml4var**: this package allows the user to test the *QQuantLib.qml4var* package. The following different modules (that can be executed from command line) can be found:
* *data_sets*: this module allows to the user build datasets for training a **PQC**. The user can select between a random or a properly configured **Black-Scholes** (a.k.a. log normal) distribution function. The module builds and stores the train and test datasets.
* *new_training*: allows the user to train a properly configured **PQC** using a given training dataset, a configured Adam optimizer and the $R_{L^2, \\bar{L}^2}^{S_{\\chi}}$ loss function.
* *new_training.py*: allows the user to continue the training of a **PQC** by loading the last stored trainable weights. The Loss function will be: $R_{L^2, \\bar{L}^2}^{S_{\\chi}}$
* *new_training_mse*: allows the user to train a properly configured **PQC** using a given training dataset, a configured Adam optimizer and the **Mean Square Error (MSE)** loss function.

0 comments on commit 87d5abd

Please sign in to comment.