Add initial conditions to the arithmetic example in the arithmetic_expressions notebook
The Arithmetic Expressions notebook demonstrates the capabilities of the Classiq's synthesis engine, in the framework of quantum arithmetics. The notebook shows a single quantum model, consisting a complex arithmetic expression, and synthesizes it with two different optimization scenarios.
The example in the notebook does not include an execution of the resulting quantum programs. Moreover, execution of the current example will result in a non-indicative measurement, as the arithmetic expression operates on two quantum variables, x and y, which are initialized to the zero state, and the result of the expression is trivial.
The goal of this issue is to add initial conditions and execution to the arithmetic_expressions notebook.
To complete this issue, follow these steps:
- Open the Arithmetic Expressions notebook, using any jupyter editor (e.g. jupyter lab, google colab, etc).
- In the quantum model, replace the
allocatecalls for the quantum numbersxandywith appropriateprepare_intcalls. - For the two quantum programs in the notebook, add an
executecall, print the results and compare to the expected result. - Make sure to run the
write_qmodline, which will automatically update the .qmod files for this example. - Make sure the notebook looks well, does not have any typos / mistakes, and is running properly.
- Follow the contribution guidelines to open a pull request.
- Commit all the files changed under the
tutorials/technology_demonstrations/arithmetic_expressions/directory. - 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!