Skip to content

Conversation

@albertomercurio
Copy link
Member

@albertomercurio albertomercurio commented Oct 15, 2024

Description

With this PR I remove the obsolete operators like OperatorSum and TimeDependentOperatorSum, by introducing the QobjEvo operator, like in python. This struct takes advantage of the SciMLOperators.jl ecosystem, in order to handle in a lazy way complex operators like sum of them and time-dependent ones.

The ObjEvo is and AbstractQuantumObject, with the same fields as the QuantumObject, so they share many of the methods.

The introduction of using SciMLOperators.jl would push us towards the support of automatic differentiation of sesolve, mesolve and mcsolve, allowing the possibility to make quantum optimal control very efficiently.

I made this PR to improve the performance of complex SciMLOperators like our sum of time-dependent operators. So, we have to wait for a new release of the package first.

Todo list:

  • Introduce QobjEvo operator
  • Remove tlist from the parameters, and add it directly as argument
  • Make TimeEvolutionSol type-stable
  • replace t_l with a more readable tlist
  • Update docstrings
  • Remove OperatorSum and TimeDependentOperatorSum
  • Update sesolve with the support to QobjEvo
  • Update mesolve with the support to QobjEvo
  • Update mcsolve with the support to QobjEvo
  • Update ssesolve with support to QobjEvo
  • Remove alg as argument for all the Problem functions
  • Add tests for all the added methods
  • Wait for merging of this PR and new release of SciMLOperators.jl

I will add the documentation in the next PRs. This one is already heavy.

@albertomercurio albertomercurio marked this pull request as ready for review October 21, 2024 08:19
@codecov
Copy link

codecov bot commented Oct 21, 2024

Codecov Report

Attention: Patch coverage is 97.11538% with 12 lines in your changes missing coverage. Please review.

Project coverage is 93.80%. Comparing base (d3f1313) to head (deb2605).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
src/qobj/quantum_object_evo.jl 97.00% 3 Missing ⚠️
src/time_evolution/mesolve.jl 92.85% 2 Missing ⚠️
src/time_evolution/sesolve.jl 90.90% 2 Missing ⚠️
src/time_evolution/ssesolve.jl 96.00% 2 Missing ⚠️
src/qobj/quantum_object_base.jl 98.18% 1 Missing ⚠️
src/qobj/superoperators.jl 91.66% 1 Missing ⚠️
src/time_evolution/time_evolution_dynamical.jl 98.24% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #266      +/-   ##
==========================================
+ Coverage   93.41%   93.80%   +0.39%     
==========================================
  Files          31       32       +1     
  Lines        2337     2422      +85     
==========================================
+ Hits         2183     2272      +89     
+ Misses        154      150       -4     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@albertomercurio albertomercurio merged commit 3357706 into qutip:main Oct 22, 2024
10 of 12 checks passed
albertomercurio added a commit to albertomercurio/QuantumToolbox.jl that referenced this pull request Nov 10, 2024
…p#266)

* First working implementation

* Minor changes

* First working case of sesolve

* Minor changes

* Rebase commits

* Apply Yi-Te comments

* Working mesolve

* Make dsf_mesolve and dfd_mesolve work

* Minor changes

* Working version of ssesolve

* Remove sleep in runtests

* Remove OperatorSum and TimeDependentOperatorSum

* Remove alg as argument from all problem definitions

* First working  runtests

* Add tests for QObjEvo and time evolution

* Add docstrings to documentation

* Reduce tolerance for stochastic runtests

* Make runtests multithreaded and reduce time for timeevolution tests

* Add QobjEvo tests and minor changes

* Update docstrings

* Add comment on the use of MatrixOperator
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.

2 participants