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

Feature/qft #45

Open AmyRouillard opened 11 months ago

AmyRouillard commented 11 months ago

Final draft of Grover's algorithm tutorial.

AmyRouillard commented 11 months ago

I think we can call this tutorial "almost" finished now...I tried to change some of pivots in the Toffili to motifs but there was an error from Qiskit. Could you please check that I didn't make a stupid mistake?

AmyRouillard commented 11 months ago

(This is up-to-date with the current version of develop)

matt-lourens commented 11 months ago

I think we can call this tutorial "almost" finished now...I tried to change some of pivots in the Toffoli to motifs but there was an error from Qiskit. Could you please check that I didn't make a stupid mistake?

Hey, I just looked at the error, Qinit(3) by default creates [1,2,3] instead of [0,1,2] and then using [(0,1)] on an edge reference a bit label that doesn't exist. I changed the behavior so that it starts from [0,1,2] and added a value error message if someone wrongly specifies Qmotif edges. So that Qmotif edge specifications works on qubit labels and not qubit order (for custom labeling etc)

The fix + some other minor stuff is on a branch called hotfix/qmotif, can you merge that into this branch (I tried but had trouble with git permissions, there won't be any merge conflicts since I branched of your latest commit here.) The changes I made to grover is just that commented line + the final plot I made wider.

But awesome, I agree this tutorial is in tip to shape and ready for deployment :D

AmyRouillard commented 11 months ago

Hey, should be correctly merged now. Please double check :)