Comments (9)
The reason is that your lat
has a typo. It should read
lat = lattice(
sublat((0.0, 0.0), name = :A),
sublat((0.0, 1/sqrt(3)), name = :B);
bravais = (
(1/2, sqrt(3)/2),
(-1/2, sqrt(3)/2)
)
)
And the explanation: when you don't specify a range
in hopping
it defaults to nearest-neighbor hopping range, nrange(1)
. In your lattice, the nearest neighbor hopping was less than 1/√3
, so that two of the hoppings were not applied. Note that you can adjust this behavior by specifying a different range
.
I trust you know that the above example is unnecessarily verbose, and can be written much more succintly, yes?
I'm glad you're back to playing with Quantica, by the way!
from quantica.jl.
Thanks for the clarification!
One question then: if range
is not defined and the keyword dn
is provided, shouldn't range
just be ignored? It seems to me that dn
should take precedence over range
.
I trust you know that the above example is unnecessarily verbose, and can be written much more succintly, yes?
Yes, I am aware of that. I was just trying to understand how one could define Hamiltonians in a less "automagical" way.
from quantica.jl.
if range is not defined and the keyword dn is provided, shouldn't range just be ignored? It seems to me that dn should take precedence over range
This is indeed one possibility that I considered, but I'm not sure it is what you want as default behavior in general. Imagine your cell has many orbitals. Do you want the default hopping(1, dn = ...)
to connect any site in cell zero to any site in cell dn? Or would you prefer the dn
to act as an additional restriction to what you get with hopping(1)
, which is nearest neighbor by default? Note that you can very easily do the first thing by specifying hopping(1, dn = (0,1), range = Inf)
. Then you will hop to any site in cell dn regardless of distance.
from quantica.jl.
Yes, I am aware of that. I was just trying to understand how one could define Hamiltonians in a less "automagical" way.
I was toying with the idea of designing a HamiltonianBuilder
type that you can use to build Hamiltonian like Kwant does, adding onsites and hoppings with setindex!, and then assembling at the end. I haven't found a case where that is preferable to the current functional approach, so this has low priority currently, but I would love to hear from you if you think otherwise.
from quantica.jl.
This could, by the way, join a Wannier90Builder
, whenever we get to tackle that #4 issue of yours. Maybe our friend Rui will help me with that!
from quantica.jl.
Closing, but feel free to continue the conversation. I will reopen if you convince me there is something that should change in the default hopping
behavior
from quantica.jl.
Hi Pablo. Thank you for the explanation! You have convinced me that the current default makes the most sense. The problem was that in my mind, (in a single orbital per site model) the sublattice completely specified the Wannier orbital. That is, in a Hamiltonian of the form
I was thinking that sublattice = alpha, while in Quantica, alpha = (sublattice, site in sublattice, orbital in site). Am I correct?
I was toying with the idea of desining a HamiltonianBuilder type that you can use to build Hamiltonian like Kwant does, adding onsites and hoppings with setindex!, and then assembling at the end. I haven't found a case where that is preferable to the current functional approach, so this has low priority currently, but I would love to hear from you if you think otherwise.
I think the functional approach equally works. It is just a matter of being familiar with it.
This brings another issue to my mind, but it is better to move the conversation to another place.
from quantica.jl.
As we were discussing in #172, alpha is actually a unique site index (an integer), not a triple, and h^{α,β} is an SMatrix over the orbitals in sites α and β. The reason to store things like this, internally, is to make the most of the information we have on a specific model (i.e. we pack interorbital blocks together, because they tend to be dense, while we keep the matrix h itself sparse) while keeping within the limitations of Julia design (e.g. well-defined eltypes of arrays).
from quantica.jl.
Makes sense. Thank you for the clarification
from quantica.jl.
Related Issues (20)
- `lattice(s::LatticeSlice)` should probably return slice, not `parent(s)` HOT 2
- Register v1.0.1 HOT 11
- Implement spectrum adaptive KPM method
- Self-consistent mean fields HOT 5
- Taking blocks seriously HOT 5
- Multiorbital systems: replace `SMatrixView` with a `Union` over different `SMatrix` eltypes HOT 1
- Provide wrappers to matrices / vectors to indicate parent Hamiltonian an allow use of siteselector HOT 8
- Allow construction of Hamiltonian by providing Harmonics HOT 2
- Segfault (use-after-free?) due to interaction between FunctionWrappers and Julia 1.10 HOT 1
- GreenFunction of AbstractHamiltonian{Float32} fails
- Add support for (energy dependent) unbounded self-energies HOT 1
- Add support for `qplot(h::OpenHamiltonian)`
- Parametric models don't support parameters without default values HOT 1
- Schur leads with additional self-energies are broken
- Issue with boundary construction in `GS.Bands`
- `GS.Bands` and Divide by zero
- Taking Operators seriously HOT 2
- Make `inspector = true` the default
- Broken closure in GreenFunction HOT 1
- Subtle aliasing issue in Schur slicer
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from quantica.jl.