Quantum operator and its product
API
FeynmanDiagram.QuantumOperators.OperatorProduct
— Typestruct OperatorProduct <: AbstractVector{QuantumOperator}
struct of a quantum-operator product. It is a subtype of `AbstractVector` and
inherits a large set of Vector behaviors including iteration and indexing.
Members:
operators::Vector{QuantumOperator}
vector of quantum operators
FeynmanDiagram.QuantumOperators.QuantumOperator
— Typestruct QuantumOperator
struct of a quantum operator.
Members:
operator::Datatype
: type of quantum operator, supports :f⁺, :f⁻, :f, :b⁺, :b⁻, :ϕlabel::Int
: label of the operator indices. It could represent spacetime, spin, momentum, flavor, etc.is_ghost::Bool
: whether the operator is a ghost operator or not.
Base.:*
— MethodBase.:*(o1::Union{QuantumOperator, OperatorProduct}, o2::Union{QuantumOperator, OperatorProduct})
`o1 * o2` returns the quantum operator product of `o1` and `o2`
Base.adjoint
— MethodBase.adjoint(o::OperatorProduct)
Return the conjuated composite operator of `o`.
Base.adjoint
— MethodBase.adjoint(operator::QuantumOperator)
Return the conjuated quantum operator of operator
.
FeynmanDiagram.QuantumOperators.correlator_order
— Methodfunction correlator_order(operator::OperatorProduct)
function correlator_order(operator::OperatorProduct)
Convert a OperatorProduct to correlator-ordered form.
Returns the associated statistical sign and permutation.
FeynmanDiagram.QuantumOperators.fermionic_annihilation
— MethodCreate a OperatorProduct with one quantum operator from given label `i`.
It supports the following abbreviated function form:
''' const 𝑓⁻ = fermionicannihilation const 𝑓⁺ = fermioniccreation const 𝑓 = majorana const 𝑏⁻ = bosonicannihilation const 𝑏⁺ = bosoniccreation const 𝜙 = real_classic '''
FeynmanDiagram.QuantumOperators.isannihilation
— Methodfunction isannihilation(operator::QuantumOperator)
Check if operator
is an annihilation operator.
FeynmanDiagram.QuantumOperators.iscreation
— Methodfunction iscreation(operator::QuantumOperator)
Check if operator
is a creation operator.
FeynmanDiagram.QuantumOperators.isfermionic
— Methodfunction isfermionic(o::OperatorProduct)
Check if `o` is a fermionic composite operator.
FeynmanDiagram.QuantumOperators.isfermionic
— Methodfunction isfermionic(operator::QuantumOperator)
Check if operator
is a fermionic operator.
FeynmanDiagram.QuantumOperators.normal_order
— Methodfunction normal_order(operator::OperatorProduct)
Computes the permutation required to convert a OperatorProduct to normal-ordered form.
Returns the associated statistical sign and permutation.
FeynmanDiagram.QuantumOperators.parity
— MethodThe parity of a permutation P is +1 if the number of 2-cycles (swaps) in an n-cycle decomposition with n ≤ 2 is even, and -1 if the number of 2-cycles is odd.
FeynmanDiagram.QuantumOperators.parity_old
— Methodcalculate the parity of a given permutation of the array [1, 2, 3, ...]