Makie bloch sphere extension
This PR introduces a new Makie-based Bloch sphere visualization extension for QuantumOpticsBase.
Features:
- `blochsphere(state::Ket)` renders the Bloch sphere for any spin-1/2 quantum state.
- The Bloch vector is calculated directly from the `Ket` input.
- Supports CairoMakie and GLMakie backends.
- Sphere and arrows fully represent the quantum state.
- Project.toml updated to include Makie as a weak dependency and an extension.
Testing:
- Example: ( in julia )
using QuantumOpticsBase
using CairoMakie
include("ext/QuantumOpticsBaseMakieExt.jl")
using .QuantumOpticsBaseMakieExt
b = SpinBasis(1//2)
state = spinup(b)
f = blochsphere(state)
合并状态:未合并 1 条评论