Arrays of operators
enhancementgood first issue
I working on simulating quantum systems described by [the SLH framework](https://arxiv.org/abs/1611.00375). I am interested in using QuantumSymbolics because I have the [same interest described here](https://github.com/qojulia/QuantumOpticsBase.jl/issues/70#issue-1419860820) in using both QuantumCumulants and QuantumOptics as backends to simulate system dynamics.
I want to manipulate vectors and matrices of operators, for example the following code could create a vector containing quadrature operators from a vector of creation and annihilation operators.
```
using QuantumSymbolics
X = [Destroy; Create]
A = 1/sqrt(2)*[1 1; -1im 1im]
Y = A*X
```
however this throws the error
```
ERROR: MethodError: no method matching zero(::Type{QuantumInterface.AbstractOperator})
```
I can work around this by defining a new method for zero() like so:
```
import QuantumInterface
import Base.zero
function zero(::Type{QuantumInterface.AbstractOperator})
return 0.0*I
end
```
I am curious to hear if supporting arrays of operators is within the scope of this package. If so, what other methods might need to be defined?
关闭于 2025-04-24 2 条评论