Open DhruvaSambrani opened 1 year ago
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.
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.