@@ -889,27 +889,6 @@ class QuantumCircuit:
889889
890890 assert qc.size() == 19
891891
892- A particularly important circuit property is known as the circuit :meth:`depth`. The depth
893- of a quantum circuit is a measure of how many "layers" of quantum gates, executed in
894- parallel, it takes to complete the computation defined by the circuit. Because quantum
895- gates take time to implement, the depth of a circuit roughly corresponds to the amount of
896- time it takes the quantum computer to execute the circuit. Thus, the depth of a circuit
897- is one important quantity used to measure if a quantum circuit can be run on a device.
898-
899- The depth of a quantum circuit has a mathematical definition as the longest path in a
900- directed acyclic graph (DAG). However, such a definition is a bit hard to grasp, even for
901- experts. Fortunately, the depth of a circuit can be easily understood by anyone familiar
902- with playing `Tetris <https://en.wikipedia.org/wiki/Tetris>`_. Lets see how to compute this
903- graphically:
904-
905- .. image:: /source_images/depth.gif
906- :alt: Rotate the circuit and let each gate fall as far as possible. The gates fall \
907- into "layers". The depth of the circuit is the number of layers.
908-
909- We can verify our graphical result using :meth:`QuantumCircuit.depth`::
910-
911- assert qc.depth() == 9
912-
913892 .. automethod:: count_ops
914893 .. automethod:: depth
915894 .. automethod:: get_instructions
@@ -3490,6 +3469,14 @@ def depth(
34903469 ) -> int :
34913470 """Return circuit depth (i.e., length of critical path).
34923471
3472+ The depth of a quantum circuit is a measure of how many
3473+ "layers" of quantum gates, executed in parallel, it takes to
3474+ complete the computation defined by the circuit. Because
3475+ quantum gates take time to implement, the depth of a circuit
3476+ roughly corresponds to the amount of time it takes the quantum
3477+ computer to execute the circuit.
3478+
3479+
34933480 .. warning::
34943481 This operation is not well defined if the circuit contains control-flow operations.
34953482
0 commit comments