GV expansion to a computational graph

API

FeynmanDiagram.FrontEnds.GV.diagsGVMethod
function 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 to nothing).
  • spinPolarPara (Float64, optional): The spin-polarization parameter (nup - ndown) / (nup + ndown) (defaults to 0.0).
  • tau_labels(Union{Nothing, Vector{Int}}, optional): The labels for the discrete time of each vertex. (defaults to nothing).

Returns

A tuple (diagrams, fermi_labelProd, bose_labelProd, extT_labels) where

  • diagrams is a Vector{FeynmanGraph} object representing the diagrams,
  • labelProd is a LabelProduct object containing the labels for the leaves of graphs,
  • extT_labels is a Vector{Union{Tuple,Vector{Int}}} object containing the external tau labels for each FeynmanGraph in diagrams.
source
FeynmanDiagram.FrontEnds.GV.diagsGV_ver4Method
function 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 to 0.0).
  • channels (optional): The channels for the diagrams, defaults to [PHr, PHEr, PPr, Alli].
  • filter (optional): Filter criteria for the diagrams, defaults to [NoHartree].
source
FeynmanDiagram.FrontEnds.GV.read_diagramsMethod
function 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 optional LoopPool object. If not provided, a new one will be created.
  • spinPolarPara (Float64): The spin-polarization parameter (nup - ndown) / (nup + ndown) (defaults to 0.0).
  • dim (Int): The dimension of the system, used to initialize the LoopPool object. Default is 3.
  • tau_labels (Union{Nothing,Vector{Int}}): The labels for the Tau objects in the diagrams. If not provided, they will be set to the integers from 1 to tauNum.
  • GTypes (Vector{Int}): The labels for the fermionic G objects in the diagrams. Default is [0, 1].
  • VTypes (Vector{Int}): The labels for the bosonic V 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 a FeynmanGraph object representing the diagrams,
  • fermi_labelProd is a LabelProduct object containing the labels for the fermionic G objects in the diagrams,
  • bose_labelProd is a LabelProduct object containing the labels for the bosonic W objects in the diagrams.
source