Update QuantumToolbox dependency and refactor ODE solver options usage#250
Draft
TendonFFF wants to merge 1 commit intoqutip:mainfrom
Draft
Update QuantumToolbox dependency and refactor ODE solver options usage#250TendonFFF wants to merge 1 commit intoqutip:mainfrom
TendonFFF wants to merge 1 commit intoqutip:mainfrom
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Updates HierarchicalEOM.jl to be compatible with QuantumToolbox v0.43 by switching from the old DEFAULT_ODE_SOLVER_OPTIONS constant to the newer default_ode_solver_options(...) API when constructing ODE solver keyword arguments.
Changes:
- Bump
QuantumToolboxcompatibility to0.43. - Replace
DEFAULT_ODE_SOLVER_OPTIONSusages withdefault_ode_solver_options(eltype(M))in time-evolution and steady-state paths. - Update QuantumToolbox imports accordingly.
Reviewed changes
Copilot reviewed 3 out of 4 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| src/steadystate.jl | Uses default_ode_solver_options(eltype(M)) to source default tolerances for the steady-state ODE termination callback. |
| src/evolution.jl | Passes default_ode_solver_options(eltype(M)) into _merge_saveat to populate default solver kwargs. |
| src/HierarchicalEOM.jl | Updates QuantumToolbox imports to the new default ODE options API. |
| Project.toml | Restricts QuantumToolbox [compat] to v0.43 to match the updated API usage. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
96
to
+98
| ( | ||
| abstol = DEFAULT_ODE_SOLVER_OPTIONS.abstol, | ||
| reltol = DEFAULT_ODE_SOLVER_OPTIONS.reltol, | ||
| abstol = default_ode_solver_options(eltype(M)).abstol, | ||
| reltol = default_ode_solver_options(eltype(M)).reltol, |
There was a problem hiding this comment.
default_ode_solver_options(eltype(M)) is called twice just to access abstol/reltol. Consider calling it once (e.g., bind to a local opts) and then reading both fields to avoid duplicate work and guarantee both values come from the same options instance.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Checklist
Thank you for contributing to
HierarchicalEOM.jl! Please make sure you have finished the following tasks before opening the PR.make test.juliaformatted by running:make format.docs/folder) related to code changes were updated and able to build locally by running:make docs.Request for a review after you have completed all the tasks. If you have not finished them all, you can also open a Draft Pull Request to let the others know this on-going work.
Description
Describe the proposed change here.
Related issues or PRs
Please mention the related issues or PRs here. If the PR fixes an issue, use the keyword close/closes/closed/fix/fixes/fixed/resolve/resolves/resolved followed by the issue id, e.g. fix #[id]
Additional context