-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
new parameters in
plot_bloch_multivector
: figsize
, font_size
, a…
…nd `title_font_size` (#7264) * Update state_visualization.py Closes #7263 * Introduced font size, title font size and title padding to plot_bloch_multivector * Update state_visualization.py Documented new kwargs. * Fixed code formatting issues in previous commits of #7264. * Update qiskit/visualization/bloch.py Co-authored-by: Luciano Bello <bel@zurich.ibm.com> * Update qiskit/visualization/bloch.py Co-authored-by: Luciano Bello <bel@zurich.ibm.com> * Update qiskit/visualization/state_visualization.py Co-authored-by: Luciano Bello <bel@zurich.ibm.com> * Update qiskit/visualization/state_visualization.py Co-authored-by: Luciano Bello <bel@zurich.ibm.com> * Create update-state-visualization-6836bd53e3a24891.yaml Added release notes. * Update test_graph_matplotlib_drawer.py Included a test for the new features. * fix test * blacking --------- Co-authored-by: Luciano Bello <bel@zurich.ibm.com>
- Loading branch information
Showing
5 changed files
with
82 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
23 changes: 23 additions & 0 deletions
23
releasenotes/notes/update-state-visualization-6836bd53e3a24891.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
--- | ||
features: | ||
- | | ||
The ``figsize`` argument of | ||
:obj:`~qiskit.visualization.plot_bloch_multivector` can now be used to | ||
set a size for individual Bloch ball sub-plots: if there are ``num`` | ||
qubits and ``(w, h)`` is passed to ``figsize``, then the overall figure | ||
width is set to ``num*w``, while the overall height is set to ``h``. | ||
- | | ||
A new ``font_size`` keyword argument for | ||
:obj:`~qiskit.visualization.plot_bloch_multivector` can be used to | ||
control the font size in Bloch ball sub-plots. | ||
- | | ||
New ``title_font_size`` and ``title_pad`` keyword arguments | ||
for :obj:`~qiskit.visualization.plot_bloch_multivector` can be used to | ||
control the font size of the overall title and its padding. | ||
fixes: | ||
- | | ||
Previous to this release, the ``figsize`` argument of | ||
:obj:`~qiskit.visualization.plot_bloch_multivector` was not used by the | ||
visualization, making it impossible to change its size (e.g. to shrink | ||
it for single-qubit states). This release fixes it by introducing a use | ||
for the ``figsize`` argument. |
Binary file added
BIN
+41 KB
test/ipynb/mpl/graph/references/bloch_multivector_figsize_improvements.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters