Skip to content

Extension for CairoMakie.jl

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

This extension will be automatically loaded if user imports both QuantumToolbox.jl and CairoMakie.jl:

julia
using QuantumToolbox
using CairoMakie

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

Beware of type-stability!

If you want to keep type stability, it is recommended to use Val(:CairoMakie) instead of :CairoMakie. 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