You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In this issue, we will create a simple tutorial of quantum addition using Classiq.
This tutorial should follow the structure of the quantum superpostion tutorial:
To complete this issue, follow these steps:
Create a new jupyter notebook (.ipynb file). Use any jupyter editor (e.g. jupyter lab, google colab, etc).
Use Classiq's SDK to create quantum addition: $|a\rangle|b\rangle|0\rangle^{\otimes n} \rightarrow |a\rangle|b\rangle|a+b\rangle $. So, for example, if $a=\frac{1}{\sqrt{2}}(|1\rangle + |3\rangle)$ and $b = |2\rangle$ the final state should be $|\psi\rangle = \frac{1}{\sqrt{2}}(|1\rangle |2\rangle|3\rangle + |3\rangle|2\rangle|5\rangle)$.
To do this, you can use the + operator, built in to the QMOD language. Create two registers in an initial state, and add them using the + operator. You can find examples here.
Similar to the superposition notebook, create a short mathematical explanation of the work. Jupyter notebooks support markdown cells, which can contain LaTeX. You can view the source or the superposition notebook to see how this is done. Chat GPT is an excellent LaTeX assistant.
After creating the notebook, make sure you insert the write_qmod(model, "bell_state.qmod") line. Run the notebook, and you will automatically generate the .qmod file 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. Submit the tutorial to the directory: classiq-library/community/basic_examples/quantum_addition
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:
In this issue, we will create a simple tutorial of quantum addition using Classiq.
This tutorial should follow the structure of the quantum superpostion tutorial:
To complete this issue, follow these steps:
To do this, you can use the
+
operator, built in to the QMOD language. Create two registers in an initial state, and add them using the+
operator. You can find examples here.write_qmod(model, "bell_state.qmod")
line. Run the notebook, and you will automatically generate the .qmod file for this example.classiq-library/community/basic_examples/quantum_addition
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: