Some things that could/should be done:
- Would it be possible to get rid of the SchroedingerOperator? Ideally, you would never wrap a primitive explicitly in a SchroedingerOperator, instead there is some implicit type conversion. Then, the complex operators could be named Liouvillian, and there is less confusion on the user's side.
- Propagators could get a single constructor that takes an OperatorMatrix. If the OperatorMatrix allows implicit conversion from a std::shared_ptr<linearoperator>, one could get rid of the explicit constructor for that type.</linearoperator>
No simple way to get rid of the SchroedingerOperator, and there are sometimes differences between using a LinearOperator and an OperatorMatrix.
Instead, I went for some renamings to make the use of the individual classes clearer. In particular:
- OperatorPrimitive => Operator
- LinearOperator => Expression
- OperatorMatrix => EquationSystem
- SchroedingerOperator => SchroedingerEquation
Diff: