diff --git a/doc/code/qml_drawer.rst b/doc/code/qml_drawer.rst index e280537e80e..9bf0e46c2e5 100644 --- a/doc/code/qml_drawer.rst +++ b/doc/code/qml_drawer.rst @@ -26,7 +26,9 @@ be reset with ``qml.drawer.use_style('black_white')``. available_styles use_style -The following images are generated via the code: +The following images are generated via the following code, where ``style`` is +replaced by an available style specification string (e.g., ``"pennylane"`` or +``"solarized_light"``): .. code-block:: python @@ -42,6 +44,12 @@ The following images are generated via the code: qml.drawer.use_style(style) fig, ax = qml.draw_mpl(circuit)(1.2345, 1.2345) +Note that the shown ``pennylane`` style can be replicated exactly by having the +Quicksand Bold font installed and refreshing the Matplotlib font cache (by +deleting the ``fontlist`` file in the Matplotlib cache directory) — to find the +cache directory, run ``matplotlib.get_cachedir()``. If this font is not +available, the drawer will fall back on a default font. + Currently Available Styles ^^^^^^^^^^^^^^^^^^^^^^^^^^ .. |bws| image:: ../_static/style/black_white_style.png diff --git a/doc/releases/changelog-dev.md b/doc/releases/changelog-dev.md index e20ba24c7da..4342c2be3bd 100644 --- a/doc/releases/changelog-dev.md +++ b/doc/releases/changelog-dev.md @@ -259,6 +259,10 @@ of the computed qubit operator, if imaginary components are smaller than a threshold. [(#4639)](https://github.com/PennyLaneAI/pennylane/pull/4639) +* Plots generated with the `pennylane.drawer.plot` style of `matplotlib.pyplot` now have black + axis labels and are generated at a default DPI of 300. + [(#4690)](https://github.com/PennyLaneAI/pennylane/pull/4690) + * Updated `qml.device`, `devices.preprocessing` and the `tape_expand.set_decomposition` context manager to bring `DefaultQubit2` to feature parity with `default.qubit.legacy` with regards to using custom decompositions. The `DefaultQubit2` device can now be included in a `set_decomposition` @@ -408,7 +412,13 @@ Note that these functions are unstable while device upgrades are underway. [(#4555)](https://github.com/PennyLaneAI/pennylane/pull/4555) -* Minor documentation improvement to the usage example in the `qml.QuantumMonteCarlo` page. Integral was missing the differential dx with respect to which the integration is being performed. [(#4593)](https://github.com/PennyLaneAI/pennylane/pull/4593) +* Minor documentation improvement to the usage example in the `qml.QuantumMonteCarlo` page. + Integral was missing the differential dx with respect to which the integration is being performed. + [(#4593)](https://github.com/PennyLaneAI/pennylane/pull/4593) + +* Minor documentation improvement for the use of the `pennylane` style of `qml.drawer` and the + `pennylane.drawer.plot` style of `matplotlib.pyplot`. The use of the default font was clarified. + [(#4690)](https://github.com/PennyLaneAI/pennylane/pull/4690)