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
1 change: 1 addition & 0 deletions .github/workflows/CI-Julia-nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,3 +58,4 @@ jobs:
- uses: julia-actions/julia-runtest@v1
env:
GROUP: ${{ matrix.group }}
JULIA_NUM_THREADS: auto
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

- Implement `EnrSpace` and corresponding functionality. ([#500])
- Check for orthogonality breakdown in `Lanczos` solver for `spectrum`. ([#501])
- Fix errors in `Julia v1.12`. ([#507])

## [v0.32.1]
Release date: 2025-06-24
Expand Down Expand Up @@ -258,3 +259,4 @@ Release date: 2024-11-13
[#494]: https://github.com/qutip/QuantumToolbox.jl/issues/494
[#500]: https://github.com/qutip/QuantumToolbox.jl/issues/500
[#501]: https://github.com/qutip/QuantumToolbox.jl/issues/501
[#507]: https://github.com/qutip/QuantumToolbox.jl/issues/507
8 changes: 4 additions & 4 deletions src/qobj/quantum_object_evo.jl
Original file line number Diff line number Diff line change
Expand Up @@ -381,7 +381,7 @@ Parse the `op_func_list` and generate the data for the `QuantumObjectEvolution`

op = :(op_func_list[$i][1])
dims_expr = (dims_expr..., :($op.dimensions))
func_methods_expr = (func_methods_expr..., :(methods(op_func_list[$i][2], [Any, Real]))) # [Any, Real] means each func must accept 2 arguments
func_methods_expr = (func_methods_expr..., :(methods(op_func_list[$i][2], [Any, Real]).ms)) # [Any, Real] means each func must accept 2 arguments
if i == 1
first_op = :($op)
end
Expand All @@ -406,10 +406,10 @@ Parse the `op_func_list` and generate the data for the `QuantumObjectEvolution`

# check if each func accepts 2 arguments
func_methods = tuple($(func_methods_expr...))
for f_method in func_methods
length(f_method.ms) == 0 && throw(
for i in eachindex(func_methods)
length(func_methods[i]) == 0 && throw(
ArgumentError(
"The following function must accept two arguments: `$(f_method.mt.name)(p, t)` with t<:Real",
"The following function must only accept two arguments: `$(nameof(op_func_list[i][2]))(p, t)` with t<:Real",
),
)
end
Expand Down
5 changes: 2 additions & 3 deletions src/time_evolution/brmesolve.jl
Original file line number Diff line number Diff line change
Expand Up @@ -189,8 +189,7 @@ function brmesolve(
end

function _check_br_spectra(f::Function)
meths = methods(f, [Real])
length(meths.ms) == 0 &&
throw(ArgumentError("The following function must accept one argument: `$(meths.mt.name)(ω)` with ω<:Real"))
length(methods(f, [Real]).ms) == 0 &&
throw(ArgumentError("The following function must only accept one argument: `$(nameof(f))(ω)` with ω<:Real"))
return nothing
end
2 changes: 1 addition & 1 deletion test/core-test/time_evolution.jl
Original file line number Diff line number Diff line change
Expand Up @@ -568,7 +568,7 @@ end
ntraj = ntraj,
progress_bar = Val(false),
)
@test allocs_tot < 1100 * ntraj + 1800 # TODO: Fix this high number of allocations
@test allocs_tot < 1100 * ntraj + 2300 # TODO: Fix this high number of allocations

allocs_tot = @allocations smesolve(
H,
Expand Down
Loading