Allow for product of continuous Hilbert spaces
Created by: PhilipVinc
Right now we can only combine discrete Hilbert spaces, not continuous.
This PR extracts the common logic of tensorHilbert in a new AbstractTensorHiblert
class, and creates two implementations
-
TensorHilbert
which is a combination of continuous Hilbert spaces, with no special new methods added -
TensorDiscreteHilbert
which combines discrete spaces and is discrete itself, possibly even indexable. I've cleaned up the logic used in multiplying hilbert spaces so that you always get the correct type (aTensorDiscrete
as long as you only have discrete spaces, the continuous one otherwise)
I'm unsure about the naming, and I'd like some feedback about how to name those three objects (AbstractTensorHilbert
, TensorHilbert
and TensorDiscreteHilbert
).
In theory one should never have to construct directly a Tensor***Hilbert
, but might only want to check for AbstractTensorHilbert
in some cases.
This also renames TensorHilbert
to TensorDiscreteHilbert
which might break some user code, though I suspect few are using this directly (@jwnys ?)