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

example of alali use with grover search #15

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

gravityshouldbenaut
Copy link

No description provided.

@jbgoonucdavis jbgoonucdavis marked this pull request as draft August 5, 2020 17:29
@jbgoonucdavis jbgoonucdavis marked this pull request as ready for review August 5, 2020 17:29
@jbgoonucdavis jbgoonucdavis self-requested a review August 5, 2020 17:30
Copy link
Collaborator

@jbgoonucdavis jbgoonucdavis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good Samarth! A few things about the code/comments:

  • At the beginning you mention Guanine, but then you switch to Glycine. You might want to double check this.
  • When I ran the script on my machine, the plot did not print or pop up. You might want to trouble shoot this. Let me know if it still works for you, and we can have a 3rd person try.
  • For readability, you might consider creating a jupyter notebook. Not required, but you seem to have a lot of comments etc about what you are doing. You could also consider creating a markdown notebook with explanations for what you did in the script.
  • In construct_oracle(), you created variables edges, inv_edges, and combinededges. Then you don't use them. Maybe consider deleting that code, as to not confuse anyone?
  • You might want to use math.pi instead of 3.14

A question about the chemistry:

  • I see you used valence electrons for each of the elements. The concept of valence electrons changes once there are covalent bonds. For example, with a C-H bond. Carbon alone has 6 valence electrons, and hydrogen has 1. However, once they are bonded, carbon ends up with 8 valence electrons and hydrogen with 2. Maybe I'm misinterpreting your reasoning, or just misunderstanding how the circuit works. A greater explanation for this would be helpful for anyone reading and possibly trying to replicate your work.

Overall it looks good! Good example of how to use ALALI's .graph attribute in conjunction with Qiskit.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants