Skip to content

Extension for the Makie.jl ecosystem

This is an extension to support visualization (plotting functions) using Makie.jl library.

This extension will be automatically loaded if user imports both QuantumToolbox.jl and Makie.jl. It is worth noting that the Makie.jl package provides only the engine for plotting, and the user has to import the specific backend. Here we demonstrate the usage of CairoMakie.jl, which will automatically import Makie.jl.

julia
using QuantumToolbox
using CairoMakie

To plot with CairoMakie.jl library, specify the keyword argument library = Val(:Makie) for the plotting functions.

Beware of type-stability!

If you want to keep type stability, it is recommended to use Val(:Makie) instead of :Makie. See this link and the related Section about type stability for more details.

The supported plotting functions are listed as follows:

Plotting FunctionDescription
plot_wignerWigner quasipropability distribution
plot_fock_distributionFock state distribution