Skip to content

DAGCircuit is missing adequate documentation #1431

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

Open
5 tasks
sbrandhsn opened this issue May 27, 2024 · 10 comments · May be fixed by #3200 or #3221
Open
5 tasks

DAGCircuit is missing adequate documentation #1431

sbrandhsn opened this issue May 27, 2024 · 10 comments · May be fixed by #3200 or #3221

Comments

@sbrandhsn
Copy link

URL to the relevant documentation

A DAGCircuit (https://docs.quantum.ibm.com/api/qiskit/qiskit.dagcircuit.DAGCircuit) is an essential part of the transpilation backbone.
Formerly, we had the tutorial at https://github.com/Qiskit/qiskit-tutorials/blob/master/tutorials/circuits_advanced/04_transpiler_passes_and_passmanager.ipynb to describe how to work with a DAGCircuit but nowadays there is no information on that except what is included in the API docs at https://docs.quantum.ibm.com/api/qiskit/qiskit.dagcircuit.DAGCircuit

Specifically, https://docs.quantum.ibm.com/transpile/custom-transpiler-pass points to https://www.rustworkx.org/tutorial/dags.html which is not as useful as the previously available tutorial for users that want to develop their own passes.

Select all that apply

  • typo
  • code bug
  • out-of-date content
  • broken link
  • other

Describe the fix.

Insert a subset of the content at https://github.com/Qiskit/qiskit-tutorials/blob/master/tutorials/circuits_advanced/04_transpiler_passes_and_passmanager.ipynb into the docs or add a new section that describes how to work with the DAGCircuit to users that want to develop their own passes.

@abbycross
Copy link
Collaborator

Hi @sbrandhsn, thanks for opening the issue. Does the unitary synthesis plugin example in the the "Create a transpiler plugin" page help at all? It's the only other place where I see DAGCircuit mentioned in the docs.

Marking this as needs discussion so our team can assess next steps.

@abbycross
Copy link
Collaborator

@sbrandhsn can you specify the material from the tutorial you'd like to see added into the docs?

@sbrandhsn
Copy link
Author

I believe sections 'Introducing the DAG' and 'Implementing a BasicMapper Pass' would be helpful. Longterm, I think 'Introducing the DAG' can be extended heavily to highlight any new functionality in DAGCircuit since 10+ months ago and maybe also include some information on its (asymptotic) performance.

@javabster
Copy link
Collaborator

I agree, I think the content we currently have on DAG stuff could be expanded into it's own page.

@JGeipel
Copy link

JGeipel commented May 28, 2025

Interested in trying this one for unitaryHACK.

@AbdullahKazi500
Copy link

AbdullahKazi500 commented May 28, 2025

Hi @Eric-Arellano and @sbrandhsn made a PR addressing the issue with the latest version of qiskit 2.0

@SecludedPerson700 SecludedPerson700 linked a pull request May 28, 2025 that will close this issue
@SecludedPerson700
Copy link

SecludedPerson700 commented May 28, 2025

I am interested in the issue as well
I Created a PR

@kaelynj
Copy link
Collaborator

kaelynj commented May 28, 2025

Hi @JGeipel, @AbdullahKazi500, @SecludedPerson700 . Thanks for you interest in working on this for the Unitary Hack! I'll go through and review each of these PRs in submission order.

@AbdullahKazi500
Copy link

Hi @JGeipel, @AbdullahKazi500, @SecludedPerson700 . Thanks for you interest in working on this for the Unitary Hack! I'll go through and review each of these PRs in submission order.

Thanks

@1ucian0
Copy link
Member

1ucian0 commented May 29, 2025

👋 This issue is part of UnitaryHack 2025. For the duration of the event, it follows a few special rules and considerations:

  • No need to be assigned to start working on it, just go ahead! This holds until the end of UnitaryHack.
  • If multiple PRs are submitted to close this issue, maintainers may select one at the end of the event and award the bounty accordingly.
  • If more than one person works on a single PR, please note that the bounty cannot be split.
  • In some cases, a not-fully-complete but close-enough PR might receive a partial bounty.
  • If you have any questions or need clarification, feel free to ask in the comments here. Please note that while maintainers do their best to reply, responses might take longer than you expect.

Happy hacking! 🧑‍💻✨

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment