-
Notifications
You must be signed in to change notification settings - Fork 59
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
Add tutorial 13_trotterQRTE.ipynb
#66
Add tutorial 13_trotterQRTE.ipynb
#66
Conversation
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.
CI is failing due to the fact that we spell check content that becomes part of the published docs and this ends up failing. Colorplot
, I mentioned in the review below, is a title I think we can alter to fix that and at the same time make it more informative as a title. Others like exponentials
and the names should be added the .pylintdict in the root (lowercase and in alphabetic order so its easier for us to manage). The spelling failures are in the CI build details. Names we often end up doing this with - and sometimes with plurals exponentials
- its an adjective which I guess is why the dictionary does not have a plural form - but I get that its used sometimes as you have it so adding it to the dict will allow it to stay like this ie matrix exponentials
docs/tutorials/13_trotterQRTE.ipynb
Outdated
} | ||
], | ||
"source": [ | ||
"result.evolved_state" |
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.
Would it make sense to print this here so it can be seen as a circuit. As it stands currently this cell does output something <qiskit.circuit.quantumcircuit.QuantumCircuit at 0x7f3146a42d50>
but its just the name/instance. That can be suppressed (add a trailing ; to the line) but maybe printing the circuit would be better for the reader?
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.
You are totally right about this cell output. Nothing ended up convincing me. There was already a comment in the original discussion that was never resolved. Let me paste part of it below:
[...] I would draw the quantum circuit, using
'mpl'
as the output argument. However, this quantum circuit isn't composed of standard gates. One would need to decompose it two times, and then decompose it specifying which gates to decompose, via a line likeresult.evolved_state.decompose(reps=2).decompose('disentangler_dg').decompose('multiplex1_reverse_dg').draw('mpl')
but this seems a bit specific for a tutorial like this. For this reason, I decided to show that it is (an instance of) a QuantumCircuit. [...]
I attach below a couple of images that will hopefully give an impression of why I am not a big fan of this solution. Let me know what are your thoughts on this! :)
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.
I suggest drawing both the "raw" output of evolved_state
and the decomposed version + a short explanation of why we are decomposing (to show the standard gates that are used in this circuit).
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.
After a brief chat with Elena, for now we are going with both: result.evolved_state.draw('mpl')
and the version that brings all gates to standard Circuit Library gates. That comes in commit 0d31c9f
. 👍
Co-authored-by: Steve Wood <[email protected]>
Co-authored-by: Steve Wood <[email protected]>
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.
I think this is all the other link formatting issues like the one I first commented on - not sure if you saw the note I had put in there about others.
Remove backticks from link text (2) Co-authored-by: Steve Wood <[email protected]>
Missing name "masuo" Co-authored-by: Elena Peña Tapia <[email protected]>
Co-authored-by: Elena Peña Tapia <[email protected]>
Pull Request Test Coverage Report for Build 5963765342
💛 - Coveralls |
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.
LGTM! Thank you very much @ialsina for this great work. I will wait for @woodsp-ibm approval, but I think it's ready to be merged.
Co-authored-by: Steve Wood <[email protected]>
@ialsina LGTM - thanks for work and contributing this tutorial. |
@woodsp-ibm @ElePT Thank you for your reviews! From my side it was a pleasure :) |
Summary
Qiskit Algorithms tutorial for Trotter QRTE.
Details and comments
The original discussion can be found in the original Qiskit PR.