You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The should be a function rewrite_ops_as_localsigma that rewrites any Operator in terms of LocalSigma. This provides a very useful canonicalization that would make e.g. convert.to_sympy_matrix much easier to implement.
I've been thinking about adding a way to convert spin Hamiltonians to qutip using a "bit-testing" encoding in a restricted subspace, e.g. if the Hamiltonian in an N-spin system only allows for dynamics in the single-excitation subspace, the size of the Hilbert space can be reduced from 2^N to N (where the eigenstates are labeled 100..0, 010..0, ..., 000..1) This kind of conversion also is much easier if the operators only contain LocalSigma.
With OperatorIndexedSum, which allows for infinite sums, rewriting an operator into LocalSigma is always possible, even if the Hilbert space has no finite basis. For an OperatorSymbolS, one can write S = ∑ (S)_ij |i><j| where (S)_ij are new scalar symbols.
The text was updated successfully, but these errors were encountered:
The should be a function
rewrite_ops_as_localsigma
that rewrites any Operator in terms of LocalSigma. This provides a very useful canonicalization that would make e.g.convert.to_sympy_matrix
much easier to implement.I've been thinking about adding a way to convert spin Hamiltonians to qutip using a "bit-testing" encoding in a restricted subspace, e.g. if the Hamiltonian in an N-spin system only allows for dynamics in the single-excitation subspace, the size of the Hilbert space can be reduced from
2^N
toN
(where the eigenstates are labeled100..0
,010..0
, ...,000..1
) This kind of conversion also is much easier if the operators only containLocalSigma
.With
OperatorIndexedSum
, which allows for infinite sums, rewriting an operator into LocalSigma is always possible, even if the Hilbert space has no finite basis. For anOperatorSymbol
S
, one can writeS = ∑ (S)_ij |i><j|
where(S)_ij
are new scalar symbols.The text was updated successfully, but these errors were encountered: