Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix type instabilities for almost all functions #221

Merged
merged 12 commits into from
Sep 9, 2024

Conversation

albertomercurio
Copy link
Member

@albertomercurio albertomercurio commented Sep 8, 2024

Description

Here I solved several type instabilities. I added a test for any of those functions.

In the next PRs I will fix the type instabilities for dfd_mesolve and dsf_mesolve.

Just as an example, the ptrace function is now 10 times faster than the one of v0.12.0. I didn't benchmark all the funcitons, but now the code is more clear and efficient.

I have also removed the dependency for LinearMaps.jl since it was giving a weak type instability. I created an ad-hoc linear map struct for that.

@albertomercurio
Copy link
Member Author

In the previous runtests the benchmark succeded, so I think this was a fluctuation.

Copy link

codecov bot commented Sep 9, 2024

Codecov Report

Attention: Patch coverage is 92.59259% with 6 lines in your changes missing coverage. Please review.

Project coverage is 93.83%. Comparing base (f556c33) to head (c7d6732).
Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
src/qobj/functions.jl 55.55% 4 Missing ⚠️
src/linear_maps.jl 66.66% 1 Missing ⚠️
src/qobj/arithmetic_and_attributes.jl 83.33% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #221      +/-   ##
==========================================
- Coverage   94.89%   93.83%   -1.07%     
==========================================
  Files          29       30       +1     
  Lines        2115     2124       +9     
==========================================
- Hits         2007     1993      -14     
- Misses        108      131      +23     

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

test/quantum_objects.jl Outdated Show resolved Hide resolved
@albertomercurio albertomercurio merged commit 6add50d into qutip:main Sep 9, 2024
8 of 10 checks passed
albertomercurio added a commit to lgravina1997/QuantumToolbox.jl that referenced this pull request Sep 27, 2024
* Improve c_ops handling

* Format code

* Fix ptrace and operators

* Make states stable

* Fix type instabilities for qobj methods

* FIx eigenvalues

* Other fixes and format

* Minor changes to dfd_mesolve

* Fix typo

* Remove version condition of runtest
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