Skip to content

Commit c035b03

Browse files
committed
Update filename docstring
1 parent c6d2948 commit c035b03

1 file changed

Lines changed: 16 additions & 5 deletions

File tree

qiskit/visualization/state_visualization.py

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,9 @@ def plot_state_hinton(state, title="", figsize=None, ax_real=None, ax_imag=None,
4747
state (Statevector or DensityMatrix or ndarray): An N-qubit quantum state.
4848
title (str): a string that represents the plot title
4949
figsize (tuple): Figure size in inches.
50-
filename (str): file path to save image to.
50+
filename (str | None): The optional file path to save image to. If not specified
51+
no file is created for the visualization. If this is not ``None`` the return
52+
from this function will be ``None``.
5153
ax_real (matplotlib.axes.Axes): An optional Axes object to be used for
5254
the visualization output. If none is specified a new matplotlib
5355
Figure will be created and used. If this is specified without an
@@ -281,7 +283,9 @@ def plot_bloch_multivector(
281283
title_font_size (float): Font size for the title.
282284
title_pad (float): Padding for the title (suptitle ``y`` position is ``0.98``
283285
and the image height will be extended by ``1 + title_pad/100``).
284-
filename (str): file path to save image to.
286+
filename (str | None): The optional file path to save image to. If not specified
287+
no file is created for the visualization. If this is not ``None`` the return
288+
from this function will be ``None``.
285289
286290
Returns:
287291
:class:`matplotlib:matplotlib.figure.Figure` :
@@ -404,7 +408,9 @@ def plot_state_city(
404408
ax_real only the imaginary component plot will be generated.
405409
Additionally, if specified there will be no returned Figure since
406410
it is redundant.
407-
filename (str): file path to save image to.
411+
filename (str | None): The optional file path to save image to. If not specified
412+
no file is created for the visualization. If this is not ``None`` the return
413+
from this function will be ``None``.
408414
409415
Returns:
410416
:class:`matplotlib:matplotlib.figure.Figure` :
@@ -644,7 +650,9 @@ def plot_state_paulivec(state, title="", figsize=None, color=None, ax=None, *, f
644650
the visualization output. If none is specified a new matplotlib
645651
Figure will be created and used. Additionally, if specified there
646652
will be no returned Figure since it is redundant.
647-
filename (str): file path to save image to.
653+
filename (str | None): The optional file path to save image to. If not specified
654+
no file is created for the visualization. If this is not ``None`` the return
655+
from this function will be ``None``.
648656
649657
Returns:
650658
:class:`matplotlib:matplotlib.figure.Figure` :
@@ -829,7 +837,10 @@ def plot_state_qsphere(
829837
show the phase for each basis state.
830838
use_degrees (bool): An optional boolean indicating whether to use
831839
radians or degrees for the phase values in the plot.
832-
filename (str): file path to save image to.
840+
filename (str | None): The optional file path to save image to. If not specified
841+
no file is created for the visualization. If this is not ``None`` the return
842+
from this function will be ``None``.
843+
833844
834845
Returns:
835846
:class:`matplotlib:matplotlib.figure.Figure` :

0 commit comments

Comments
 (0)