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

Parametric @torus #331

Merged
merged 2 commits into from
Jan 31, 2025
Merged

Parametric @torus #331

merged 2 commits into from
Jan 31, 2025

Conversation

pablosanjose
Copy link
Owner

@pablosanjose pablosanjose commented Jan 30, 2025

The current torus(h, phases) function wraps some axes of an L-dimensional AbstractHamiltonians, adding fixed Bloch phases along the wrapped axes.

Here we introduce @torus(h, phases, ϕ), which adds a parameter ϕ (or whatever other name we provide as the third argument) to the result (which is thus a ParametricHamiltonian). This parameter can be used to adjust the Bloch phase. ϕ takes the form of a tuple or an AbstractVector of length equal to the number of wrapped axes.

We also generalize torus, so that we can do torus(h, wrapped_axes::SVector) (and similarly with @torus), so that the axes given by wrapped_axes are wrapped with phase zero. This is a convenience form that may be easier to use. For example we can replace torus(h, (:, 0, :)) with torus(h, SA[2]) to wrap along axis 2.

We have furthermore improved the detection algorithm for modifier collisions.

WIP, debugging

fix in phase sign

modifier collision detection
@pablosanjose pablosanjose changed the title Parametric @torus Parametric @torus Jan 30, 2025
@codecov-commenter
Copy link

codecov-commenter commented Jan 30, 2025

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

Codecov Report

Attention: Patch coverage is 97.27273% with 3 lines in your changes missing coverage. Please review.

Project coverage is 92.48%. Comparing base (f64e499) to head (0ae35f4).
Report is 7 commits behind head on master.

Files with missing lines Patch % Lines
src/tools.jl 88.88% 2 Missing ⚠️
src/hamiltonian.jl 98.82% 1 Missing ⚠️

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

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #331      +/-   ##
==========================================
+ Coverage   92.43%   92.48%   +0.04%     
==========================================
  Files          41       41              
  Lines        7075     7133      +58     
==========================================
+ Hits         6540     6597      +57     
- Misses        535      536       +1     

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

fix tests

added test
@pablosanjose pablosanjose merged commit 7ed802c into master Jan 31, 2025
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