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

Add custom integration paths and callbacks to josephson and densitymatrix #307

Merged
merged 2 commits into from
Oct 3, 2024

Conversation

pablosanjose
Copy link
Owner

With this PR we can give a collection of complex ωpoints to josephson(gs, ωpoints;...) and densitymatrix(gs, ωpoints; ...) and the integration will obediently be done along a polygonal path connecting them, without any sawtooth added. Only if ωpoints are all real will a sawtooth of the given slope be created.

We also added a callback kwarg that can be used to perform any operation at each integration step.

@codecov-commenter
Copy link

codecov-commenter commented Oct 3, 2024

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

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

Project coverage is 93.05%. Comparing base (365c267) to head (278fdae).
Report is 4 commits behind head on master.

Files with missing lines Patch % Lines
src/observables.jl 93.18% 6 Missing ⚠️

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #307      +/-   ##
==========================================
+ Coverage   92.77%   93.05%   +0.27%     
==========================================
  Files          38       38              
  Lines        6494     6548      +54     
==========================================
+ Hits         6025     6093      +68     
+ Misses        469      455      -14     
Flag Coverage Δ
?

Flags with carried forward coverage won't be shown. Click here to find out more.

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

@pablosanjose
Copy link
Owner Author

We add here some extra features and fixes:

  • We move omegamap from Integrator to the integrand of densitymatrix and josephson, so that Quantica.integrand(x) returns an integrand object that properly applies omegamap at each point.
  • We add a Quantica.path(x) for x::Josephson{<:JosephsonIntegratorSolver} and x::DensityMatrix{<:DensityMatrixIntegratorSolver} that gives the vertices that will be used for integration.
  • Allow ωpoints to be any type of container. We check statically whether all elements are real to apply a sawtooth transformation. Otherwise, we use them untouched.

fixed some wrong fallbacks, added tests

add one more test

path logic fixes, tests

typo in test
@pablosanjose pablosanjose merged commit cd87ce3 into master Oct 3, 2024
9 checks passed
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