Note: Relevant for exponentiation of operators, because any moderately complex setup needs to be squeezed first.
Goes well together with [#197]
The operator squeezing that was introduced in [#95] has numerous problems. For starters it is both too simple to be useful and too complex to continue working on it.
A better approach would be to first assume that the user can help us. For example, she may not give us the whole Hamiltonian for compression, but only the potential, which is just a sum of DVR-diagonal operators and constants. Under this assumption, we can go for much more aggressive optimization by just giving up on complex situations. Also, the OOP component approach that I fancied while writing this code is probably overblown here; noone except absolute experts will ever change the order of the modifications.
The suggested alternative is then the following procedure:
This will not produce a cornucopia that speeds up all operators, but can help with the usual case of potentials made up of a bunch of one-dimensional potentials or products of constants times potentials etc.
Diff:
Related
Tickets:
#213Tickets:
#95Diff:
Diff:
Related
Tickets: #143
Diff:
Related
Tickets: #143
Diff:
Related
Tickets: #197