Skip to content

Commit 1603d71

Browse files
authored
Merge branch 'main' into fix/sol-times
2 parents 05b4268 + 3057e3e commit 1603d71

File tree

5 files changed

+10
-8
lines changed

5 files changed

+10
-8
lines changed

.github/workflows/CI-Julia-nightly.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,3 +58,4 @@ jobs:
5858
- uses: julia-actions/julia-runtest@v1
5959
env:
6060
GROUP: ${{ matrix.group }}
61+
JULIA_NUM_THREADS: auto

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1010
- Implement `EnrSpace` and corresponding functionality. ([#500])
1111
- Check for orthogonality breakdown in `Lanczos` solver for `spectrum`. ([#501])
1212
- Store both `tlist` and `times` in time evolution solutions. ([#506], [#504])
13+
- Fix errors in `Julia v1.12`. ([#507])
1314

1415
## [v0.32.1]
1516
Release date: 2025-06-24
@@ -261,3 +262,4 @@ Release date: 2024-11-13
261262
[#501]: https://github.com/qutip/QuantumToolbox.jl/issues/501
262263
[#504]: https://github.com/qutip/QuantumToolbox.jl/issues/504
263264
[#506]: https://github.com/qutip/QuantumToolbox.jl/issues/506
265+
[#507]: https://github.com/qutip/QuantumToolbox.jl/issues/507

src/qobj/quantum_object_evo.jl

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -381,7 +381,7 @@ Parse the `op_func_list` and generate the data for the `QuantumObjectEvolution`
381381

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

407407
# check if each func accepts 2 arguments
408408
func_methods = tuple($(func_methods_expr...))
409-
for f_method in func_methods
410-
length(f_method.ms) == 0 && throw(
409+
for i in eachindex(func_methods)
410+
length(func_methods[i]) == 0 && throw(
411411
ArgumentError(
412-
"The following function must accept two arguments: `$(f_method.mt.name)(p, t)` with t<:Real",
412+
"The following function must only accept two arguments: `$(nameof(op_func_list[i][2]))(p, t)` with t<:Real",
413413
),
414414
)
415415
end

src/time_evolution/brmesolve.jl

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -189,8 +189,7 @@ function brmesolve(
189189
end
190190

191191
function _check_br_spectra(f::Function)
192-
meths = methods(f, [Real])
193-
length(meths.ms) == 0 &&
194-
throw(ArgumentError("The following function must accept one argument: `$(meths.mt.name)(ω)` with ω<:Real"))
192+
length(methods(f, [Real]).ms) == 0 &&
193+
throw(ArgumentError("The following function must only accept one argument: `$(nameof(f))(ω)` with ω<:Real"))
195194
return nothing
196195
end

test/core-test/time_evolution.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -578,7 +578,7 @@ end
578578
ntraj = ntraj,
579579
progress_bar = Val(false),
580580
)
581-
@test allocs_tot < 1100 * ntraj + 1800 # TODO: Fix this high number of allocations
581+
@test allocs_tot < 1100 * ntraj + 2300 # TODO: Fix this high number of allocations
582582

583583
allocs_tot = @allocations smesolve(
584584
H,

0 commit comments

Comments
 (0)