Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Background Map for Plotting #170

Open
wants to merge 20 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Export generate_map
hanakl committed Nov 21, 2024
commit a906db677347993c149c95bbd81d772f1eba6ef7
2 changes: 1 addition & 1 deletion src/QuantumSavory.jl
Original file line number Diff line number Diff line change
@@ -69,7 +69,7 @@ export
# noninstant.jl
AbstractNoninstantOperation, NonInstantGate, ConstantHamiltonianEvolution,
# plots.jl
registernetplot, registernetplot!, registernetplot_axis, resourceplot_axis
registernetplot, registernetplot!, registernetplot_axis, resourceplot_axis, generate_map


#TODO you can not assume you can always in-place modify a state. Have all these functions work on stateref, not stateref[]
8 changes: 2 additions & 6 deletions src/plots.jl
Original file line number Diff line number Diff line change
@@ -35,6 +35,7 @@ end
Requires a Makie backend be already imported."""
function resourceplot_axis(args...; kwargs...)
ext = Base.get_extension(QuantumSavory, :QuantumSavoryMakie)
if isnothing(ext)
throw("`resourceplot_axis` requires the package `Makie`; please make sure `Makie` is installed and imported first.")
end
@@ -44,12 +45,7 @@ end
"""Show the metadata tooltip for a given register slot.
Requires a Makie backend be already imported."""
function showmetadata(args...; kwargs...)
if isnothing(ext)
throw("`showmetadata` requires the package `Makie`; please make sure `Makie` is installed and imported first.")
end
return ext.showmetadata(args...; kwargs...)
end
function showmetadata end

function showonplot end