qutip / QuantumToolbox.jl

Quantum Toolbox in Julia
https://qutip.org/QuantumToolbox.jl/
BSD 3-Clause "New" or "Revised" License
44 stars 16 forks source link

functionality for accessing subspaces of states and operators #200

Open aarontrowbridge opened 2 months ago

aarontrowbridge commented 2 months ago

i don't see this in the docs for the python qutip package, but it would be very handy to have access to subspaces of quantum objects, c.f. this docs page in QuantumToolbox.jl.

in QuantumCollocation.jl we have constructed an EmbeddedOperator object for handling operators embedded in subspaces. we also frequently call a function a get_subspace_indices to index into the subspace of quantum states -- this functionality does not currently exist in QuantumOptics.jl, where also the tensor product ordering does not match what we (and you) have currently implemented.

ytdHuang commented 2 months ago

For the subspaces stuff, we have a similar function called tensor_contract in python qutip, maybe can add it to QuantumToolbox.jl too.

As for the tensor product ordering, we had a discussion in issue #129. So far we will follow the tensor ordering to be the same as python qutip, since this is most of the users come from python wanted.