I ran into a problem of how to extract circuit depth from Cirq circuit object. In Cirq circuits consist of a list of Moments. Number of moments is not equal to the circuit depth in general case. I might be missing something, but I looked into documentation and source code and still wasn't able to find it.
So, I am wondering if there is a simple way to extract circuit depth?
This is one of the main circuit properties, it is very strange why it is not implemented directly. For example in Qiskit there are methods qc.depth()
and qc.count_ops()
.
Thanks!