Ashley Milsted
Ashley Milsted
I took another look. Indeed it seems everything is there, but something is going wrong: It looks like the `identityoperator()` method for the LazyTensor type is not working properly. For...
LazySum is different: ```julia embed(b, 1, ls) ERROR: ArgumentError: Tensor product is not defined for this combination of types of operators: LazySum{FockBasis{Int64}, FockBasis{Int64}, Vector{ComplexF64}, Tuple{Operator{FockBasis{Int64}, FockBasis{Int64}, SparseArrays.SparseMatrixCSC{ComplexF64, Int64}}}}, LazySum{FockBasis{Int64}, FockBasis{Int64},...
Maybe we just need a parametric type in the first argument for the `identityoperator()` method for LazyTensor. For LazySum, we would need to add (tensor) products.
Mostly fixed in https://github.com/qojulia/QuantumOpticsBase.jl/pull/51
An alternative is to use caching to handle the tmp vectors, like in [this PR](https://github.com/qojulia/QuantumOpticsBase.jl/pull/39). We could use the same cache in LazyProduct and LazyTensor (which is also a kind...
Yes, the typing issue is a little tricky, also because element types can vary, as @david-pl points out above. It may not be too terrible to use abstract types, such...
It would be nice to include a function like this in QO.jl. Perhaps call it `partial_project()`?
I have some very simple code to handle tensor products of bras and kets with operators, for example: ``` function tensor(a::AbstractOperator, b::Bra) # upgrade the bra to an operator that...
My current hack is to do python->JSON->julia, which handles the "nested dict of simple types" case pretty well, but is clearly not optimal :)
Hope the holidays were fun! Good to know this is a priority item. It certainly seems important. If you do decide to split out CuTensorOperations.jl again, I guess a prominent...