Skip to content

Commit b6dec38

Browse files
Dev/patch-3 (#482)
1 parent 89b036e commit b6dec38

File tree

4 files changed

+10
-11
lines changed

4 files changed

+10
-11
lines changed

Project.toml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ Distributed = "8ba89e20-285c-5b6f-9357-94700520ee1b"
1212
FFTW = "7a1cc6ca-52ef-59f5-83cd-3a7055c09341"
1313
Graphs = "86223c79-3864-5bf0-83f7-82e725a168b6"
1414
IncompleteLU = "40713840-3770-5561-ab4c-a76e7d0d7895"
15-
LaTeXStrings = "b964fa9f-0449-5b57-a5c2-d3ea65f4040f"
1615
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
1716
LinearSolve = "7ed4a6bd-45f5-4d41-b270-4a48e9bafcae"
1817
OrdinaryDiffEqCore = "bbf590c4-e513-4bbe-9b18-05decba2e5d8"
@@ -52,7 +51,6 @@ GPUArrays = "10, 11"
5251
Graphs = "1.7"
5352
IncompleteLU = "0.2"
5453
KernelAbstractions = "0.9.2"
55-
LaTeXStrings = "1.2"
5654
LinearAlgebra = "1"
5755
LinearSolve = "2, 3"
5856
Makie = "0.20, 0.21, 0.22"

docs/make.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@ end
1818
DocMeta.setdocmeta!(QuantumToolbox, :DocTestSetup, doctest_setup; recursive = true)
1919

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

2424
# generate bibliography
2525
bib = CitationBibliography(

ext/QuantumToolboxMakieExt.jl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -417,7 +417,7 @@ function _draw_bloch_sphere!(b::Bloch, ax)
417417
base_color = parse(RGBf, b.sphere_color)
418418
sphere_color = RGBAf(base_color, b.sphere_alpha)
419419
sphere_mesh = Sphere(Point3f(0), radius)
420-
mesh!(ax, sphere_mesh; color = sphere_color, shading = NoShading, transparency = true)
420+
mesh!(ax, sphere_mesh; color = sphere_color, shading = NoShading, transparency = true, rasterize = 3)
421421
θ_vals = range(0.0f0, 2π, length = n_lon + 1)[1:(end-1)]
422422
φ_curve = range(0.0f0, π, length = 600)
423423
line_alpha = max(0.05, b.sphere_alpha * 0.5)
@@ -644,6 +644,7 @@ function _plot_vectors!(b::Bloch, ax)
644644
linewidth = b.vector_width,
645645
arrowsize = arrowsize_vec,
646646
arrowcolor = color,
647+
rasterize = 3,
647648
)
648649
end
649650
end

src/visualization.jl

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -110,11 +110,11 @@ A structure representing a Bloch sphere visualization for quantum states.
110110
- `view::Tuple{Int,Int}}`: Azimuthal and elevation viewing angles in degrees (default: (-60, 30))
111111
112112
## Label properties
113-
- `xlabel::Vector{AbstractString}}`: Labels for x-axis (default: [L"x", ""])
113+
- `xlabel::Vector{String}}`: Labels for x-axis (default: [raw"$x$", ""])
114114
- `xlpos::Vector{Float64}}`: Positions of x-axis labels (default: [1.0, -1.0])
115-
- `ylabel::Vector{AbstractString}}`: Labels for y-axis (default: [L"y", ""])
115+
- `ylabel::Vector{String}}`: Labels for y-axis (default: [raw"$y$", ""])
116116
- `ylpos::Vector{Float64}}`: Positions of y-axis labels (default: [1.0, -1.0])
117-
- `zlabel::Vector{AbstractString}}`: Labels for z-axis (default: [L"|0\rangle", L"|1\rangle"])
117+
- `zlabel::Vector{String}}`: Labels for z-axis (default: [raw"$|0\rangle$", raw"$|1\rangle$"])
118118
- `zlpos::Vector{Float64}}`: Positions of z-axis labels (default: [1.0, -1.0])
119119
"""
120120
@kwdef mutable struct Bloch
@@ -139,11 +139,11 @@ A structure representing a Bloch sphere visualization for quantum states.
139139
vector_width::Float64 = 0.025
140140
vector_arrowsize::NTuple{3,Real} = (0.07, 0.08, 0.08)
141141
view::Tuple{Int,Int} = (-60, 30)
142-
xlabel::Vector{AbstractString} = [L"x", ""]
142+
xlabel::Vector{String} = [raw"$x$", raw""]
143143
xlpos::Vector{Float64} = [1.0, -1.0]
144-
ylabel::Vector{AbstractString} = [L"y", ""]
144+
ylabel::Vector{String} = [raw"$y$", ""]
145145
ylpos::Vector{Float64} = [1.0, -1.0]
146-
zlabel::Vector{AbstractString} = [L"|0\rangle", L"|1\rangle"]
146+
zlabel::Vector{String} = [raw"$|0\rangle$", raw"$|1\rangle$"]
147147
zlpos::Vector{Float64} = [1.0, -1.0]
148148
end
149149

0 commit comments

Comments
 (0)