Classiq / classiq-library

The Classiq Library is the largest collection of quantum algorithms and applications. It is the best way to explore quantum computing software. We welcome community contributions to our Library 🙌
https://platform.classiq.io
MIT License
327 stars 290 forks source link

Add initial conditions to the arithmetic example in the arithmetic_expressions notebook #36

Closed TomerGoldfriend closed 3 months ago

TomerGoldfriend commented 4 months ago

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:

  1. Open the Arithmetic Expressions notebook, using any jupyter editor (e.g. jupyter lab, google colab, etc).
  2. In the quantum model, replace the allocate calls for the quantum numbers x and y with appropriate prepare_int calls.
  3. For the two quantum programs in the notebook, add an execute call, print the results and compare to the expected result.
  4. Make sure to run the write_qmod line, which will automatically update the .qmod files 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.
  7. Commit all the files changed under the tutorials/technology_demonstrations/arithmetic_expressions/ directory.
  8. 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!

scssandanayake commented 3 months ago

Hello I'd like to work on this issue .

mahnoor04 commented 3 months ago

Is this issue still open?

AbdullahKazi500 commented 3 months ago

@TomerGoldfriend made a PR Which will close the issue

jyotiraj-code commented 3 months ago

Hi @TomerGoldfriend, I have requested a PR which will solve this issue

In the PR I have:

The PR follows all the contribution guidelines for solving the issue.

It was good to work on this issue :)

jyotiraj-code commented 3 months ago

Dear @AbdullahKazi500 it is hurtful to see such allegation about the plagiarism about the PR request I have made. The Commit has been created based on the structure already provided in the Arithmetic Expressions notebook with addition of documentation too.

@AbdullahKazi500 I have seen your PR and it seems you have not followed some of the guidelines:

I deeply regret that your PR doesn't qualify for the merge as the directory your submission is pointing to is different from the mentioned directory.

jyotiraj-code commented 3 months ago

Dear @AbdullahKazi500 it is kind of bold allegation from your side. As you can see from the following mentioned directory I have taken the example of the qubit numbers.

image

Please try to comprehend that all the examples which has been mentioned are already available and I have directly taken reference from there.

jyotiraj-code commented 3 months ago

Dear @TomerGoldfriend one more thing than this conflict I want to add is that this directory has already been assigned, which shouldn't be case for the UnitaryHack2024 until the issue gets closed.

jyotiraj-code commented 3 months ago

Dear @AbdullahKazi500 isn't it funny the example you have taken for your Arithmetic expressions notebook is already present in the directory (as provided by the screenshot I have attached)? Does it qualify for piracy or plagiarism? or is it taking the reference and only changing the necessary code as mentioned in the issue.

What you are trying to do here currently can be considered as cyberbullying and maybe some penalties!

TomerGoldfriend commented 3 months ago

Dear @AbdullahKazi500 , @jyotiraj-code I would like to thank both of you for your interest in resolving this issue, and I apologize for my late response. I have briefly reviewed your PRs and will comment on each one of them shortly. However, already now I can say that @jyotiraj-code 's PR fits to the issue description and requirements. @AbdullahKazi500 I am sorry, but your PR does not match the detailed requirements.

I would appreciate if you can avoid using inappropriate words and alligations. Again, thank you both for this contribution.

AbdullahKazi500 commented 3 months ago

Thanks @TomerGoldfriend for the feedback