Ionizing / rsgrad

A VASP calculation monitor. Written in Rust
MIT License
17 stars 1 forks source link

Add unitary transform for wavefunctions in `WAVECAR` #7

Open Ionizing opened 3 months ago

Ionizing commented 3 months ago

How to do unitary transformation

Consider the degenerated states psi1 and psi2 form another two states psi1' and psi2' with spin polarization purely along the z axis.

The transformation matrix is unitary and takes the form

U = [[                 cos(phi),   exp(i*theta) * sin(phi)],     ...... (1)
     [-exp(-i*theta) * sin(phi),                  cos(phi)]]

where theta \in [0, 2pi) and phi \in [0, pi/2]. We want that the state cos(phi) psi1 + exp(i*theta) sin(phi) psi2 has the property <sigma_z> = 1:

<sigma_z> = cos(phi)^2 sigma_z11 + sin(phi)^2 sigma_z22
            + 2 sin(phi) cos(phi) Re(exp(-i*theta) sigma_z21)

To maximize <sigma_z>, theta should satisfy

exp(i*theta) = sigma_z21 / |sigma_z21|

<sigma_z> = cos(phi)^2 + sin(phi)^2 + 2sin(phi) cos(phi) |sigma_z21|
          = sigma_z11 (cos(phi)^2 - sin(phi)^2) + 2 sin(phi) cos(phi) |sigma_z21|
          = sigma_z11 + sin(2phi) |sigma_z21|

Assume sigma_z11 < 0, the maximum value is taken at tan(2phi) = |sigma_z21| / sigma_z11, which means

exp(i*theta) = sigma_z21 / |sigma_z21|           ......(2)
phi = atan( |sigma_z21| / sigma_z11 ) / 2        ......(3)

Substitute (2) and (3) into (1) and the re-organized states with pure spin polarizations can be obtained via [psi1'; psi2'] = matmul(U, [psi1; psi2]).

Credit: Zhi Li @ USTC