magnopy.solve_via_colpa#

magnopy.solve_via_colpa(D)[source]#

Diagonalizes grand-dynamical matrix following the method of Colpa.

An algorithm is described in section 3, remark 1 of [1].

Solves the Bogoliubov Hamiltonian of the form

\[\hat{H} = \sum_{r^{\prime}, r = 1}^m a_{r^{\prime}}^{\dagger}\boldsymbol{\Delta}_1^{r^{\prime}r}a_r + a_{r^{\prime}}^{\dagger}\boldsymbol{\Delta}_2^{r^{\prime}r}a_{m+r}^{\dagger} + a_{m+r^{\prime}}^{\dagger}\boldsymbol{\Delta}_3^{r^{\prime}r}a_r + a_{m+r^{\prime}}^{\dagger}\boldsymbol{\Delta}_4^{r^{\prime}r}a_{m+r}^{\dagger}\]

ensuring the bosonic commutation relations.

In a matrix form the Hamiltonian can be written as

\[\hat{H} = \boldsymbol{\cal A}^{\dagger} \boldsymbol{D} \boldsymbol{\cal A}\]

where

\[\begin{split}\boldsymbol{\cal A} = \begin{pmatrix} a_1 \\ \cdots \\ a_m \\ a_{m+1} \\ \cdots \\ a_{2m} \\ \end{pmatrix}\end{split}\]

After diagonalization the Hamiltonian has the form

\[\hat{H} = \boldsymbol{\cal B}^{\dagger} \boldsymbol{\mathcal{E}} \boldsymbol{\cal B}\]

where

\[\begin{split}\boldsymbol{\cal B} = \begin{pmatrix} b_1 \\ \cdots \\ b_m \\ b_{m+1} \\ \cdots \\ b_{2m} \\ \end{pmatrix}\end{split}\]
Parameters:
D(2N, 2N) array-like

Grand dynamical matrix. If it is Hermitian and positive-defined, then obtained eigenvalues are positive and real.

\[\begin{split}\boldsymbol{\mathcal{D}} = \begin{pmatrix} \boldsymbol{\Delta_1} & \boldsymbol{\Delta_2} \\ \boldsymbol{\Delta_3} & \boldsymbol{\Delta_4} \end{pmatrix}\end{split}\]
Returns:
E(2N,) numpy.ndarray

The eigenvalues. It is an array of the diagonal elements of the diagonal matrix \(\boldsymbol{\mathcal{E}}\). First N elements correspond to the \(b^{\dagger}_1b_1, \dots, b^{\dagger}_mb_m\) and last N elements - to the \(b^{\dagger}_{m+1}b_{m+1}, \dots, b^{\dagger}_{2m}b_{2m}\).

First N eigenvalues are sorted in descending order, while last N eigenvalues are sorted in ascending order.

\[\boldsymbol{\mathcal{E}} = (\boldsymbol{G}^{\dagger})^{-1} \boldsymbol{D} \boldsymbol{G}^{-1}\]
G(2N, 2N) numpy.ndarray

Transformation matrix, that changes the basis from the original set of bosonic operators \(\boldsymbol{a}\) to the set of new bosonic operators \(\boldsymbol{b}\) which diagonalize the Hamiltonian:

\[\boldsymbol{\cal B} = \boldsymbol{G} \boldsymbol{\cal A}\]

The rows are ordered in the same way as the eigenvalues.

Raises:
ColpaFailed

If the algorithm fails. Typically it means that the grand dynamical matrix \(\boldsymbol{D}\) is not positive-defined.

ValueError

If the grand dynamical matrix is not square or its shape is not even.

References

[1]

Colpa, J.H.P., 1978. Diagonalization of the quadratic boson hamiltonian. Physica A: Statistical Mechanics and its Applications, 93(3-4), pp.327-353.

Examples

For already diagonal matrix this function does not do much

>>> import magnopy
>>> D = [[1, 0], [0, 2]]
>>> E, G = magnopy.solve_via_colpa(D)
>>> E
array([1., 2.])
>>> G
array([[ 1., -0.],
       [-0.,  1.]])
>>> import magnopy
>>> D = [[1, 1j], [-1j, 2]]
>>> E, G = magnopy.solve_via_colpa(D)
>>> E
array([0.61803399+0.j, 1.61803399+0.j])
>>> G
array([[ 1.08204454-0.j        ,  0.        +0.41330424j],
       [-0.        -0.41330424j,  1.08204454-0.j        ]])
>>> E, G = magnopy.solve_via_colpa(D)
>>> E
array([0.61803399+0.j, 1.61803399+0.j])
>>> G
array([[1.08204454+0.j        , 0.        -0.41330424j],
       [0.        +0.41330424j, 1.08204454+0.j        ]])