Qiskit / documentation

The documentation content home for https://docs.quantum.ibm.com.
https://docs.quantum.ibm.com
Apache License 2.0
31 stars 50 forks source link

Image issues in transpiler stages topic #657

Closed beckykd closed 6 months ago

beckykd commented 6 months ago

URL to the relevant documentation

https://docs.quantum.ibm.com/transpile/transpiler-stages

Select all that apply

Describe the fix.

There are a couple of issues with images on this page.

beckykd commented 6 months ago

@abbycross or @kaelynj Can one of you help me figure this out?

abbycross commented 6 months ago

I suspect that the duplicate image Becky mentions above (see screenshot) can be removed altogether, unless @kaelynj do you recall if an image is intentional in this spot?

Screenshot 2024-01-19 at 3 43 40 PM
kaelynj commented 6 months ago

I used the same image for these two examples since they prepare the same example state. Though I see the point about having the same image twice. In the first part where it talks about the routing stage it might be better to instead add in a graph image of the hardware qubits that were assigned after the trivial_layout method was selected using plot_circuit_layout() from the qiskit.visualization module.

abbycross commented 6 months ago

I tried it out, using example lines of code from the API, and got this -- @kaelynj does this look like what you'd expect? 

Screenshot 2024-01-22 at 12 45 03 PM

This is the code I added to the cell

new_circ_lv1 = transpile(ghz, backend=backend, optimization_level=1)
plot_circuit_layout(new_circ_lv1, backend)
kaelynj commented 6 months ago

Yep! This shows the point that section is making about the need to select hardware qubits in a smarter way. The text might need to change a bit to reflect the different figure. Do you want/need me to make those changes?

abbycross commented 6 months ago

Oh my gosh I can't believe I got it right 🤣 If you could make those text changes, that would be wonderful. I'll open a PR and add the new image to it.

beckykd commented 6 months ago

Thanks @kaelynj and @abbycross !

beckykd commented 6 months ago

I used the same image for these two examples since they prepare the same example state. Though I see the point about having the same image twice. In the first part where it talks about the routing stage it might be better to instead add in a graph image of the hardware qubits that were assigned after the trivial_layout method was selected using plot_circuit_layout() from the qiskit.visualization module.

If it's not a mistake, it's fine with me. I just wanted to make sure :)