Original Question
Disclaimer: The question motivated by the product of Hilbert spaces which arises from separate degrees of freedom which a system might contain in quantum technical system.
Examples are for instance momentum and spin of an electron.
The question is related to this one: How to create simple (tensor) product spaces? but I think the example there is rather specific, and I'm not sure how generalize it, nor do I think that it gives a full answer to my question.
Intro
Assuming I have two independent degrees of freedom (random variables), the Probability space describing each of them is an Hilbert space, with the dimensions of the relevant sample space.
Denoting these spaces, by $V$ and $W$, we may multiply these spaces to get a vector space which incorporates the two: $V\otimes W$ (joint probability space).
We may denote two vectors as $v\in V$, $w\in W$, and the corresponding vector in the product space would be $v\otimes w$.
Lastly we may apply some linear operator to the vector. Denoting $C=A\otimes B$, we'll get: $C(v\otimes w)=(Av)\otimes (Bw)$.
Questions
How can I achieve the multiplication of vectors? So far I've done:
Flatten[c*(KroneckerProduct[v, w] + KroneckerProduct[w, v])]
where c is just a normalization factor so that I can preserve the meaning of probability. Is there a cleaner way to do this. Is it generally correct/robust?
How can I achieve multiplication of linear operators? will the following do?
KroneckerProduct[A, B]
Is there a way to take the product of a whole space? I admit this question isn't well defined, i.e. I'm not sure what would this mean in MMA
Edit according to comments
As suggested in the comments, I narrow down my question as it is too general, and solutions may differ greatly per system.
I consider a model of an elecronic system with two sites, and spin degree of freedom. Since I have two separate degrees of freedom, each admitting to 2 values of there quantum numbers, my Fock space is finite and has a dimension $dim=16$.
What I have so far
I have already implemented a few functions that build for me a Fock space with the dried algebra, for a space of of arbitrary dimension. These can be seen here: notebook.
This file implements function that eventually gets as input the numberOfSites
in the desired space and returns:
- the number
numberOfSites
- the dimension of the space (
2^numberOfSites
) - a list of states written as occupation vectors. Each state written as a list (vector), of 0 and 1 according to the occupation of each site in the specific state.
- a list of states in the standard basis, i.e. a list of unit orthogonal unit vectors of the proper dimension, i.e. Identity matrix of the proper dimension.
- a list of creation operators (matrices) obeying the anti-commutation algebra, which may be applied to states in the standard basis representation.
Issues / What I need
Even though I can write the basis for my Hilbert space in both representations, and even though I have I have all ladder operators I still think my solution falls a bit short. My issue is with the fact that since my space is so abstract I cannot attribute values of quantum numbers to my states.
For instance I would like each of states to have as an attribute a definite spin so that I could apply an $S_z$ operator to it and get the correct eigenvalue.
The way I see it there are two options to improve what I have:
- build the Hilbert space as an Associative Array. With the help of the key-value structure, my states could be more than just vectors, they can also hold other attributes. However, this may prove problematic at a some stage. Details on that at the bottom.
- Perhaps I could build product spaces, in some sense, and then multiply them. Building spin operators for only spinors for instance is trivial. These could then be multiplied perhaps to obtain the product space version for each operator.
A note about the problem with Associative Array
Let us assume for instance, that i describe a system as discussed above, and build all states with having a definite location (site index), and spin. Let us assume now the I consider a Hamiltonian in which I have hopping between the two sites. Obviously the site index isn't a good quantum number, i.e. if I diagonalize my Hamiltonian the eigenstates wouldn't have a definite site index. As I would want to be able to rotate my states between bases, it means that I'll need to build the mechanism which resolves the the attributes attributed to a state after rotation. For instance in the example I gave, one could use intersection to determine the the site indices are different, and therefore this attribute should be dropped. Can I generalize this?