Skip to content

Conversation

@ytdHuang
Copy link
Member

@ytdHuang ytdHuang commented Dec 8, 2024

Checklist

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

  • Please read Contributing to QuantumToolbox.jl.
  • 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.
  • (If necessary) the CHANGELOG.md should be updated (regarding to the code changes) and built by running: make changelog.

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

Summary of this PR:

  • add new methods to generate QobjEvo with input type Tuple{QuantumObject,Function}.
  • add argument checks for each coefficient Function by using Base.methods.

Related issues or PRs

close #338

@codecov
Copy link

codecov bot commented Dec 8, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 93.30%. Comparing base (0f2c4a1) to head (d5834af).
Report is 5 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #339      +/-   ##
==========================================
+ Coverage   93.28%   93.30%   +0.02%     
==========================================
  Files          38       38              
  Lines        2637     2645       +8     
==========================================
+ Hits         2460     2468       +8     
  Misses        177      177              

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

@ytdHuang
Copy link
Member Author

ytdHuang commented Dec 8, 2024

Hmm...

the code-quality test succeed in my local laptop...

Not sure why it fails in CI pipeline

@albertomercurio
Copy link
Member

I think it's good. Do we have tests for type instabilities? What happens if we run

@inferred QobjEvo((op, coef))

and all the other methods?

@ytdHuang
Copy link
Member Author

ytdHuang commented Dec 8, 2024

I think it's good. Do we have tests for type instabilities? What happens if we run

@inferred QobjEvo((op, coef))

and all the other methods?

Ok, added~

@albertomercurio
Copy link
Member

Are you using the latest versions in your local runtests for the code quality?

@ytdHuang
Copy link
Member Author

ytdHuang commented Dec 8, 2024

Are you using the latest versions in your local runtests for the code quality?

Yes, JET v0.9.12 on MacOS m-series chip

Also,JET v0.9.12 on MacOS intel-chip also passes

@albertomercurio
Copy link
Member

I have the same error locally

@albertomercurio
Copy link
Member

I think the error comes from the new method definition of QuantumObjectEvolution and the Julia version v1.11.2. Either removing the error, or running with Julia v1.10.7 doesn't show the error. But still we need to know why.

@ytdHuang
Copy link
Member Author

ytdHuang commented Dec 10, 2024

@albertomercurio

Ok, fixed

@albertomercurio albertomercurio merged commit 5e108e1 into qutip:main Dec 10, 2024
15 of 16 checks passed
@ytdHuang ytdHuang deleted the dev/QobjEvo branch December 10, 2024 08:22
labay11 pushed a commit to labay11/QuantumToolbox.jl that referenced this pull request Dec 22, 2024
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.

Solving problems with time-dependent Hamiltonians

2 participants