Quantum operator and its product
API
FeynmanDiagram.QuantumOperators.OperatorProduct — Type
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.QuantumOperator — Type
struct QuantumOperatorstruct 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.adjoint — Method
Base.adjoint(o::OperatorProduct)
Return the conjuated composite operator of `o`.Base.adjoint — Method
Base.adjoint(operator::QuantumOperator)Return the conjuated quantum operator of operator.
FeynmanDiagram.QuantumOperators.correlator_order — Method
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_annihilation — Method
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.isannihilation — Method
function isannihilation(operator::QuantumOperator)Check if operator is an annihilation operator.
FeynmanDiagram.QuantumOperators.iscreation — Method
function iscreation(operator::QuantumOperator)Check if operator is a creation operator.
FeynmanDiagram.QuantumOperators.isfermionic — Method
function isfermionic(o::OperatorProduct)
Check if `o` is a fermionic composite operator.FeynmanDiagram.QuantumOperators.isfermionic — Method
function isfermionic(operator::QuantumOperator)Check if operator is a fermionic operator.
FeynmanDiagram.QuantumOperators.normal_order — Method
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.parity — Method
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.
FeynmanDiagram.QuantumOperators.parity_old — Method
calculate the parity of a given permutation of the array [1, 2, 3, ...]