GV expansion to a computational graph
API
FeynmanDiagram.FrontEnds.GV.diagsGV
— Methodfunction diagsGV(type::Symbol, order::Int, GOrder::Int=0, VerOrder::Int=0;
labelProd::Union{Nothing,LabelProduct}=nothing, spinPolarPara::Float64=0.0,
tau_labels::Union{Nothing,Vector{Int}}=nothing, filter::Vector{Filter}=[NoHartree])
Generates a `Vector{FeynmanGraph}`: the given-`type` diagrams with static interactions of a given order, where the actual order of diagrams equals to `order + VerOrder + 2 * GOrder`.
Generates a `LabelProduct`: `labelProd` with inputs `tau_labels` and all the possible momenta-loop basis.
Generates external tau labels Vector{Vector{Int}}. The i-th labels (Vector{Int}) corresponds to the i-th `FeynmanGraph` in `Vector{FeynmanGraph}`.
Arguments:
type
(Symbol): The type of the diagrams, including:spinPolar
,:chargePolar
,:sigma
,:green
, or:freeEnergy
.order
(Int): The order of the diagrams without counterterms.GOrder
(Int): The order of self-energy counterterms.VerOrder
(Int): The order of interaction counterterms.labelProd
(Union{Nothing,LabelProduct}=nothing, optional): The initial cartesian QuantumOperator.label product (defaults tonothing
).spinPolarPara
(Float64, optional): The spin-polarization parameter (nup - ndown) / (nup + ndown) (defaults to0.0
).tau_labels
(Union{Nothing, Vector{Int}}, optional): The labels for the discrete time of each vertex. (defaults tonothing
).
Returns
A tuple (diagrams, fermi_labelProd, bose_labelProd, extT_labels)
where
diagrams
is aVector{FeynmanGraph}
object representing the diagrams,labelProd
is aLabelProduct
object containing the labels for the leaves of graphs,extT_labels
is aVector{Union{Tuple,Vector{Int}}}
object containing the external tau labels for eachFeynmanGraph
indiagrams
.
FeynmanDiagram.FrontEnds.GV.diagsGV_ver4
— Methodfunction diagsGV_ver4(order::Int; spinPolarPara::Float64=0.0, filter::Vector{Filter}=[NoHartree], channels=[PHr, PHEr, PPr, Alli])
Generates a `Vector{Graph}`: the 4-point vertex diagrams with static interactions of a given order.
Arguments:
order
(Int): The order of the diagrams without counterterms.spinPolarPara
(Float64, optional): The spin-polarization parameter (nup - ndown) / (nup + ndown) (defaults to0.0
).channels
(optional): The channels for the diagrams, defaults to[PHr, PHEr, PPr, Alli]
.filter
(optional): Filter criteria for the diagrams, defaults to[NoHartree]
.
FeynmanDiagram.FrontEnds.GV.read_diagrams
— Methodfunction read_diagrams(filename::AbstractString; loopPool::Union{LoopPool,Nothing}=nothing,
dim::Int=3, tau_labels::Union{Nothing,Vector{Int}}=nothing, GTypes=[0, 1], VTypes=[0, 1, 2],
keywords::Vector{String}=["Polarization", "DiagNum", "Order", "GNum", "Ver4Num", "LoopNum", "ExtLoopIndex",
"DummyLoopIndex", "TauNum", "ExtTauIndex", "DummyTauIndex"])
Reads a GV_diagrams file and returns FeynmanGraph of diagrams in this file
and the corresponding `LabelProduct` objects, which are used to keep track of QuantumOperator.label.
Arguments:
filename
(AbstractString): The path to the file containing the diagrams.loopPool
(Union{LoopPool,Nothing}): An optionalLoopPool
object. If not provided, a new one will be created.spinPolarPara
(Float64): The spin-polarization parameter (nup - ndown) / (nup + ndown) (defaults to0.0
).dim
(Int): The dimension of the system, used to initialize theLoopPool
object. Default is 3.tau_labels
(Union{Nothing,Vector{Int}}): The labels for theTau
objects in the diagrams. If not provided, they will be set to the integers from 1 totauNum
.GTypes
(Vector{Int}): The labels for the fermionicG
objects in the diagrams. Default is[0, 1]
.VTypes
(Vector{Int}): The labels for the bosonicV
objects in the diagrams. Default is[0, 1, 2]
.keywords
(Vector{String}): A set of keywords used to extract information from the file. Default is["Polarization", "DiagNum", "Order", "GNum", "Ver4Num", "LoopNum", "ExtLoopIndex", "DummyLoopIndex", "TauNum", "ExtTauIndex", "DummyTauIndex"]
.
Returns
A tuple (diagrams, fermi_labelProd, bose_labelProd)
where
diagrams
is aFeynmanGraph
object representing the diagrams,fermi_labelProd
is aLabelProduct
object containing the labels for the fermionicG
objects in the diagrams,bose_labelProd
is aLabelProduct
object containing the labels for the bosonicW
objects in the diagrams.