basis_transform

edrixs.basis_transform.cb_op(oper_O, TL, TR=None)[source]

Change the basis of an operator \(\hat{O}\).

\[O^{\prime} = (T_L)^{\dagger} O (T_R),\]
Parameters:
oper_O: array-like

At least 2-dimension, the last 2-dimension is the dimension of the matrix form of operator \(\hat{O}\) in basis \(A\). For example:

  • oper_O.shape = (3, 10, 10), means 3 operators with dimension \(10 \times 10\)

  • oper_O.shape = (2, 3, 10, 10), means \(2 \times 3=6\) operators with dimension \(10 \times 10\)

TL: 2d array

The unitary transformation matrix from basis \(A\) to basis \(B\), namely,

\(TL_{ij} = <\psi^{A}_{i}|\phi^{B}_{j}>\).

TR: 2d array

The unitary transformation matrix from basis \(A\) to basis \(B\), namely,

\(TR_{ij} = <\psi^{A}_{i}|\phi^{B}_{j}>\).

if TR = None, TR = TL

Returns:
res: same shape as oper_O

The matrices form of operators \(\hat{O}\) in new basis.

edrixs.basis_transform.cb_op2(oper_O, TL, TR)[source]

Change the basis of an operator \(\hat{O}\).

\[O^{\prime} = (T_L)^{\dagger} O (T_R),\]
Parameters:
oper_O: array-like

At least 2-dimension, the last 2-dimension is the dimension of the matrix form of operator \(\hat{O}\) in basis \(A\). For example:

  • oper_O.shape = (3, 10, 10), means 3 operatos with dimension \(10 \times 10\)

  • oper_O.shape = (2, 3, 10, 10), means \(2 \times 3=6\) operators with dimension \(10 \times 10\)

TL: 2d array

The unitary transformation matrix applied on the left.

TR: 2d array

The unitary transformation matrix applied on the right.

Returns:
res: same shape as oper_O

The matrices form of operators \(\hat{O}\) in new basis.

edrixs.basis_transform.fourier_hr2hk(norbs, nkpt, kvec, nrpt, rvec, deg_rpt, hr)[source]

Fourier transform a tight-binding Hamiltonian \(H(r)\) from real space to \(k\) space \(H(k)\), for Wannier90.

Parameters:
norbs: int

Number of orbitals.

nkpt: int

Number of \(k\)-points.

kvec: 2d float array

Fractional coordinate for k-points.

nrpt: int

Number of r-points.

rvec: 2d float array

Fractional coordinate for r-points.

deg_rpt: int

The degenerancy for each r-point.

hr: 3d complex array

Hamiltonian in r-space.

Returns:
hk: 3d complex array

Hamiltonian in k-space.

edrixs.basis_transform.tmat_c2j(orb_l)[source]

Get the transformation matrix from the complex spherical harmonics to the \(|j^2,j_z>\) basis in which the spin-oribt coupling Hamiltonian is diagonal. The orbital order is:

\(|j=l-1/2, -j>, |j=l-1/2, -j+1>, ... |j=l-1/2, +j>,\)

\(|j=l+1/2, -j>, |j=l+1/2, -j+1>, ..., |j=l+1/2, +j>\).

Parameters:
orb_l: int

Quantum number of orbital angular momentum.

Returns:
t_c2j: 2d complex array

The transformation matrix.

edrixs.basis_transform.tmat_c2r(case, ispin=False)[source]

Get the unitary transformation matrix from the basis of complex spherical harmonics to real spherical harmonics.

Parameters:
case: string

Label for different systems.

  • ‘p’: for \(p\)-shell

  • ‘t2g’: for \(t_{2g}\)-shell

  • ‘d’: for \(d\)-shell

  • ‘f’: for \(f\)-shell

ispin: logical

Whether including spin degree of freedom or not (default: False).

Returns:
t_c2r: 2d complex array

The transformation matrix.

edrixs.basis_transform.tmat_cub2r_f(ispin=False)[source]

Get the transformation matrix from the cubic spherical harmonics to real spherical harmonics, only for \(f\) system.

Parameters:
ispin: logical

Whether including spin degree of freedom or not (default: False).

Returns:
t_cub2r: 2d complex array

The transformation matrix.

edrixs.basis_transform.tmat_r2c(case, ispin=False)[source]

Get the unitary transformation matrix from the basis of real spherical harmonics to complex spherical harmonics.

Parameters:
case: string

Label for different systems.

  • ‘p’: for \(p\)-shell

  • ‘t2g’: for \(t_{2g}\)-shell

  • ‘d’: for \(d\)-shell

  • ‘f’: for \(f\)-shell

ispin: logical

Whether including spin degree of freedom or not (default: False).

Returns:
t_r2c: 2d complex array

The transformation matrix.

edrixs.basis_transform.tmat_r2cub_f(ispin=False)[source]

Get the transformation matrix from real spherical harmonics to the cubic spherical harmonics that is the representation of the cubic point group, only for \(f\) system.

Parameters:
ispin: logical

Whether including spin degree of freedom or not (default: False).

Returns:
t_r2cub: 2d complex array

The transformation matrix.

edrixs.basis_transform.transform_utensor(umat, tmat)[source]

Transform the rank-4 Coulomb interaction tensor from one basis to another basis.

Parameters:
umat: 4d array

Coulomb interaction tensor (rank-4).

tmat: 2d array

The transformation matrix.

Returns:
umat_new: 4d complex array

The Coulomb interaction tensor in the new basis.