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

Another bandstructure overhaul: linecuts and parametric mappings #107

Merged
merged 5 commits into from
Oct 1, 2020

Conversation

pablosanjose
Copy link
Owner

@pablosanjose pablosanjose commented Oct 1, 2020

Closes #77
This implements the design at the end of in #77. In summary

  • We can now do mappings (renamed from lifts) in bandstructure that take kwargs in the ParametricHamiltonian case
bandstructure(h, mesh_2D; mapping = (x, y) -> (x, y)) # periodic Hamiltonian
bandstructure(ph, mesh_2D; mapping = (x, y) -> (x, (; kw1 = y))) # periodic ParametricHamiltonian
bandstructure(ph, mesh_2D; mapping = (x, y) -> (; kw1 = x * y)) # bounded ParametricHamiltonian

Note that the number of Bloch phases preceding the NamedTuple must now exactly match the Hamiltonian's (or ParametricHamiltonian`s) lattice dimension

  • We build meshes with mesh now, not marchingmesh.

  • We deprecate linearmesh in favor of the syntax bandstructure(h, nodes...; points = 13, kw...). We can now do things like

bandstructure(h, :Γ, :X, (π, π), :Y, :Γ; points = (4,5,6,7))
  • We can do mesh vertices transforms in bandstructure with transform = (fv, fϵ), where fv now transforms the mesh, and the eigenvalues. Optionally we can do transform = isometric or transform = (isometric, fϵ) to transform the mesh into momenta, assuming the mesh spans Bloch phases.
julia> h = LatticePresets.honeycomb() |> hamiltonian(hopping(I), orbitals = (Val(2), Val(1)));

julia> b = bandstructure(h, transform = isometric)
Bandstructure{2}: collection of 2D bands
  Bands        : 2
  Element type : scalar (Complex{Float64})
  Mesh{2}: mesh of a 2-dimensional manifold
    Vertices   : 169
    Edges      : 456

julia> using Makie; plot(b)

image

@codecov-commenter
Copy link

codecov-commenter commented Oct 1, 2020

Codecov Report

Merging #107 into master will decrease coverage by 0.88%.
The diff coverage is 82.67%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #107      +/-   ##
==========================================
- Coverage   62.40%   61.52%   -0.89%     
==========================================
  Files          16       16              
  Lines        2708     2708              
==========================================
- Hits         1690     1666      -24     
- Misses       1018     1042      +24     
Impacted Files Coverage Δ
src/Quantica.jl 100.00% <ø> (ø)
src/parametric.jl 77.89% <ø> (-3.72%) ⬇️
src/plot_makie.jl 0.00% <0.00%> (ø)
src/mesh.jl 83.76% <75.00%> (-9.58%) ⬇️
src/bandstructure.jl 87.84% <82.75%> (-3.32%) ⬇️
src/hamiltonian.jl 75.08% <83.33%> (-0.21%) ⬇️
src/diagonalizer.jl 52.94% <100.00%> (-0.85%) ⬇️
src/model.jl 72.66% <100.00%> (ø)
src/tools.jl 55.93% <100.00%> (-1.52%) ⬇️
... and 3 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 13ad736...599f9d8. Read the comment docs.

@pablosanjose pablosanjose merged commit 51b0fa3 into master Oct 1, 2020
@pablosanjose pablosanjose deleted the lift-issue-77 branch October 1, 2020 15: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.

Polishing the bandstructure/mesh/lift API
2 participants