Front-end generates Feynman diagrams and translates then into a computational graph

API

FeynmanDiagram.FrontEnds.LabelProductType

The cartesian QuantumOperator.label product:

#Parameters:

  • 'LT': Type of labels
  • 'N' : Number of labels' type

#Members:

  • 'labels' : The list of labels in the LabelProduct
  • 'dims' : A tuple of the length of the label factors
source
FeynmanDiagram.FrontEnds.LoopPoolType
struct LoopPool{T}

Pool of loop basis. Each loop basis corresponds to a loop variable.
A loop variable is a linear combination of N independent loops. The combination coefficients is what we call a loop basis.
For example, if a loop is a momentum K, then

varibale_i = K_1*basis[1, i] + K_2*basis[2, i] + K_3*basis[3, i] + ...

Members

  • name::Symbol : name of the pool
  • dim::Int : dimension of a loop variable (for example, the dimension of a momentum-frequency loop variable is (d+1) where d is the spatial dimension)
  • basis::Matrix{T} : Matrix of (N x Nb) that stores the loop basis, where Nb is the number of loop basis (or number of loop variables).
  • loops::Matrix{T} : Matrix of (dim x Nb) that stores the loop variables, where Nb is the number of loop basis (or number of loop variables).
source
Base.lengthMethod
function Base.length(obj::LabelProduct)

Return the number of grids of the LabelProduct.

source
Base.showMethod
function Base.show(io::IO, obj::LabelProduct)

Print the LabelProduct.

source
Base.sizeMethod
function Base.size(obj::LabelProduct, I::Int)

Return the length of the specifict Ith label factor of the LabelProduct.

source
Base.sizeMethod
function Base.size(obj::LabelProduct, I::Int)

Return the length of the specifict Ith label factor of the LabelProduct.

source
FeynmanDiagram.FrontEnds.index_to_linearMethod
@generated function index_to_linear(obj::LabelProduct{LT,N}, I...) where {LT,N}

Convert a tuple of the indexes of each label to a single linear index of the LabelProduct.

Argument:

  • 'obj': The LabelProduct object
  • 'index...': N indexes of the label factor, where N is the number of label factor
source
FeynmanDiagram.FrontEnds.leafstatesMethod
function leafstates(leaf_maps::Vector{Dict{Int,G}}, maxloopNum::Int)

Extracts leaf information from the leaf mapping from the leaf value's index to the leaf node for all graph partitions. 
The information includes their initial value, type, orders, in/out time, and loop momentum index.
The loop basis is also obtained for all the graphs.

Arguments:

  • leaf_maps: A vector of the dictionary mapping the leaf value's index to the Graph of this leaf. Each dict corresponds to a graph partition, such as (order, Gorder, Vorder).
  • maxloopNum: The maximum loop-momentum number.

Returns

  • A tuple of vectors containing information about the leaves of graphs, including their initial values, types, orders, input and output time indexes, and loop-momenta indexes.
  • Loop-momentum basis (::Vector{Vector{Float64}}) for all the graphs.
source
FeynmanDiagram.FrontEnds.leafstatesMethod
function leafstates(leaf_maps::Vector{Dict{Int,G}}, labelProd::LabelProduct) where {G<:Union{Graph,FeynmanGraph}}

Extracts leaf information from the leaf mapping from the leaf value's index to the leaf node for all graph partitions
and their associated LabelProduct data (`labelProd`). 
The information includes their initial value, type, orders, in/out time, and loop momenta.

Arguments:

  • leaf_maps: A vector of the dictionary mapping the leaf value's index to the FeynmanGraph/Graph of this leaf. Each dict corresponds to a graph partition, such as (order, Gorder, Vorder).
  • labelProd: A LabelProduct used to label the leaves of graphs.

Returns

  • A tuple of vectors containing information about the leaves of graphs, including their initial values, types, orders, input and output time indexes, and loop-momenta indexes.
source
FeynmanDiagram.FrontEnds.linear_to_indexMethod
function linear_to_index(obj::LabelProduct, I::Int)

Convert the single linear index of the LabelProduct to a tuple of indexes of each label.

Argument:

  • 'obj': The LabelProduct object
  • 'I': The linear index of the LabelProduct
source
FeynmanDiagram.FrontEnds.reconstructMethod
reconstruct(instance::DiagramId, updates::Pair{Symbol}...)

Create a new instance of the same type as instance, with specified fields updated to new values.

Usage

newinstance = reconstruct(oldinstance, :field1 => newvalue1, :field2 => newvalue2)

source