Front-end generates Feynman diagrams and translates then into a computational graph
API
FeynmanDiagram.FrontEnds.BareGreenNId
— Typetime-ordered N-point Bare Green's function
FeynmanDiagram.FrontEnds.BareHoppingId
— Typehopping function c⁺c⁻
FeynmanDiagram.FrontEnds.ConnectedGreenNId
— Typetime-ordered N-point Composite Green's function
FeynmanDiagram.FrontEnds.DiagramId
— Typeabstract type DiagramId end
The abstract type of all diagrams/subdiagrams/bare propagators
FeynmanDiagram.FrontEnds.GreenNId
— Typetime-ordered N-point Composite Green's function
FeynmanDiagram.FrontEnds.LabelProduct
— TypeThe 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
FeynmanDiagram.FrontEnds.LoopPool
— Typestruct 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).
FeynmanDiagram.FrontEnds.PropagatorId
— Typeabstract type PropagatorId <: DiagramId end
The abstract type of all bare propagators
Base.length
— Methodfunction Base.length(obj::LabelProduct)
Return the number of grids of the LabelProduct.
Base.show
— Methodfunction Base.show(io::IO, obj::LabelProduct)
Print the LabelProduct.
Base.size
— Methodfunction Base.size(obj::LabelProduct, I::Int)
Return the length of the specifict Ith label factor of the LabelProduct.
Base.size
— Methodfunction Base.size(obj::LabelProduct, I::Int)
Return the length of the specifict Ith label factor of the LabelProduct.
FeynmanDiagram.FrontEnds.index_to_linear
— Method@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
FeynmanDiagram.FrontEnds.leafstates
— Methodfunction 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.
FeynmanDiagram.FrontEnds.leafstates
— Methodfunction 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.
FeynmanDiagram.FrontEnds.linear_to_index
— Methodfunction 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
FeynmanDiagram.FrontEnds.reconstruct
— Methodreconstruct(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)