I am writing a module, in which the Observable and State is given, so I need to write a function/module QuantumMeasurement, that will return a state of the quantum system resulting from the measurement. There are various inputs, so I need to write this function in a way, that will consider the system with different eigenvalues, let's say it can be {1,1,2,2}
or {1,2,3,4}
. Therefore the system will be divided in different number of eigenspaces, where each of them will consist of particular number of eigenkets.
So I need some kind of list of those eigenspaces, where each eigenket will be linked to correlated eigenvalue. Suppose eigenkets are:
{
{{I/2,1/2,0,1/Sqrt[2]}},
{{-(1/2),-(I/2),1/Sqrt[2],0}},
{{-(I/2),-(1/2),0,1/Sqrt[2]}},
{{1/2,I/2,1/Sqrt[2],0}}}
}
and eigenvalues are
{1,1,2,2}
Therefore it will be two eigenspaces, each of them consisting of two eigenkets[1,2] for the first eigenspace, and eigenkets[3,4] for the second eigenspace. How to assign those eigenkets to correllated eigenspace in order to use call this list later in the code?
That's what I have so far
Qmeasurement[x_, y_] :=
Module[
{eikets = {}},
{eigenvalues, eigenkets} = Eigensystem[G];
For[j = 1, j <= Length[eigenkets], j++,
ortho = Orthogonalize[{eigenkets[[j]]}
]
]
This is kind of preparation, where I am make the kets orthogonal in order to use them later on. I was thinking to use PositionIndex for my problem, but I am not sure how to properly assign it. Please post any suggestions, any help is appreciated.
x,y
as arguments, but does not show how one getsG
fromx,y
. $\endgroup$