matt-lourens / hierarqcal

Generate hierarchical quantum circuits for Neural Architecture Search.
https://matt-lourens.github.io/hierarqcal/
BSD 3-Clause "New" or "Revised" License
41 stars 15 forks source link

Issue 29 calculation electronic ground state energy for H2 #38

Closed andresulea closed 12 months ago

andresulea commented 1 year ago

I hope you enjoy this work about a molecular calculation using hierarqcal

matt-lourens commented 1 year ago

Hey @andresulea this is great! I really like the thorough explanation and notebook as a whole. I'm thinking of merging ideas from both this and the other PR by Gopal-Dahale into one notebook to function as a tutorial.

Unfortunately I will be awarding the bounty to Gopal-Dahale, he was first to submit a PR and the way he uses the masking primitive showcases a part of the package that I've been meaning to elaborate on more. Don't worry though, I'll see if I can make a plan to reward you for the work here, as it is a valuable contribution to the package (I hope there's more in the future also ;)).

I'll bounce some ideas of you when I start merging the two notebooks, but for the time being thanks!

andresulea commented 1 year ago

Hey @matt-lourens I'm glad you liked it. I kept working on this project to improve the precision of the results and I got it with fewer qubits. I think these new results would help you build a better notebook you have in mind. I will explain how I got it: instead of using the Jordan-Wigner transformation to obtain the qubit operator , it is better to use the parity transformation. What is necessary is that the circuit must be modified since with this transformation only 2 qubits are used. I attached the circuit that I proposed that I also built using hierarqcal and the result. If you like, I could also do a new PR of this notebook with these new modifications, I have no problem.

h2_using_parity_transformation circuit