-
Notifications
You must be signed in to change notification settings - Fork 85
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
Show more sample output with primitives #1143
Comments
the difficulty with converting these to notebooks is that they show V1 vs V2 and we haven't figured out how to nicely do that in notebooks. But I can add output |
Jumping in, since I just went through the process of converting an mdx file with tabs in it, to ipynb. For the uninitiated, tab syntax is like this:
If there were a way to include two types of code cells within each Since (so far) it seems we can't do that, both the markdown and the code must be enclosed within one markdown cell, which means the code cannot get checked by the linter. It also renders difficult the ability to display the output of the code, since it has to be manually placed, rather than simply running the code and including the output from that. Hoping some other, better solutions will bubble up :) |
This is why I haven't converted any. :) |
I have noticed the issues with converting tabs in jupyter notebooks while reviewing #812. I think that the tabs are really valuable when showing side-by-side V1 and V2 code, and as far as I know, there isn't a good alternative in jupyter notebooks (other than duplicating the notebook and having a V1 and V2 version, which I personally wouldn't mind as a user, but might be complicated to handle in terms of links etc). In general, I think that jupyter offers less flexibility in terms of formatting options. When we were using sphinx to render the docs we could add testeable snippets to the |
run/primitives.mdx doesn't have any print statements. |
You can actually wrap notebook cells in tab blocks. Just end a markdown cell with It's not perfect (from an editing standpoint) but worked OK for me in |
I don't see tabs in that notebook. This is where the tabs are supposed to be: |
Yes sorry the tabs don't render in the GitHub notebook viewer but they work correctly on the website, see this preview for an example: https://qiskit-docs-preview-pr-1160.1799mxdls7qz.us-south.codeengine.appdomain.cloud/verify/plot-quantum-states |
Oh great!! |
Feedback
It's useful to see the output of primitives code to understand how they behave. We don't show this in https://docs.quantum.ibm.com/run/primitives-get-started, https://docs.quantum.ibm.com/run/primitives, https://docs.quantum.ibm.com/run/primitives-examples. We only have print statements that aren't executed.
Other comments
This could be somewhat addressed by rewriting the files to Jupyter notebooks that show the output: #169.
The text was updated successfully, but these errors were encountered: