-
Notifications
You must be signed in to change notification settings - Fork 4
Add named ProductSector
#29
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
base: main
Are you sure you want to change the base?
Conversation
e5892cd
to
5f50b71
Compare
5f50b71
to
aa3efc4
Compare
Codecov Report❌ Patch coverage is
... and 2 files with indirect coverage changes 🚀 New features to boost your workflow:
|
18bd51b
to
7310223
Compare
7310223
to
0ab15a5
Compare
I can see why people would want this 😄 , and I think this looks like a first good proposal. I would perhaps simply call the macro constructor |
An alternative approach would be to attach a name/label to any sector that currently exists, e.g. some wrapper sector that passes through all the calls but modifies the printing and construction etc. That would require less changes to the |
As some background: this is an idea I stole (with permission) from ITensor, where the actual use-case is I think even more sophisticated than this: one could conceive of a case where you have an enormous amount of different charges, and actually use a This instead is a somewhat lightweight version of that, where the names and individual types are still encoded in the type-domain. I quite like the idea of being able to distinguish between magnetic and particle Given all of this, I agree that a cleaner approach is probably to have a different wrapper type ( |
This adds a small convenience feature to also allow
NamedTuple
in theProductSector
field type. In principle this should all be compiled away and be as efficient as the regularProductSector
, but it might be nice to use this for defining/"standardizing" specific symmetry types.For example:
Definitely open to suggestions about syntax, printing, utility etc