Skip to content

Commit 8b2f6bd

Browse files
authored
Close previous figures in docs plots. (Qiskit#13635)
1 parent 55d2da8 commit 8b2f6bd

File tree

6 files changed

+13
-13
lines changed

6 files changed

+13
-13
lines changed

qiskit/circuit/library/grover_operator.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ def grover_operator(
118118
119119
.. plot::
120120
:include-source:
121-
:context:
121+
:context: close-figs
122122
123123
oracle = QuantumCircuit(1)
124124
oracle.z(0) # the qubit state |1> is the good state
@@ -133,7 +133,7 @@ def grover_operator(
133133
134134
.. plot::
135135
:include-source:
136-
:context:
136+
:context: close-figs
137137
138138
oracle = QuantumCircuit(4)
139139
oracle.z(3)
@@ -150,7 +150,7 @@ def grover_operator(
150150
151151
.. plot::
152152
:include-source:
153-
:context:
153+
:context: close-figs
154154
155155
from qiskit.quantum_info import Statevector, DensityMatrix, Operator
156156

qiskit/circuit/library/n_local/efficient_su2.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ def efficient_su2(
8585
8686
.. plot::
8787
:include-source:
88-
:context:
88+
:context: close-figs
8989
9090
circuit = efficient_su2(4, su2_gates=["rx", "y"], entanglement="circular", reps=1)
9191
circuit.draw("mpl")

qiskit/circuit/library/n_local/excitation_preserving.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ def excitation_preserving(
7171
7272
.. plot::
7373
:include-source:
74-
:context:
74+
:context: close-figs
7575
7676
from qiskit.circuit.library import excitation_preserving
7777

qiskit/circuit/library/n_local/n_local.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ def n_local(
161161
162162
.. plot::
163163
:include-source:
164-
:context:
164+
:context: close-figs
165165
166166
circuit = n_local(3, ["ry", "rz"], "cz", "full", reps=1, insert_barriers=True)
167167
circuit.draw("mpl")
@@ -170,7 +170,7 @@ def n_local(
170170
171171
.. plot::
172172
:include-source:
173-
:context:
173+
:context: close-figs
174174
175175
circuit = n_local(4, [], "cry", reps=2)
176176
circuit.draw("mpl")
@@ -179,7 +179,7 @@ def n_local(
179179
180180
.. plot::
181181
:include-source:
182-
:context:
182+
:context: close-figs
183183
184184
entangler_map = [[0, 1], [2, 0]]
185185
circuit = n_local(3, "x", "crx", entangler_map, reps=2)
@@ -191,7 +191,7 @@ def n_local(
191191
192192
.. plot:
193193
:include-source:
194-
:context:
194+
:context: close-figs
195195
196196
def entanglement(layer_index):
197197
if layer_index % 2 == 0:

qiskit/circuit/library/n_local/real_amplitudes.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -78,21 +78,21 @@ def real_amplitudes(
7878
7979
.. plot::
8080
:include-source:
81-
:context:
81+
:context: close-figs
8282
8383
ansatz = real_amplitudes(3, entanglement="full", reps=2) # it is the same unitary as above
8484
ansatz.draw("mpl")
8585
8686
.. plot::
8787
:include-source:
88-
:context:
88+
:context: close-figs
8989
9090
ansatz = real_amplitudes(3, entanglement="linear", reps=2, insert_barriers=True)
9191
ansatz.draw("mpl")
9292
9393
.. plot::
9494
:include-source:
95-
:context:
95+
:context: close-figs
9696
9797
ansatz = real_amplitudes(4, reps=2, entanglement=[[0,3], [0,2]], skip_unentangled_qubits=True)
9898
ansatz.draw("mpl")

qiskit/transpiler/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -620,7 +620,7 @@
620620
621621
['id', 'rz', 'sx', 'x', 'cx', 'measure', 'delay']
622622
623-
.. plot:
623+
.. plot::
624624
:include-source:
625625
626626
from qiskit.circuit import QuantumCircuit

0 commit comments

Comments
 (0)