-
Notifications
You must be signed in to change notification settings - Fork 275
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
Added an example of quantum adder #326
base: develop
Are you sure you want to change the base?
Conversation
An illustrated tutorial about how to construct a quantum adder circuit by implementing SUM and CARRY.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you Jerry for the interest and the proposal.
I have some concept questions, Is this adder taking advantage of the quantum nature of the qubits? If I try the notebook (using the sample test) by setting qureg_A[0] in a superposition state, which output I will get? Is the adder a binary one? if so, which is the point to have an example that is not using the quantum nature in ProjectQ?
In addition and in order to make the notebook usable in some jupytier environment I would add at the beginning a code line with
!pip install projectq
Thank you
Thank you for paying attention, I am always glad to have someone to discuss with the topic of quantum computation. As for your question, is this adder taking advantage of the quantum nature of the qubits? I think the answer is yes (though not explicitly). This quantum adder is based on Vedral et al., the first implementation of quantum addition as far as I can track back in history. It is one basic building block of quantum modular exponentiation, which is the most demanding part of Shor's algorithm. So if we use it as a part of Shor's algorithm, the input state will be |1>, which is a superposition of eigenstates of Multiply_Modulo_N operator. So yes, in that sense the quantum nature of parallelism is utilized. By the way, in the build-in function of projectQ, |
Sorry for the delay in the answer. Thank you for the references and for the explanantion. Now I think it is clear the intention. I would suggest to add the information of the reference in the notebook. In addition, do you plan to add all the operations that are described in the paper? I think it would complete the example. Regarding the comment on adding to the notebook a first code line
what do you think? Finally, if I'm not wrong, in order to be able merge, some maganement should be in place (contributor agreemnt). @Takishima, can you please help on this? |
Everybody that contributes to ProjectQ is required to sign a Copyright Licence Agreement (CLA). |
@JerryZYGo Did you manage to get the CLA signed? If not please do so. Until this is done I will not be reviewing this PR. |
Hi I am interested in this project, so I want to make some contribution by adding an illustrated tutorial explaining how to construct a quantum adder. I hope this can lower the learning curve for other beginners.