Open stevenkordonowy opened 2 weeks ago
Thank you for your enhancement suggestion @stevenkordonowy ! 🙌
Let us know if you have any additional feedback or suggestions.
Hi @stevenkordonowy , Thanks again for your suggestion! Our team was very happy to see it. Would you be interested in creating a Pull Request to add your proposed solution? We can guide you on the process in case you're unsure about how to do a pull request.
Feature details
In the following lie_closure code, there are many redundant combinations that are checked:
The issue is that we do not need to always check all combinations from vspace.basis; many have been checked in previous epochs. As a simple example, if our basis is {A,B} and we find a linearly independent C = [A,B] in an epoch, we do not need to check [A,B] again.
Instead, we only need to take the commutation of an operator in the original generator set and one from the most recent epoch. See algorithm 1 in this paper:
Implementation
Here is an attempt at updating the code. Note the new variables
orig
,S_prev
, andS_new
in particular. In addition to checking iflen(com) == 0
, we also should check ifnot vspace.is_independent(com)
. It seems thatadd
also does an independence check.How important would you say this feature is?
1: Not important. Would be nice to have.
Additional information