Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing tensor() method for SuperOperator type #138

Open
ba2tro opened this issue Sep 13, 2023 · 3 comments
Open

Missing tensor() method for SuperOperator type #138

ba2tro opened this issue Sep 13, 2023 · 3 comments

Comments

@ba2tro
Copy link
Contributor

ba2tro commented Sep 13, 2023

Hi! I was trying to compute a tensor product for two superoperators but it looks like we don't have dispatch for tensor() that applies to ::SparseSuperOpType

using QuantumOpticsBase
sOp1 = spre(create(FockBasis(1)))
sOp2 = spost(create(FockBasis(1)))
julia> sOp1sOp2
ERROR: MethodError: no method matching tensor(::SparseSuperOpType{Tuple{FockBasis{Int64}, FockBasis{Int64}}, Tuple{FockBasis{Int64}, FockBasis{Int64}}, SparseArrays.SparseMatrixCSC{ComplexF64, Int64}}, ::SparseSuperOpType{Tuple{FockBasis{Int64}, FockBasis{Int64}}, Tuple{FockBasis{Int64}, FockBasis{Int64}}, SparseArrays.SparseMatrixCSC{ComplexF64, Int64}})
Stacktrace:
 [1] top-level scope
   @ REPL[1]:1
@ba2tro ba2tro changed the title No 'tensor()` method for SuperOperator type Missing tensor() method for SuperOperator type Sep 13, 2023
@akirakyle
Copy link
Member

To implement this, I think it might be good to use the Choi representation which I have a draft PR for in #115 since its just a normal kron of the Choi operators (possibly with a permutesystems). Unless you're planning on working on this, I can try to implement it when I get around to moving #115 out of draft status.

@ba2tro
Copy link
Contributor Author

ba2tro commented Sep 16, 2023

I'm not sure if we would need it immediately, so please feel free to work on it in #115, as it seems to be in line with the other stuff in that pr

@akirakyle
Copy link
Member

I've implemented tensor in #177 so once that's merged, this can be closed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants