Quantum operator and its product

API

FeynmanDiagram.QuantumOperators.OperatorProductType
struct 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.QuantumOperatorType
struct 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.:*Method
Base.:*(o1::Union{QuantumOperator, OperatorProduct}, o2::Union{QuantumOperator, OperatorProduct})

`o1 * o2` returns the quantum operator product of `o1` and `o2`
Base.adjointMethod
Base.adjoint(o::OperatorProduct)

Return the conjuated composite operator of `o`.
Base.adjointMethod
Base.adjoint(operator::QuantumOperator)

Return the conjuated quantum operator of operator.

FeynmanDiagram.QuantumOperators.correlator_orderMethod
function 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_annihilationMethod
Create 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.normal_orderMethod
function 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.parityMethod

The 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.