QuantumBFS / Yao.jl

Extensible, Efficient Quantum Algorithm Design for Humans.

Home Page:https://yaoquantum.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Implementation of function to calculate circuit depth

DhruvaSambrani opened this issue · comments

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.

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

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

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.