Constructing properly normalised states

Topics related to Spinach package
Post Reply
enu
Posts: 3
Joined: Mon Sep 02, 2024 2:26 pm

Constructing properly normalised states

Post by enu »

Dear users / Spinach developers,

What is the correct method on constructing properly normalised state vectors when using the sphten-liouv formalism?

Using zeeman-hilb, I can construct the density matrix in the usual way. For instance, if I want to make the triplet plus state, I will take 1/4*E + 1/2(I_z*E + E*I_z) + I_z*I_z. This will result in a density matrix that has a unity trace.

If I apply same technique using the sphten-liouv formalism, i.e., place the above coefficients to the density vector, the result is not behaving as I intuitively think. I can also see that, using the sphten2zeeman conversion and reshaping to matrix, I do not obtain the properly normalised density matrix.

So: Given the coefficients of the linear combination of any product states that construct the density matrix, how can I construct the corresponding density vector using sphten-liouv formalism?

Kind regards,
Enu
kuprov
Posts: 201
Joined: Mon Mar 29, 2021 4:26 pm

Re: Constructing properly normalised states

Post by kuprov »

In Spinach 2.9, we have designed the states to be strictly consistent between various formalisms so that, when observables or thermal equilibrium states are calculated, exactly the same numbers are produced, see the following files in examples/fundamentals:

normalization_1.m
normalization_2.m
state_consistency.m
thermal_equilibrium_(1 to 5).m

So you should just use the same coefficients! :) In the example you have provided:

(1/4)*state(spin_system,{'E','E'},{1 2})
+ (1/2)*state(spin_system,{'Lz'},{1})
+ (1/2)*state(spin_system,{'Lz'},{2})
+ (1/2)*state(spin_system,{'Lz','Lz'},{1,2})

The final answer will be formalism-independent, i.e. the same between sphten-liouv and zeeman-liouv formalisms.
kuprov
Posts: 201
Joined: Mon Mar 29, 2021 4:26 pm

Re: Constructing properly normalised states

Post by kuprov »

Incidentally, singlet and triplet state generation is automated in the latest GitHub version, see these functions: four_spin_states(), singlet(), triplet().
enu
Posts: 3
Joined: Mon Sep 02, 2024 2:26 pm

Re: Constructing properly normalised states

Post by enu »

Alright, I see! Thank you for the quick response.

So as far as I understand, this must mean that calling the state function already takes care of the normalisation and user must only give the coefficient for the given state.

I will look through the examples listed. Thanks!

-Enu
enu
Posts: 3
Joined: Mon Sep 02, 2024 2:26 pm

Re: Constructing properly normalised states

Post by enu »

I still have a lack of understanding, even with this simple example of constructing a Iz state for one spin half nucleus:

function Normalisation_example()

sys.isotopes={'1H'};
sys.magnet = 1;

inter.zeeman.scalar = {0};
inter.coupling.scalar = {0};

% Hilbert space
bas.formalism = 'zeeman-hilb';
bas.approximation = 'none';

spin_system = create(sys, inter);
spin_system = basis(spin_system, bas);
spin_system = assume(spin_system, 'labframe');

Iz = state(spin_system, 'Lz', 1);
disp(full(Iz))

% Liouville space, zeeman
bas.formalism = 'zeeman-liouv';
bas.approximation = 'none';

spin_system = create(sys, inter);
spin_system = basis(spin_system, bas);
spin_system = assume(spin_system, 'labframe');

Iz = state(spin_system, 'Lz', 1);
Iz = reshape(Iz, 2, 2);
disp(full(Iz))

% Liouville space, spherical tensors
bas.formalism = 'sphten-liouv';
bas.approximation = 'none';

spin_system = create(sys, inter);
spin_system = basis(spin_system, bas);
spin_system = assume(spin_system, 'labframe');

Iz = state(spin_system, 'Lz', 1);
P = sphten2zeeman(spin_system);
Iz = P*Iz;
Iz = reshape(Iz, 2, 2);
disp(full(Iz))

Zeeman-hilb and zeeman-liouv will result in

0.5000 0
0 -0.5000

But sphten-liouv results in

0.3536 0
0 -0.3536

There seems to be a factor of sqrt(2) difference between them and I cannot figure out where this comes from.

Edit: This is with Spinach v2.9
kuprov
Posts: 201
Joined: Mon Mar 29, 2021 4:26 pm

Re: Constructing properly normalised states

Post by kuprov »

Sorry, I missed the post notification somehow, looking into it...
kuprov
Posts: 201
Joined: Mon Mar 29, 2021 4:26 pm

Re: Constructing properly normalised states

Post by kuprov »

That was a proper bug in sphten2zeeman - well spotted! It did not account for the fact that the two basis sets are orthogonal but not normalised when it was building the projector. The fixed version of the file is enclosed (and also changes made in the GitHub repository). Thanks! Let me know if you need a reference letter for some application or another: finding a bug in Spinach is no small feat.
Attachments
sphten2zeeman.m
(1.79 KiB) Downloaded 4060 times
Post Reply