Fully implemented spin-block rotation #930
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes #924.
The problem was that the rotation should be performed using the Lie group SU(2) rotation matrix.
This merge does a lot of things:
extends Quaternion to return norm2, rotation_matrix rotation_matrix_su2, rotation_vector.
A bug in reduction calls for sparse matrices that are complex. It had used the wrong data-type.
Generalized rotation arguments to allow more, and simpler rotations. Now the rotations can be any of:
Or any sequence of the above. In this, latter case,
they will be combined into a single Quaternion.
General clean-ups in the spin-align method.
Added checks to ensure Hermitian matrix after rotation.
The code is relatively simple, and allows for much improved handling.
docs/
changes/<pr-num>.<type>.rst