Interface

These functions (mostly) form the internal interface of the package, and should not be relevant to most users.

QuantumAlgebra.AvacFunction
Avac(A::QuExpr), vacA(A::QuExpr)

Simplify operator by assuming it is applied to the vacuum from the left or right, respectively. To be precise, Avac(A) returns $A'$ such that $A'|0⟩ = A|0⟩$, while vacA(A) does the same for $⟨0|A$.

source
QuantumAlgebra.CorrPerm_islessMethod
CorrPerm_isless(a,b)

isless for Tuples of Tuples representing products of Corr (see above) of a permutation of operators. E.g., ((1,3),(2,)) represents <A1 A3>C <A2>C. It is assumed that the total number of operators in a and b is equal, i.e., that sum(length.(a)) == sum(length.(b)).

source
QuantumAlgebra.CorrTup_islessMethod
CorrTup_isless(a,b)

isless for Tuples of integers that represent Corr of sorted operators (with n representing An such that n<m == An<Am). (n,m,...) ≡ Corr(AnAm...). Defined in such a way that the same order is obtained as with BaseOperator objects

source
QuantumAlgebra.expval2corrs_indsMethod
expval2corrs_inds(N::Int)

for N operators, create an array of tuples of tuples that represents the terms in a sum of products of correlators. Each tuple corresponds to a sum term, see CorrTup_isless and CorrPerm_isless for details of the format. The returned array and terms are sorted such that if the N operators are sorted, the represented expression is also sorted with the conventions of the QuantumAlgebra package. This allows to directly return a normal-ordered form.

source
QuantumAlgebra.expval_as_corrsMethod
expval_as_corrs(expr::QuExpr)

Take an expression expr=A B C + D E... and write its expectation value in terms of correlations $⟨A⟩_c, ⟨B⟩_c, ⟨AB⟩_c, ⟨ABC⟩_c, \ldots$. Note that $⟨A⟩_c = ⟨A⟩$.

E.g., expval_as_corrs(a'(:n)*a(:n)) returns $⟨a^\dagger_n a_n⟩_c + ⟨a^\dagger_n⟩_c ⟨a_n⟩_c$ (which is equal to $⟨a^\dagger_n a_n⟩$), while expval_as_corrs(a'(:n)*a(:m)*a(:n)) returns $\langle a_{n}^\dagger a_{m} a_{n} \rangle_{c} + \langle a_{n}^\dagger \rangle_{c} \langle a_{m} \rangle_{c} \langle a_{n} \rangle_{c} + \langle a_{n}^\dagger \rangle_{c} \langle a_{m} a_{n} \rangle_{c} + \langle a_{m} \rangle_{c} \langle a_{n}^\dagger a_{n} \rangle_{c} + \langle a_{n} \rangle_{c} \langle a_{n}^\dagger a_{m} \rangle_{c}$.

See also: expval, corr

source
QuantumAlgebra.heisenberg_eomFunction

heisenberg_eom(A,H,Ls=()) calculates $\dot{A} = i [H,A] + \sum_i (L_i^† A L_i - ½ \{L_i^† L_i, A\})$, where Ls = (L_1,L_2,...) is an iterable of Lindblad operators.

source
QuantumAlgebra.tlspm_opsMethod

tlspm_ops(name::Symbol): return functions for creating jump operators for a two-level system with name name. The output of these functions depends on setting of use_σpm.

source
QuantumAlgebra.tlsxyz_opsMethod

tlsxyz_ops(name::Symbol): return functions for creating Pauli operators for a two-level system with name name. The output of these functions depends on setting of use_σpm.

source
QuantumAlgebra.vacAFunction
Avac(A::QuExpr), vacA(A::QuExpr)

Simplify operator by assuming it is applied to the vacuum from the left or right, respectively. To be precise, Avac(A) returns $A'$ such that $A'|0⟩ = A|0⟩$, while vacA(A) does the same for $⟨0|A$.

source
QuantumAlgebra.vacExpValFunction
vacExpVal(A::QuExpr,S::QuExpr=1)

Calculate the vacuum expectation value $⟨0|S^\dagger A S|0⟩$, i.e., the expectation value $⟨ψ|A|ψ⟩$ for the state defined by $|ψ⟩= S|0⟩$`.

source
QuantumAlgebra.@boson_opsMacro

@boson_ops name: define function $name for creating bosonic annihilation operators with name name (also defines deprecated $(name)dag, use $(name)' instead)

source
QuantumAlgebra.@fermion_opsMacro

@fermion_ops name: define function $name for creating fermionic annihilation operators with name name (also defines deprecated $(name)dag, use $(name)' instead)

source
QuantumAlgebra.@tlspm_opsMacro

@tlspm_ops name: define functions $(name)m and $(name)p creating jump operators for a two-level system with name name.

source
QuantumAlgebra.@tlsxyz_opsMacro

@tlsxyz_ops name: define functions $(name)x, $(name)y, and $(name)z creating Pauli operators for a two-level system with name name.

source