You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi @OmegaTwiddle, how are you running the code examples?
I've seen this confusion before when users run code examples in a Python script: Our documentation is written in Jupyter notebooks. In notebooks, the output of the last line of a cell is displayed right after the cell. In the case of qc.draw(), the output is a matplotlib figure, which has a rich representation (image). That's why you see the image immediately after the cell.
I do wonder if there's a way we can make this clearer to users though.
EDIT: I've since realised we do have a comment about that in the same code cell:
# Return a drawing of the circuit using MatPlotLib ("mpl"). This is the# last line of the cell, so the drawing appears in the cell output.# Remove the "mpl" argument to get a text drawing.
Do you remember if you saw this comment? I'm wondering how we could make it clearer to future readers.
URL to the relevant documentation
I'm following the tutorial at https://docs.quantum.ibm.com/guides/hello-world
If I follow Step 1 line for line, my script just exits without printing or displaying anything.
Select all that apply
Describe the fix.
I needed to add the below code to get it to show anything (this wasn't obvious to me).
The text was updated successfully, but these errors were encountered: