QQuantLib.finance
quantum_integration
This module contains a function for solving integrals using Amplitude Estimation techniques. The function uses the Encoding class for loading data into the quantum circuit by creating an oracle and the AE class for getting the amplitude of a selected state using AE techniques. The function deals with all the normalisations needed for transform this amplitude into the desired integral.
Authors: Alberto Pedro Manzano Herrero & Gonzalo Ferro
- tnbs.BTC_02_AE.QQuantLib.finance.quantum_integration.q_solve_integral(**kwargs)
Function for solving an integral using quantum amplitude estimation techniques.
- Parameters:
kwars (dictionary) –
Dictionary for configuring the integration to compute and the AE technique used for getting the solution.
- array_functionnumpy array
numpy array with the desired function for encoding into the Quantum Circuit.
- encodingint
Selecting the encode protocol
- array_probabilitynumpy array
numpy array with the desired probability for encoding into the Quantum Circuit. It can be None (uniform distribution will be used)
- ae_typestring
string with the desired AE algorithm: MLAE, CQPEAE, IQPEAE, IQAE, RQAE
Note
Other kwargs input dictionary keys will be related with the encoding of the integral into the quantum circuit (see QQuantLib.DL.encoding_protocols) and for the configuration of the AE algorithm used (see QQuantLib.AE.ae_class)
- Returns:
ae_estimation (pandas DataFrame) – DataFrame with the desired integral computation.
solver_ae (objet based on the AE class)