Author Topic: Commutator[], Matrixexponential, Subspace  (Read 358 times)

dornenfeld

  • Member
  • *
  • Posts: 1
    • View Profile
Commutator[], Matrixexponential, Subspace
« on: December 10, 2018, 11:13:46 AM »
Hey everyone,

came along some problems while trying to work with Spindynamica. Tried to formulate all questions in attached mathematica file.
Also want to say thanks for the package overall, its very useful. If you need more clarification, please feel free to ask. Also open to any suggestions.

Really appreciate any help you can provide,
Hannes

Christian Bengs

  • Member
  • *
  • Posts: 5
    • View Profile
Re: Commutator[], Matrixexponential, Subspace
« Reply #1 on: February 06, 2019, 10:18:05 AM »
Hey Hannes,

Sorry for the late reply, but I've finally had a quick look at your notebook.

1) There is really no need to let SpinDynamica know what a commutator equals when constructing the matrix representation of a superoperator. The commutation relations will be dealt with "automatically".

2) There is really no way to reduce the size of the matrix unless your Hamiltonian might display some symmetry. In this case you can define your own basis and focus on the relevant subspace. A useful syntax to order the matrix into its subspaces is as follows:

Flatten[ConnectedComponents[Rule @@@MatrixRepresentation[H]]["NonzeroPositions"]]]

This will return a permutation that permutes the Hamiltonian into block-diagonal form.

3) The reason the last calculation doesn't stop is because the analytic calculation of the matrix exponential takes very long. You may circumvent the problem by first calculating the matrix exponential in a "simple" basis and then transform back into your preferred basis.

4) Unfortunately SpinDynamica has no capabilities to restrict calculations to a certain subspace atm.

kind regards,

Christian