cristicbz/scid — Issue #60: General matrices and vectors
Author: MaksimZh
Created: 2011-10-25 17:20:29+00:00
State: open

Currently SciD does not support matrices and vectors for types that are not accepted by BLAS functions (and also types like Complex!double though they are compatible with built-in complex types).

If I see it right the code depends on BLAS only on the level of storages. In this case linear algebra functionality can be generalized to arbitrary types of matrix/vector elements without serious changes in matrix, vector and expression templates.

In any case there could be something like the following subdivision:

1. The most general case: elements of a linear space.
The elements of matrices and vectors can be added and multiplied by scalars.
For such matrices and vectors the operations allowed will be: addition, subtraction, multiplying by scalar, transposing and conjugation.

2. Elements of an algebra.
The elements of matrices and vectors can be added, multiplied by scalars and multiplied by each other.
Multiplication of matrices and vectors will be allowed for such types. A good example is a matrix of matrices.

3. Scalar types.
All linear algebra operations will be allowed and will use BLAS internally. LAPACK operations will be allowed.

Within this approach a Hermitian matrix can be created for any type that has ".conj" property. If matrix elements are some operators in Hilbert space ".conj" should be Hermitian conjugation.

By the way, the following operations should be distinguished:

* Transposing
* Complex conjugation
* Hermitian conjugation

Currently in SciD Hermitian conjugation is called transposing for vectors and matrices. Is it usual terminology in English?

May be all this sound too abstract, but I need most of this functionality for real problems concerning quantum mechanics.

In my opinion SciD should be oriented to this abstraction. D templates look most suitable for such things.

I will be glad to help implement this.