Skip to content
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

Documentation of dag_drawer is unclear on allowed types #13021

Closed
jakelishman opened this issue Aug 23, 2024 · 4 comments · Fixed by #13235
Closed

Documentation of dag_drawer is unclear on allowed types #13021

jakelishman opened this issue Aug 23, 2024 · 4 comments · Fixed by #13235
Assignees
Labels
documentation Something is not clear or an error documentation good first issue Good for newcomers

Comments

@jakelishman
Copy link
Member

Talking about qiskit.visualization.dag_visualization:

          What's the reason to have a `not isinstance(dag, DAGCircuit)` path in this function?

Originally posted by @jakelishman in #12550 (comment)

The documentation of dag_drawer implies that only DAGCircuit is allowable, but actually the function is intended to work with DAGDependency as well. We should update the documentation to be accurate.

@jakelishman jakelishman added good first issue Good for newcomers documentation Something is not clear or an error documentation labels Aug 23, 2024
@github-project-automation github-project-automation bot moved this to Tagged but unassigned in Contributor Monitoring Aug 23, 2024
@azhar-ikhtiarudin
Copy link
Contributor

Hi, I am new to contributing to Qiskit and would like to learn. Is this issue still open, and may I be assigned to it? Thank you.

@AngeloDanducci
Copy link
Contributor

@azhar-ikhtiarudin assigned, thanks!

@azhar-ikhtiarudin
Copy link
Contributor

Hi, I apologize for the delay in my response. I’ve reviewed the case. Is it correct that I only need to add DAGDependency to the dag parameter? If so, the documentation should read:

dag (DAGCircuit, DAGDependency)

Is it correct? or should I also include example code or other details?

Thank you!

I refer to this page: https://github.com/Qiskit/documentation/blob/main/docs/api/qiskit/qiskit.visualization.dag_drawer.mdx

@azhar-ikhtiarudin
Copy link
Contributor

Hi, I've checked this issue again and realized that maybe the appropriate documentation to update is located here:

https://github.com/Qiskit/qiskit/blob/main/qiskit/visualization/dag_visualization.py

particularly in this section:

    Args:
        dag (DAGCircuit or DAGDependency): The dag to draw.

Could you kindly confirm if this is the correct place for the update? My apologies for any earlier confusion, and thank you for your understanding.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Something is not clear or an error documentation good first issue Good for newcomers
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

3 participants