We adopt the so-called covariant-contravariant formalism (cf. e.g. [1]), which in physics is primarily known from the theory of relativity. Assume we have a basis , where the basis vectors are non-orthogonal, so that the metric tensor
is nondiagonal. The contravariant components of a state vector are then defined as the expansion coefficients
where we have adopted the convention that there is summation for indices appearing twice. In this case one index has to be down, while the other one up, otherwise we have as it were a syntax error. This ensures that the result is independent of the choice of basis, as one would very well expect e.g. from the trace of an operator. The covariant components are the projections
The two are connected with the metric tensor:
where it is easy to show that is the matrix inverse of the above defined :
For the representation of operators assume is an operator, then
multiplying from the left by yields
While the definition of the up-indices matrix of the operator can be read from
From the above it is easy to see that
The situation, however, is more involved with the mixed-index matrices since conjugation mixes the two kinds:
Here we prove the second:
so that
where we have used the Hermiticity of the metric tensor.
If one is to apply the above formalism for density matrices in non-orthogonal bases, one has to face some strange implications: The well-known properties of Hermiticity and unit trace are split: and will be Hermitian matrices, but their trace is irrelevant, in fact, it is not conserved during time evolution, while and have unit conserved trace.
This means that e.g. the quantumtrajectory::Master driver has to use either or (by convention, it uses the latter, which also means that quantumtrajectory::MCWF_Trajectory uses ) to be able to calculate the evolution using the real part as in Description of the Master-equation evolution (otherwise, it is not the real part which appears there). On the other hand, for all normalizations one index has to be pulled, and this (at least in the case of density operators) has to be done in place to avoid excessive copying, which also means that the index has to be pulled back again afterwards.