-
Notifications
You must be signed in to change notification settings - Fork 0
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
Norm of a state #5
Comments
In the past when I defined |
It makes sense to me if |
both correct. I don't remember why we changed it. (or maybe we didn't and this was a bug in the past as well?) |
I now wonder whether any arithmetic should act on all number types including integers, bools etc. At least by default. I'm not sure really, just wondering out loud .... |
It is actually not so clear to me how some arithmetics mean for an abstract state, for instance, what should be the output of "Bool + Bool". I am thinking that could we somewhat leave the definition of arithmetics (apart from those obvious arithmetics for positions) on What this basically results in is that when a user tries to do one arithmetic of State (that would mean that they have some expected outcome in mind), they will find that it is by default not defined (error shows), but then when they try |
I think I will make the following convention : arithmetic is defined on all number-like types (to be documented) and if one uses a number-like type that one doesn't want arithmetic performed on (e.g. |
For booleans, it is less clear to me. Maybe they need to be treated as special. |
That makes sense to me. Maybe should I rename this issue to something like "arithmetic of States" (given that if some types of a State can be wrapped and treated as categorical, the original norm issue may no longer exist)? |
Possibly. The arithmetic anyhow needs to be worked out. |
I am a little bit lost about the norm of a DecoratedParticle.
My memory was that an AbstractState should not have a norm, but now it has one which seems to be a weighted norm of all its elements (cf here).
For instance, if we have two States
$\sqrt2$ respectively, which means that Bools are viewed as 0 and 1 in this case). If we have some fields like
R1 = State(rr = SVector{3}([1,0,0]), be = false)
and
R2 = State(rr = SVector{3}([1,0,0]), be = true),
those bool values are also counted when we evaluate
norm(R)
(i.e., they return 1 andcharge
, then the norm of this State also counts the charges. This is a little bit strange to me...The text was updated successfully, but these errors were encountered: