Skip to content

Commit

Permalink
Update thewalrus/quantum/fock_tensors.py
Browse files Browse the repository at this point in the history
Co-authored-by: Christina Lee <chrissie.c.l@gmail.com>
  • Loading branch information
nquesada and albi3ro authored Jul 21, 2021
1 parent b8a555f commit c11f996
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion thewalrus/quantum/fock_tensors.py
Original file line number Diff line number Diff line change
Expand Up @@ -654,7 +654,7 @@ def n_body_marginals(mean, cov, cutoff, n, hbar=2):
and so on and so forth.
To be clever about not calculating things that can be obtained by permutations it checks whether the index vector representing the modes is sorted.
From the way `itertools.product` works we know that it will always produce a sorted index vector before generating any of its unordered permutations.
From the way ``itertools.product`` works we know that it will always produce a sorted index vector before generating any of its unordered permutations.
Thus whenever the index vector is ordered we perform the numerical calculation.
If it is an unsorted index vector it realizes, in the ``if`` statement, that it can be obtained by permuting the
Expand Down

0 comments on commit c11f996

Please sign in to comment.