Some smaller issues that popped up while going through the tests:
- Should we get rid of the conversion problems (especially signed vs. unsigned)? The current situation comes from the tensor library using signed-only values because negative indices have a meaning (count from the end), while I prefer unsigned because you do not have to reject negative values. If we stick with unsigned: Should we use size_t in accordance with std::vector etc.?
- Chebychev tests: Remove the custom operators in favor of standard operators?
- should we use tensor::index when looping over tensor indices?
- use doubles explicitly in the demos and tests (i.e., "1.0" instead of "1")
- combine some common code, especially error checking
- check that representation != nullptr (or other things)
- check that dimensions correct for representation
- checks for value within range
- handle product of non-Hermitian operators (see PrimitiveProduct header)
- The various propagation observers have poor names, occasionally
- LaserField could derive from TimeFunction, making things a little simpler.
- Operator::applyToX() could have a variant for time-independent operators. This could be implemented directly by the Operator interface (throw if operator is time-dependent)
- Interval1D is not tested anywhere
- Liouvillian could get some code common to all Liouvillians
** error-checking (making sure the state is a density operator and has the correct grid)
** getGrid() as the grid supplied in a constructor
- RandomNumberGenerator is used as a std::shared_ptr in the code, and & in the tests. Can this be redone, e.g., to use std::shared_ptr also in the tests?
-
maybe we could speed things up with more rvalue functionality in the interface; For example, if you supply a State&&, we could reuse the tensors in this state for doing in-place computations instead of allocating a new tensor. Or maybe use "*=," " +=" etc. more aggressively
-
test_all.sh could set the "-Werror" flag to have warnings be a critical failure
- a demo where you need to play around with a state's coefficients would be nice
Diff:
Diff:
Diff:
Diff: