diff --git a/docs/source_images/depth.gif b/docs/source_images/depth.gif deleted file mode 100644 index 4437049fc882..000000000000 Binary files a/docs/source_images/depth.gif and /dev/null differ diff --git a/qiskit/circuit/quantumcircuit.py b/qiskit/circuit/quantumcircuit.py index 83623227ae29..e4861a8c80c9 100644 --- a/qiskit/circuit/quantumcircuit.py +++ b/qiskit/circuit/quantumcircuit.py @@ -888,27 +888,6 @@ class QuantumCircuit: assert qc.size() == 19 - A particularly important circuit property is known as the circuit :meth:`depth`. The depth - of a quantum circuit is a measure of how many "layers" of quantum gates, executed in - parallel, it takes to complete the computation defined by the circuit. Because quantum - gates take time to implement, the depth of a circuit roughly corresponds to the amount of - time it takes the quantum computer to execute the circuit. Thus, the depth of a circuit - is one important quantity used to measure if a quantum circuit can be run on a device. - - The depth of a quantum circuit has a mathematical definition as the longest path in a - directed acyclic graph (DAG). However, such a definition is a bit hard to grasp, even for - experts. Fortunately, the depth of a circuit can be easily understood by anyone familiar - with playing `Tetris `_. Lets see how to compute this - graphically: - - .. image:: /source_images/depth.gif - :alt: Rotate the circuit and let each gate fall as far as possible. The gates fall \ - into "layers". The depth of the circuit is the number of layers. - - We can verify our graphical result using :meth:`QuantumCircuit.depth`:: - - assert qc.depth() == 9 - .. automethod:: count_ops .. automethod:: depth .. automethod:: get_instructions @@ -3489,6 +3468,14 @@ def depth( ) -> int: """Return circuit depth (i.e., length of critical path). + The depth of a quantum circuit is a measure of how many + "layers" of quantum gates, executed in parallel, it takes to + complete the computation defined by the circuit. Because + quantum gates take time to implement, the depth of a circuit + roughly corresponds to the amount of time it takes the quantum + computer to execute the circuit. + + .. warning:: This operation is not well defined if the circuit contains control-flow operations.