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

Implementation of function to calculate circuit depth #426

Open
DhruvaSambrani opened this issue Sep 21, 2022 · 3 comments · May be fixed by #454
Open

Implementation of function to calculate circuit depth #426

DhruvaSambrani opened this issue Sep 21, 2022 · 3 comments · May be fixed by #454
Labels
enhancement New feature or request

Comments

@DhruvaSambrani
Copy link

Request for a function equivalent to circuit.depth() in Qiskit.

Here is the logic to find the depth, note that since at each step, the depth of the AbstractBlock needs to be added, which may not just be 1.

I may have missed this in the docs and the issues, or it may be called differently, and if so, please close the issue.

@Roger-luo
Copy link
Member

Hi thanks for the issue, you are right we don't have this function currently.

@DhruvaSambrani
Copy link
Author

Hi @Roger-luo,

I've implemented a part of the depth algorithm here -
https://dhruvasambrani.github.io/html-uploads/depth-yao.html

If you think the method is scalable, let me know so I can finish writing the touches implementations for other block

@Roger-luo
Copy link
Member

it seems your touches function is just occupied_locs function.

From your current implementation, it seems in general implements the steps described in the stack exchange, so I think it makes sense. Please feel free to make a PR, so we can further improve the implementation.

@DhruvaSambrani DhruvaSambrani linked a pull request Jan 29, 2023 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants