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
5 changes: 4 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased](https://github.com/qutip/QuantumToolbox.jl/tree/main)

- Make CUDA conversion more general using Adapt.jl. ([#437])
- Make CUDA conversion more general using Adapt.jl. ([#436], [#437])
- Make the generation of `fock` states non-mutating to support Zygote.jl. ([#438])

## [v0.29.1]
Release date: 2025-03-07
Expand Down Expand Up @@ -189,4 +190,6 @@ Release date: 2024-11-13
[#423]: https://github.com/qutip/QuantumToolbox.jl/issues/423
[#428]: https://github.com/qutip/QuantumToolbox.jl/issues/428
[#430]: https://github.com/qutip/QuantumToolbox.jl/issues/430
[#436]: https://github.com/qutip/QuantumToolbox.jl/issues/436
[#437]: https://github.com/qutip/QuantumToolbox.jl/issues/437
[#438]: https://github.com/qutip/QuantumToolbox.jl/issues/438
3 changes: 1 addition & 2 deletions src/qobj/states.jl
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,7 @@ function fock(N::Int, j::Int = 0; dims::Union{Int,AbstractVector{Int},Tuple} = N
if getVal(sparse)
array = sparsevec([j + 1], [1.0 + 0im], N)
else
array = zeros(ComplexF64, N)
array[j+1] = 1
array = [i == (j + 1) ? 1.0 + 0im : 0.0 + 0im for i in 1:N]
end
return QuantumObject(array; type = Ket, dims = dims)
end
Expand Down
Loading