Author Topic: More of a question: Ordering of Zeeman product states  (Read 2049 times)

Andreas Brinkmann

  • Member
  • *
  • Posts: 12
    • View Profile
More of a question: Ordering of Zeeman product states
« on: January 29, 2015, 08:45:18 PM »
Hi,

I noticed that in SpinDynamica the Zeeman product states for example for a 2 spin 1/2 system per default are ordered as {|αα>, |βα>, |αβ>, |ββ>}. However, in the literature (e.g. spin dynamics) and other calculation programs (Simpson, mPackages) the order is {|αα>, |αβ>, |βα>, |ββ>}.

As a result, one has to be very careful when transferring a matrix representation from SpinDynamica for example to Simpson.

Is there a flag to switch the way the product states are generated?

Andreas




MalcolmHLevitt

  • Administrator
  • Member
  • *****
  • Posts: 103
    • View Profile
Re: More of a question: Ordering of Zeeman product states
« Reply #1 on: February 05, 2015, 03:26:50 PM »
Hi Andreas,
 there is no built-in way to do this, but the reordering of the basis kets may be accomplished rather easily using SpinPermutationOperator, and a new basis using the reordered kets defined using DefineBasis and used using SetBasis.

In general the permutation has to exchange pairs of spins related by reversing the order, i.e. if the spins are {a, b, c... X, Y, Z} then the appropriate permutation is {{a,Z},{b,Y},{c,X}...}.

An example file is attached. I hope this is clear.

malcolm

MalcolmHLevitt

  • Administrator
  • Member
  • *****
  • Posts: 103
    • View Profile
Re: More of a question: Ordering of Zeeman product states
« Reply #2 on: February 06, 2015, 09:10:21 AM »
I expect to implement a built-in way to do this in the next release.

Malcolm

Andreas Brinkmann

  • Member
  • *
  • Posts: 12
    • View Profile
Re: More of a question: Ordering of Zeeman product states
« Reply #3 on: February 06, 2015, 03:33:23 PM »
Hi Malcolm,

thank you for your answer. Your approach using SpinPermutationOperator[] works fine for a system of spins with the same spin quantum number.

However, I first noticed the different ordering of basis states when I looked at a spin system of a spin-1 and spin-1/2 (SetSpinSystem[{{1, 1}, {2, 1/2}}]). In this case SpinPermutationOperator[] does not work, since I get the error that the spin cannot be exchanged since they have different spin quantum numbers.

Currently, I am using the approach SetSpinSystem[{{2, 1/2}, {1, 1}}], where I reversed the order of the spins together with the labels, so for example I1x still refers to the spin-1.

Andreas

Andreas Brinkmann

  • Member
  • *
  • Posts: 12
    • View Profile
Re: More of a question: Ordering of Zeeman product states
« Reply #4 on: February 06, 2015, 03:43:14 PM »
Sorry, wanted to add a snapshot:



Andreas

MalcolmHLevitt

  • Administrator
  • Member
  • *****
  • Posts: 103
    • View Profile
Re: More of a question: Ordering of Zeeman product states
« Reply #5 on: February 06, 2015, 06:13:51 PM »
OK, I see the problem. A general fix uses this (rather fancy) syntax:

ReorderedKets =
 Flatten@Outer[ProductKet,
   Sequence @@ Map[BasisKets[ZeemanBasis[{#}]] &, SpinSystem[]]]

I hope to implement this automatically in the next version. To my shame I had not noticed that the ordering of the kets was inconsistent between SpinDynamica and my Spin Dynamics book. Apologies!

a revised notebook is attached

malcolm

Andreas Brinkmann

  • Member
  • *
  • Posts: 12
    • View Profile
Re: More of a question: Ordering of Zeeman product states
« Reply #6 on: February 06, 2015, 07:21:28 PM »
Thanks a lot Malcolm. I guess I am getting picky here, but your "more complex case" has some odd behavior in how the ReorderedKets look: Originally, you have a spin system {{1, 1}, {2, 1/2}, {3, 3/2}}, so before the reordering a product ket looks like |1 +1, 1/2 +1/2, 3/2 +3/2>. After reordering, a reordered ket looks like |1/2 +1/2, 3/2 +3/2, 1 +1>. I see that the reordered product kets itself are in the right order, i.e. the next one is 3/2 +1/2, but it's still odd that the spin order seems now 2, 3, 1. The input into the Outer[] function looks fine, so I guess this must happen in the ProductKet[] routine.

Andreas

MalcolmHLevitt

  • Administrator
  • Member
  • *****
  • Posts: 103
    • View Profile
Re: More of a question: Ordering of Zeeman product states
« Reply #7 on: February 06, 2015, 09:16:05 PM »
Thanks Andreas, I'll have to look into it properly. I'll attempt to introduce a consistent ordering of the ZeemanBasis in the next version.
Malcolm

MalcolmHLevitt

  • Administrator
  • Member
  • *****
  • Posts: 103
    • View Profile
Re: More of a question: Ordering of Zeeman product states
« Reply #8 on: March 05, 2015, 07:58:44 PM »
The obscure bug in ProductKet (only evident for spins > 1/2) has been fixed in the release v2.12.2.

I did not get time to introduce options for alternative "built-in" ZeemanBasis ordering. However instructions for setting up a ZeemanBasis with the same ordering as in the SpinDynamics book are given in part 3 of the documentation accompanying 2.12.2.

malcolm