quantum_integration
This module contains the q_solve_integral function that allows to the user codify easily an integral in a quantum state, using the different encoding protocols from the Encoding class from QQuantLib.DL.encoding_protocols module, and estimating it using the different AE algorithms implemented in the QQuantLib.AE package.
The q_solve_integral function deals with all the normalisations needed for transforming the estimated amplitude into the desired integral.
Authors: Alberto Pedro Manzano Herrero & Gonzalo Ferro
- QQuantLib.finance.quantum_integration.q_solve_integral(**kwargs)
Function for solving an integral using quantum amplitude estimation techniques.
- Parameters:
array_function (kwargs, numpy array) – numpy array with the desired function for encoding into the Quantum Circuit.
encoding (kwargs, int) – Selecting the encode protocol
array_probability (kwargs, numpy array) – numpy array with the desired probability for encoding into the Quantum Circuit. It can be None (uniform distribution will be used)
ae_type (kwargs, string) – 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)