qojulia / QuantumCumulants.jl

Generalized mean-field equations in open quantum systems
Other
70 stars 13 forks source link

Sums with different sum indices don't get simplified #188

Open andia89 opened 8 months ago

andia89 commented 8 months ago
@cnumbers N
h = NLevelSpace(:atoms, 2)

i = Index(h,:i,N,h)
j = Index(h,:j,N,h)

sigma(i,j,k) = IndexedOperator(Transition(h,:σ,i,j),k)
sigmam(k) = sigma(1, 2, k)

SymbolicUtils.simplify(∑(sigmam(i), i)+∑(sigmam(j), j))

outputs

(Σ(i=1:N)σ12i+Σ(j=1:N)σ12j)

Even though it should

2(Σ(i=1:N)σ12i)
ChristophHotter commented 5 months ago

We did not implement this simplification rule. However, this is not needed to create the correct equations. When the equations are scaled or evaluated the terms will be simplified.