Interface
These functions (mostly) form the internal interface of the package, and should not be relevant to most users.
QuantumAlgebra.AvacQuantumAlgebra.BosonCreateQuantumAlgebra.BosonDestroyQuantumAlgebra.CorrPerm_islessQuantumAlgebra.CorrTup_islessQuantumAlgebra.FermionCreateQuantumAlgebra.FermionDestroyQuantumAlgebra.TLSCreateQuantumAlgebra.TLSDestroyQuantumAlgebra.TLSxQuantumAlgebra.TLSyQuantumAlgebra.TLSzQuantumAlgebra.boson_opsQuantumAlgebra.corrQuantumAlgebra.expvalQuantumAlgebra.expval2corrs_indsQuantumAlgebra.expval_as_corrsQuantumAlgebra.extindicesQuantumAlgebra.fermion_opsQuantumAlgebra.heisenberg_eomQuantumAlgebra.symmetric_index_numsQuantumAlgebra.tlspm_opsQuantumAlgebra.tlsxyz_opsQuantumAlgebra.vacAQuantumAlgebra.vacExpValQuantumAlgebra.∑QuantumAlgebra.@anticommuting_fermion_groupQuantumAlgebra.@boson_opsQuantumAlgebra.@fermion_opsQuantumAlgebra.@tlspm_opsQuantumAlgebra.@tlsxyz_ops
QuantumAlgebra.Avac — FunctionAvac(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$.
QuantumAlgebra.BosonCreate — MethodBosonCreate(name,inds): represent bosonic creation operator $name_{inds}$
QuantumAlgebra.BosonDestroy — MethodBosonDestroy(name,inds): represent bosonic annihilation operator $name_{inds}$
QuantumAlgebra.CorrPerm_isless — MethodCorrPerm_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)).
QuantumAlgebra.CorrTup_isless — MethodCorrTup_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
QuantumAlgebra.FermionCreate — MethodFermionCreate(name,inds): represent fermionic creation operator $name_{inds}$
QuantumAlgebra.FermionDestroy — MethodFermionDestroy(name,inds): represent fermionic annihilation operator $name_{inds}$
QuantumAlgebra.TLSCreate — MethodTLSCreate(name,inds): represent TLS creation operator $name_{inds}$
QuantumAlgebra.TLSDestroy — MethodTLSDestroy(name,inds): represent TLS annihilation operator $name_{inds}$
QuantumAlgebra.TLSx — MethodTLSx(name,inds): represent TLS x operator $name_{inds}$
QuantumAlgebra.TLSy — MethodTLSy(name,inds): represent TLS y operator $name_{inds}$
QuantumAlgebra.TLSz — MethodTLSz(name,inds): represent TLS z operator $name_{inds}$
QuantumAlgebra.boson_ops — Methodboson_ops(name::Symbol): return function for creating bosonic annihilation and creation operators with name name (i.e., wrappers of BosonDestroy and BosonCreate)
QuantumAlgebra.corr — Methodexpval(A::QuExpr): replace expression A by its (formal) correlator ⟨A⟩c.
QuantumAlgebra.expval — Methodexpval(A::QuExpr): replace expression A by its (formal) expectation value ⟨A⟩.
QuantumAlgebra.expval2corrs_inds — Methodexpval2corrs_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.
QuantumAlgebra.expval_as_corrs — Methodexpval_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}$.
QuantumAlgebra.extindices — Methodextindices(A) return externally visible indices of an expression
QuantumAlgebra.fermion_ops — Methodfermion_ops(name::Symbol): return function for creating fermionic annihilation and creation operators with name name (i.e., wrappers of FermionDestroy and FermionCreate)
QuantumAlgebra.heisenberg_eom — Functionheisenberg_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.
QuantumAlgebra.symmetric_index_nums — Methodsymmetric_index_nums(A) return sequence of numbers of exchange-symmetric indices
QuantumAlgebra.tlspm_ops — Methodtlspm_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.
QuantumAlgebra.tlsxyz_ops — Methodtlsxyz_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.
QuantumAlgebra.vacA — FunctionAvac(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$.
QuantumAlgebra.vacExpVal — FunctionvacExpVal(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⟩$`.
QuantumAlgebra.∑ — Method∑(ind,A::QuExpr): return (formal) sum of expression A over index ind.
QuantumAlgebra.@anticommuting_fermion_group — Macro@anticommuting_fermion_group name1 name2 ...: define a group of mutually anticommuting fermionic operators
QuantumAlgebra.@boson_ops — Macro@boson_ops name: define function $name for creating bosonic annihilation operators with name name (also defines deprecated $(name)dag, use $(name)' instead)
QuantumAlgebra.@fermion_ops — Macro@fermion_ops name: define function $name for creating fermionic annihilation operators with name name (also defines deprecated $(name)dag, use $(name)' instead)
QuantumAlgebra.@tlspm_ops — Macro@tlspm_ops name: define functions $(name)m and $(name)p creating jump operators for a two-level system with name name.
QuantumAlgebra.@tlsxyz_ops — Macro@tlsxyz_ops name: define functions $(name)x, $(name)y, and $(name)z creating Pauli operators for a two-level system with name name.