Skip to content

Comments

Update QuantumToolbox dependency and refactor ODE solver options usage#250

Draft
TendonFFF wants to merge 1 commit intoqutip:mainfrom
TendonFFF:compat/QuTiJ
Draft

Update QuantumToolbox dependency and refactor ODE solver options usage#250
TendonFFF wants to merge 1 commit intoqutip:mainfrom
TendonFFF:compat/QuTiJ

Conversation

@TendonFFF
Copy link
Contributor

Checklist

Thank you for contributing to HierarchicalEOM.jl! Please make sure you have finished the following tasks before opening the PR.

  • Please read Contributing to Quantum Toolbox in Julia.
  • Any code changes were done in a way that does not break public API.
  • Appropriate tests were added and tested locally by running: make test.
  • Any code changes should be julia formatted by running: make format.
  • All documents (in 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

Copilot AI review requested due to automatic review settings February 9, 2026 04:52
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 QuantumToolbox compatibility to 0.43.
  • Replace DEFAULT_ODE_SOLVER_OPTIONS usages with default_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,
Copy link

Copilot AI Feb 9, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copilot uses AI. Check for mistakes.
@TendonFFF TendonFFF marked this pull request as draft February 9, 2026 05:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant