Skip to content

Commit

Permalink
rm Makie.jl from depend and polish Makie docs
Browse files Browse the repository at this point in the history
  • Loading branch information
apkille committed Oct 17, 2024
1 parent 50baf23 commit 1c725fe
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 4 deletions.
1 change: 0 additions & 1 deletion Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand Down
5 changes: 4 additions & 1 deletion docs/src/tutorials.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion ext/MakieExt/MakieExt.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion src/errors.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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."

1 comment on commit 1c725fe

@JuliaRegistrator
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Error while trying to register: Version 1.0.0 already exists

Please sign in to comment.