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

Bandstructure overhaul: Dual numbers and smart band extraction #100

Merged
merged 9 commits into from
Sep 25, 2020

Conversation

pablosanjose
Copy link
Owner

@pablosanjose pablosanjose commented Sep 25, 2020

Closes #78
Addresses this kind of artifacts

This is a rework of the bandstructure internals, in particular the resolution of degeneracies and the extraction of bands using eigenvector projections. In summary

  • Codiagonalization at degeneracies is now done using the DualNumbers package, which allows automatic differentiation in parameter space for ParametricHamiltonians.
  • Automatic differentiation is done in the lifted space, not the mesh space, which often contains much more information about band connectivity
  • Codiagonalization in the case bandstructure(::Function,...) is done only with the finite-differences fallback, as dual numbers don't always propagate correctly through arbitrary functions.
  • Band extraction is now done with a depth-first search algorithm, which is theoretically easier on garbage collection. The k-mesh is traversed adding vertex neighbors in a pending list, and iteration is done by pop!-ing the last added vertex until pending is empty
  • That allows an easy bail-out strategy when extracting bands in a 1D mesh (e.g. bandstructure cuts). In this case we don't want backsteps to old neighbors in the depth-first search, as that produces plot artifacts when plotting bands. Instead of backstepping, we cut the search and leave the unprocessed vertices for the next band.
  • Plotting 1D bandstructures in VegaLite now does not sort bands (was the default behavior before)
  • The two above changes should help with the kind of zig-zag and discontinuity artifacts in this comment using VegaLite, but also in Makie. 1D bandstructures should now be clean
  • The default minoverlap in bandstructure is now 0, as eager band extraction is now working as expected

There is only the edge case of Dirac cones pending, which will still require point splitting (future PR)

@codecov-commenter
Copy link

codecov-commenter commented Sep 25, 2020

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

Codecov Report

Attention: Patch coverage is 92.55319% with 7 lines in your changes missing coverage. Please review.

Project coverage is 62.00%. Comparing base (4d07cc0) to head (d5a55e2).
Report is 1164 commits behind head on master.

Files with missing lines Patch % Lines
src/plot_vegalite.jl 0.00% 5 Missing ⚠️
src/diagonalizer.jl 94.73% 2 Missing ⚠️

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

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #100      +/-   ##
==========================================
- Coverage   62.01%   62.00%   -0.01%     
==========================================
  Files          16       16              
  Lines        2651     2682      +31     
==========================================
+ Hits         1644     1663      +19     
- Misses       1007     1019      +12     

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

@pablosanjose pablosanjose merged commit 1cb68fb into master Sep 25, 2020
@pablosanjose pablosanjose deleted the bandspop branch September 30, 2020 09:32
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.

Extend degeneracy resolution for parametric bandstructures
2 participants