Skip to content
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

Classiq Basics: Quantum Addition #29

Closed
amir-naveh opened this issue Apr 28, 2024 · 2 comments
Closed

Classiq Basics: Quantum Addition #29

amir-naveh opened this issue Apr 28, 2024 · 2 comments
Labels
good first issue Good for newcomers quantum intermediate Requires some basic knowledge in quantum computing

Comments

@amir-naveh
Copy link
Member

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:

  1. Create a new jupyter notebook (.ipynb file). Use any jupyter editor (e.g. jupyter lab, google colab, etc).
  2. 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.
  3. 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.
  4. 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.
  5. Make sure the notebook looks well, does not have any typos / mistakes, and is running properly.
  6. 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!

@amir-naveh amir-naveh added good first issue Good for newcomers quantum intermediate Requires some basic knowledge in quantum computing labels Apr 28, 2024
@mitul3737
Copy link

I would like to work on this

@ddri
Copy link

ddri commented Jul 18, 2024

I would like to work on this

@mitul3737 per Amir's thorough notes, you could get started on this and submit the PR as advised. This is a great "Good First Issue"! Good luck.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers quantum intermediate Requires some basic knowledge in quantum computing
Projects
None yet
Development

No branches or pull requests

3 participants