Qiskit / qiskit

Qiskit is an open-source SDK for working with quantum computers at the level of extended quantum circuits, operators, and primitives.
https://www.ibm.com/quantum/qiskit
Apache License 2.0
4.83k stars 2.29k forks source link

Missing example circuit in description of the TranspileLayout class API reference doc #12683

Open n-ion opened 6 days ago

n-ion commented 6 days ago

Environment

What is happening?

In the third paragraph of the TranspileLayout class API reference doc, the sentence seems to be pointing to an example input circuit. This circuit is either missing or not visible. The next paragraph references an example qubit reordering, which is also not present.

How can we reproduce the issue?

Going to https://docs.quantum.ibm.com/api/qiskit/qiskit.transpiler.TranspileLayout should show the missing examples

What should happen?

Either pictures or ASCII-art of the example circuit as well as information about the example qubit mapping reordering.

Any suggestions?

No response

mtreinish commented 5 days ago

The details are there in the source: https://github.com/Qiskit/qiskit/blob/main/qiskit/transpiler/layout.py#L695-L710 so I expect this is an issue in the rendering from Qiskit/documentation. I'll transfer this issue over there so they can track it.

shraddha-aangiras commented 3 days ago

@mtreinish Could this be due to the lack of a double colon in the documentation? ie

    .. plot:
       :include-source:

is present instead of

    .. plot::
       :include-source:

https://github.com/Qiskit/qiskit/blob/25c054251f50871ff9ad1dd5d3a7f2de2b2436fc/qiskit/transpiler/layout.py#L457-L481

Eric-Arellano commented 3 days ago

Good find @shraddha-aangiras! Yes, that is a problem. It looks like it happens 3 times. PR appreciated in qiskit/qiskit!