From 1c725fefc2b85be9f23c0ad7cd1bdeb48e9b9f71 Mon Sep 17 00:00:00 2001 From: apkille Date: Wed, 16 Oct 2024 22:01:10 -0400 Subject: [PATCH] rm Makie.jl from depend and polish Makie docs --- Project.toml | 1 - docs/src/tutorials.md | 5 ++++- ext/MakieExt/MakieExt.jl | 2 +- src/errors.jl | 2 +- 4 files changed, 6 insertions(+), 4 deletions(-) diff --git a/Project.toml b/Project.toml index d77b38f..a45e21b 100644 --- a/Project.toml +++ b/Project.toml @@ -6,7 +6,6 @@ version = "1.0.0" [compat] julia = "1.6.7" LinearAlgebra = "1.9" -Makie = "0.21.9" QuantumInterface = "0.3.4" StaticArrays = "1.9.7" diff --git a/docs/src/tutorials.md b/docs/src/tutorials.md index d1f41c0..a0123be 100644 --- a/docs/src/tutorials.md +++ b/docs/src/tutorials.md @@ -2,7 +2,10 @@ ## Visualizations -Quasiprobability distributions of Gaussian states can be visualized with [Makie.jl](https://github.com/MakieOrg/Makie.jl): +Quasiprobability distributions of Gaussian states can be visualized with [Makie.jl](https://github.com/MakieOrg/Makie.jl). Gabs.jl +currently has support for the following distributions, which can be called with the keyword argument `dist`: +- [`wigner`](@ref) +- [`wignerchar`](@ref) ```@example using Gabs, CairoMakie diff --git a/ext/MakieExt/MakieExt.jl b/ext/MakieExt/MakieExt.jl index 2f28d9e..b4683cb 100644 --- a/ext/MakieExt/MakieExt.jl +++ b/ext/MakieExt/MakieExt.jl @@ -7,7 +7,7 @@ Makie.used_attributes(::Type{<:Makie.Heatmap}, ::Any, ::Any, x::GaussianState) = # Directly use heatmap to create wigner distribution function Makie.convert_arguments(P::Type{<:Makie.Heatmap}, q, p, state::GaussianState; dist = :wigner) - isequal(length(state.mean),2) || throw(ArgumentError(Gabs.MAKIE_ERROR)) + isequal(length(state.mean),2) || throw(ArgumentError(Gabs.HEATMAP_ERROR)) if isequal(dist, :wigner) data = [wigner(state, [i,j]) for i in q, j in p] elseif isequal(dist, :wignerchar) diff --git a/src/errors.jl b/src/errors.jl index 328a38f..fb8159b 100644 --- a/src/errors.jl +++ b/src/errors.jl @@ -21,5 +21,5 @@ ACTION_ERROR = lazy"The number of modes for the Gaussian operator WIGNER_ERROR = lazy"The length of your input array does not match the number of modes for the Gaussian state." -MAKIE_ERROR = lazy"The input Gaussian state describes more than one mode. +HEATMAP_ERROR = lazy"The input Gaussian state describes more than one mode. A heat map visualization for a multi-mode Gaussian state is not possible."