Skip to content

Commit

Permalink
Update quantumcircuit.py
Browse files Browse the repository at this point in the history
  • Loading branch information
beckykd committed Dec 11, 2024
1 parent 4ad57ac commit b10af93
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions qiskit/circuit/quantumcircuit.py
Original file line number Diff line number Diff line change
Expand Up @@ -835,6 +835,7 @@ class QuantumCircuit:
Consider the following circuit:
.. plot::
:alt: [Circuit diagram output by the previous code.]
:include-source:
from qiskit import QuantumCircuit
Expand Down Expand Up @@ -901,6 +902,7 @@ class QuantumCircuit:
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`::
Expand Down Expand Up @@ -2169,7 +2171,8 @@ def tensor(self, other: "QuantumCircuit", inplace: bool = False) -> Optional["Qu
Examples:
.. plot::
:include-source:
:alt: [Circuit diagram output by the previous code.]
:include-source
from qiskit import QuantumCircuit
top = QuantumCircuit(1)
Expand Down Expand Up @@ -3425,7 +3428,8 @@ def draw(
Example:
.. plot::
:include-source:
:alt: [Circuit diagram output by the previous code.]
:include-source
from qiskit import QuantumRegister, ClassicalRegister, QuantumCircuit
qc = QuantumCircuit(1, 1)
Expand Down Expand Up @@ -4327,7 +4331,8 @@ def assign_parameters( # pylint: disable=missing-raises-doc
Create a parameterized circuit and assign the parameters in-place.
.. plot::
:include-source:
:alt: [Circuit diagram output by the previous code.]
:include-source
from qiskit.circuit import QuantumCircuit, Parameter
Expand All @@ -4342,7 +4347,8 @@ def assign_parameters( # pylint: disable=missing-raises-doc
Bind the values out-of-place by list and get a copy of the original circuit.
.. plot::
:include-source:
:alt: [Circuit diagram output by the previous code.]
:include-source
from qiskit.circuit import QuantumCircuit, ParameterVector
Expand Down

0 comments on commit b10af93

Please sign in to comment.