-
Notifications
You must be signed in to change notification settings - Fork 292
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Refactor the Option Pricing notebook to use classiq constructs #37
Comments
Hi @orsa-classiq & @amir-naveh, I would like to work on this issue. May I please know what exactly do you mean by "native language constructs"? I am assuming that the functions needs to be changed to classiq 0.42.0 version. Please correct me if I am wrong. I look forward to hearing from you soon :) |
Hi @Qubit1718, we will be really glad if you take it :) By 'native language constructs' we mean using a |
You mean the |
You can just ignore this function, and re-write the notebook from scratch. I refer you to the mentioned paper for understanding of the algorithm. |
Got it, @orsa-classiq. I'll start reading the paper and post it to you if I have any further questions. Thanks! |
@Qubit1718 are you still working on this? |
@orsa-classiq , @Qubit1718 - let me know if this is still open, otherwise I will close. Thanks |
will be released on v0.44 |
Using quantum computers for pricing financial derivatives has the promise for quadratic speedup.
In this issue we will improve the current option-pricing notebook, implementing algorithm for european call options, based on the paper Option Pricing using Quantum Computers. The goal is to use native language constructs instead of the current
construct_finance_model
black box function in the existing implementation.to complete this issue, follow the following steps:
construct_finance_model
,function_input
in the model creation. You will later on use native language functions Instead.num_qubits
,mu
,sigma
,threshold
. A bonus is to derive them from financial parameters. Use theprepare_state
function on calculated lognormal distribution with the parameters, and some truncation value (5 sigma). This can be computed classically and passed to theprepare_state
as an array of probabilities.*=
syntax, see amplitude loading example. Pay attention for needed remapping of the variables and normalization, as done in the paper. Here, in difference from the article, the implementation is exact and not approximated.iqae
execution scheme, that uses the iterative amplitude estimation, and the built-ingrover_operator
. See quantum_counting for example.assert
validation to the code.write_qmod(qmod, "option_pricing.qmod")
line. Run the notebook, and you will automatically update the .qmod file for this example.If you have any questions or comments, you can ask them here in the issue, or in our slack community, and the Classiq team will be happy to assist.
Happy quantum coding!
The text was updated successfully, but these errors were encountered: