[ITensors] [QN] Improve siteinds
QN conservation interface
#522
Labels
api
Issues related to the interface
breaking
This would require a breaking change
enhancement
New feature or request
physics
qns
QN related issue
Milestone
Right now, for more complicated site types, there is a bit of an explosion of keyword arguments for choosing what QNs get conserved. Here is a proposal for an improved interface:
instead of the current:
Setting
conserve_qns = true
would select a preset choice that we consider to be the most common combination.Additionally, if someone wants custom names for the QNs, we could have a syntax like the following:
which is useful if there are lattices with mixed site types.
Finally, it would be nice to think about a system for providing custom QNs to an existing site type. An example is adding momentum conservation to the Electron site type. This could be done with a
QNType
, analogous to theSiteType
, where a user overloads a function like:This system could also make the implementation of the
space
function easier, where the specified conserved QNs are looped over and appended to the space (instead of the current system with many if-statements). We would need nice functions for this which are fast and deal with the case of mismatched blocks.The text was updated successfully, but these errors were encountered: