This repository contains several modules for implementing Quantum Estimation and Amplification algorithms using QLM for future implementation of a financial toolkit.
The LICENCE file contains the default licence statement as specified in the proposal and partner agreement.
For simplicity, an example of setup.py file is provided in this template.
Feel free to modify it if you have exotic build recipes.
The my_lib/ folder is where the modules (python scripts) of present library were stored.
The main modules of the library are:
- data_loading: This modules contains functions for loading data into a quantum circuit. Two different implementations of loading data in the amplitudes of the quantum state were implemented:
- brute force mode: the data is loaded using multi-controlled rotations directly.
- quantum multiplexors: the data is loaded using quantum multiplexors that is a much efficient way than the first method.
- amplitude_amplification: This module implements all mandatory operators (that are implemented as QLM AbstractGate) for creating Grover-like operators based on loading data routines.
- maximum_likelihood_ae: This module implements the Maximum Likelihood Amplitude Estimation (MLAE) algorithm. The algorithm was implemented as a python class that given an input oracle operator (a QLM AbstractgGate or QRoutine), creates its correspondent Grover-like operator and implements the MLAE algorithm providing the typical results.
- iterative_quantum_pe: This module implements the Iterative Quantum Phase Estimation (IQPE) algorithm for phase estimation. The algorithm was implemented as python class. Two different ways of use can be done:
- Providing an Oracle and the class creates the correspondents initial_state and grover like operators and executes the IQPE algorithm providing the wanted phase.
- Providing an initial_state and grover operator, executing the IQPE algorithm and obtaining the wanted phase.
Additionally several auxiliary modules were developed:
- data_extracting: this module contains functions to execute circuits and post-process results of QLM solver in proper way presentation.
- utils: this module contains several auxiliary functions that are used for all the other modules of the library.
The misc/notebooks folder contains examples demonstrating how the different modules of the library can be used. In general each notebook shows how to use each of the main modules:
-
01_DataLoading_Module_Use: contains different examples for using the functions of the data_loading module.
-
02_AmplitudeAmplification_Operators: explains the theory behind the Grover-like operator for amplitude amplification using the functions of the module amplitude_amplification.
-
03_AmplitudeAmplification_Procedure: shows how implement amplitude amplification procedure for calculating expected value of function when x follows a probability distribution (
) using the Grover-like operators programming in amplitude_amplification module.
-
04_MaximumLikelihood_Class: explains the MLAE algorithm and the use of the MLAE class programmed in the maximum_likelihood_ae module.
-
05_Iterative_QPE_Class: explains the use of the IterativeQuantumPE class in the iterative_quantum_pe module for using the IQPE algorithm.
This work is supported by the NEASQC project, funded by the European Union's Horizon 2020 programme, Grant Agreement No. 951821.
Customize the GitHub Workflow YAML file: repo_name/.github/workflow/sphinx_doc.yml There is a basic index.rst template under 'doc'. Modify it as you want.
Any modification under the folder 'doc' pushed to GitHub will trigger a rebuild of the documentation (using GitHub CI). If the build is successful, then the resulting html documentation can be access at: https://neasqc.github.io/repo_name
Notes:
- You can follow the build process on the 'Actions' tab below the name of the repository.
- neasqc.github.io does not immediately update. You may need to wait a minute or two before it see the changes.