Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
2 changes: 0 additions & 2 deletions Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ Distributed = "8ba89e20-285c-5b6f-9357-94700520ee1b"
FFTW = "7a1cc6ca-52ef-59f5-83cd-3a7055c09341"
Graphs = "86223c79-3864-5bf0-83f7-82e725a168b6"
IncompleteLU = "40713840-3770-5561-ab4c-a76e7d0d7895"
LaTeXStrings = "b964fa9f-0449-5b57-a5c2-d3ea65f4040f"
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
LinearSolve = "7ed4a6bd-45f5-4d41-b270-4a48e9bafcae"
OrdinaryDiffEqCore = "bbf590c4-e513-4bbe-9b18-05decba2e5d8"
Expand Down Expand Up @@ -52,7 +51,6 @@ GPUArrays = "10, 11"
Graphs = "1.7"
IncompleteLU = "0.2"
KernelAbstractions = "0.9.2"
LaTeXStrings = "1.2"
LinearAlgebra = "1"
LinearSolve = "2, 3"
Makie = "0.20, 0.21, 0.22"
Expand Down
4 changes: 2 additions & 2 deletions docs/make.jl
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ end
DocMeta.setdocmeta!(QuantumToolbox, :DocTestSetup, doctest_setup; recursive = true)

# some options for `makedocs`
const DRAFT = false # set `true` to disable cell evaluation
const DOCTEST = true # set `false` to skip doc tests
const DRAFT = get(ENV, "DRAFT", false) == "true" # set `true` to disable cell evaluation
const DOCTEST = get(ENV, "DOCTEST", true) == "true" # set `false` to skip doc tests

# generate bibliography
bib = CitationBibliography(
Expand Down
3 changes: 2 additions & 1 deletion ext/QuantumToolboxMakieExt.jl
Original file line number Diff line number Diff line change
Expand Up @@ -417,7 +417,7 @@ function _draw_bloch_sphere!(b::Bloch, ax)
base_color = parse(RGBf, b.sphere_color)
sphere_color = RGBAf(base_color, b.sphere_alpha)
sphere_mesh = Sphere(Point3f(0), radius)
mesh!(ax, sphere_mesh; color = sphere_color, shading = NoShading, transparency = true)
mesh!(ax, sphere_mesh; color = sphere_color, shading = NoShading, transparency = true, rasterize = 3)
θ_vals = range(0.0f0, 2π, length = n_lon + 1)[1:(end-1)]
φ_curve = range(0.0f0, π, length = 600)
line_alpha = max(0.05, b.sphere_alpha * 0.5)
Expand Down Expand Up @@ -644,6 +644,7 @@ function _plot_vectors!(b::Bloch, ax)
linewidth = b.vector_width,
arrowsize = arrowsize_vec,
arrowcolor = color,
rasterize = 3,
)
end
end
Expand Down
12 changes: 6 additions & 6 deletions src/visualization.jl
Original file line number Diff line number Diff line change
Expand Up @@ -110,11 +110,11 @@ A structure representing a Bloch sphere visualization for quantum states.
- `view::Tuple{Int,Int}}`: Azimuthal and elevation viewing angles in degrees (default: (-60, 30))

## Label properties
- `xlabel::Vector{AbstractString}}`: Labels for x-axis (default: [L"x", ""])
- `xlabel::Vector{String}}`: Labels for x-axis (default: [raw"$x$", ""])
- `xlpos::Vector{Float64}}`: Positions of x-axis labels (default: [1.0, -1.0])
- `ylabel::Vector{AbstractString}}`: Labels for y-axis (default: [L"y", ""])
- `ylabel::Vector{String}}`: Labels for y-axis (default: [raw"$y$", ""])
- `ylpos::Vector{Float64}}`: Positions of y-axis labels (default: [1.0, -1.0])
- `zlabel::Vector{AbstractString}}`: Labels for z-axis (default: [L"|0\rangle", L"|1\rangle"])
- `zlabel::Vector{String}}`: Labels for z-axis (default: [raw"$|0\rangle$", raw"$|1\rangle$"])
- `zlpos::Vector{Float64}}`: Positions of z-axis labels (default: [1.0, -1.0])
"""
@kwdef mutable struct Bloch
Expand All @@ -139,11 +139,11 @@ A structure representing a Bloch sphere visualization for quantum states.
vector_width::Float64 = 0.025
vector_arrowsize::NTuple{3,Real} = (0.07, 0.08, 0.08)
view::Tuple{Int,Int} = (-60, 30)
xlabel::Vector{AbstractString} = [L"x", ""]
xlabel::Vector{String} = [raw"$x$", raw""]
xlpos::Vector{Float64} = [1.0, -1.0]
ylabel::Vector{AbstractString} = [L"y", ""]
ylabel::Vector{String} = [raw"$y$", ""]
ylpos::Vector{Float64} = [1.0, -1.0]
zlabel::Vector{AbstractString} = [L"|0\rangle", L"|1\rangle"]
zlabel::Vector{String} = [raw"$|0\rangle$", raw"$|1\rangle$"]
zlpos::Vector{Float64} = [1.0, -1.0]
end

Expand Down
Loading