Add Term, Terms and TermSet- mirrors Pauli closely#32
Conversation
|
This is scaffolding. Multiplication, conjugation, sparse-string constructors, and per-component construction methods are deferred to follow-up PRs — they need fermion product/normal-ordering infrastructure that doesn’t exist yet. The empty marker traits (AsView, AsViewMut) are placeholders that PR 2 will hang real methods on without requiring downstream code to change its imports. |
|
is this cmpnt major? |
yes, creation operators in are_part and annihilation in ann_part |
should it be in a directory to indicate that like with qubits? or is there no equivalent distinction? |
Now I see your point. Fermions have component-major inline in the flat fermion/operator. Should we organise into cmpnt_major and leave mode_majer for later if needed? I thought to keep it flat for now since we are scaffolding and not have the need for mode_major |
yea i'd probably match the layout? up to you though |
makes sense, I will move things to cmpnt_major to stay consistent with Pauli |
|
|
||
| #[test] | ||
| fn test_new_has_one_term() { | ||
| let term = Term::<Unity>::new(Modes::from_count(4)); |
There was a problem hiding this comment.
Would be good to add a test or two here for different term types and check the coeff has been set to unit value.
matt-ryley-Quant
left a comment
There was a problem hiding this comment.
Approved with one minor comment regarding adding more tests.
Thanks for this!
Good point! I will add the tests |
This is part 1 of ~6 PRs covering issue 21