Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Relocation of DiagramId, Filter, ... to FrontEnds Module. #173

Merged
merged 2 commits into from
Jan 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 7 additions & 19 deletions src/FeynmanDiagram.jl
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,11 @@ export multi_product, linear_combination, feynman_diagram, propagator, interacti
# export reducibility, connectivity
# export 𝐺ᶠ, 𝐺ᵇ, 𝐺ᵠ, 𝑊, Green2, Interaction
# export Coupling_yukawa, Coupling_phi3, Coupling_phi4, Coupling_phi6
export haschildren, onechild, isleaf, isbranch, ischain, has_zero_subfactors, eldest
export relabel!, standardize_labels!, replace_subgraph!, merge_linear_combination!, merge_multi_product!, merge_chains!
export relabel, standardize_labels, replace_subgraph, merge_linear_combination, merge_multi_product, merge_chains
export open_parenthesis, open_parenthesis!, flatten_prod!, flatten_prod, flatten_sum!, flatten_sum
export optimize!, optimize, merge_all_chains!, merge_all_linear_combinations!, remove_duplicated_leaves!
export haschildren, onechild, isleaf, isbranch, ischain, has_zero_subfactors, eldest, count_operation
export relabel!, standardize_labels!, replace_subgraph!, merge_linear_combination!, merge_multi_product!, remove_zero_valued_subgraphs!
export relabel, standardize_labels, replace_subgraph, merge_linear_combination, merge_multi_product, remove_zero_valued_subgraphs
export open_parenthesis, open_parenthesis!, flatten_prod!, flatten_prod, flatten_sum!, flatten_sum, flatten_chains!, flatten_chains
export optimize!, optimize, flatten_all_chains!, merge_all_linear_combinations!, merge_all_multi_products!, remove_all_zero_valued_subgraphs!, remove_duplicated_leaves!, remove_duplicated_nodes!

include("TaylorSeries/TaylorSeries.jl")
using .Taylor
Expand All @@ -53,30 +53,18 @@ include("frontend/frontends.jl")
using .FrontEnds
export FrontEnds
export LabelProduct
export Filter, Wirreducible, Girreducible, NoBubble, NoHartree, NoFock, Proper, DirectOnly

include("frontend/parquet/parquet.jl")
using .Parquet
export Parquet
export ParquetBlocks
export DiagramType, VacuumDiag, SigmaDiag, GreenDiag, PolarDiag, Ver3Diag, Ver4Diag
export Filter, Wirreducible, Girreducible, NoBubble, NoHartree, NoFock, Proper, DirectOnly
export Response, Composite, ChargeCharge, SpinSpin, ProperChargeCharge, ProperSpinSpin, UpUp, UpDown
export AnalyticProperty, Instant, Dynamic, D_Instant, D_Dynamic

export DiagPara
export Interaction, interactionTauNum, innerTauNum
export TwoBodyChannel, Alli, PHr, PHEr, PPr, AnyChan
export Permutation, Di, Ex, DiEx
export DiagramId, GenericId, Ver4Id, Ver3Id, GreenId, SigmaId, PolarId
export PropagatorId, BareGreenId, BareInteractionId
export mergeby

include("frontend/GV.jl")
using .GV
export GV
export diagdictGV, diagdict_parquet, leafstates, leafstates_diagtree

# include("frontend/strong_coupling_expansion_builder/strong_coupling_expansion.jl")
# include("strong_coupling_expansion_builder/strong_coupling_expansion.jl")
# using .SCE
# export SCE
# export Gn
Expand Down
3 changes: 1 addition & 2 deletions src/backend/compiler.jl
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@ using PyCall
using ..ComputationalGraphs
import ..ComputationalGraphs: id, name, set_name!, operator, subgraphs, subgraph_factors, FeynmanProperties

using ..Parquet
using ..Parquet: PropagatorId, BareGreenId, BareInteractionId
using ..FrontEnds: PropagatorId, BareGreenId, BareInteractionId

using ..QuantumOperators
import ..QuantumOperators: isfermionic
Expand Down
9 changes: 5 additions & 4 deletions src/computational_graph/ComputationalGraph.jl
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,11 @@ include("eval.jl")
export eval!

include("transform.jl")
export relabel!, standardize_labels!, replace_subgraph!, merge_linear_combination!, merge_multi_product!, merge_chains!, flatten_chains!
export relabel, standardize_labels, replace_subgraph, merge_linear_combination, merge_multi_product, merge_chains, flatten_chains
export open_parenthesis!, open_parenthesis, flatten_prod!, flatten_prod, flatten_sum!, flatten_sum
export relabel!, standardize_labels!, replace_subgraph!, merge_linear_combination!, merge_multi_product!, remove_zero_valued_subgraphs!
export relabel, standardize_labels, replace_subgraph, merge_linear_combination, merge_multi_product, remove_zero_valued_subgraphs
export open_parenthesis, open_parenthesis!, flatten_prod!, flatten_prod, flatten_sum!, flatten_sum, flatten_chains!, flatten_chains
include("optimize.jl")
export optimize!, optimize
export optimize!, optimize, flatten_all_chains!, merge_all_linear_combinations!, merge_all_multi_products!, remove_all_zero_valued_subgraphs!, remove_duplicated_leaves!, remove_duplicated_nodes!


end
2 changes: 1 addition & 1 deletion src/computational_graph/optimize.jl
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@ end
"""
function unique_nodes!(graphs::AbstractVector{<:AbstractGraph})

Identifies and retrieves unique leaf nodes from a set of graphs.
Identifies and retrieves unique nodes from a set of graphs.

# Arguments:
- `graphs`: A collection of graphs to be processed.
Expand Down
30 changes: 11 additions & 19 deletions src/frontend/GV.jl
Original file line number Diff line number Diff line change
Expand Up @@ -6,32 +6,24 @@ import ..ComputationalGraphs: FeynmanGraph
import ..ComputationalGraphs: Graph
import ..ComputationalGraphs: _dtype
import ..Parquet
import ..Parquet: Filter, NoBubble, NoHartree, NoFock, DirectOnly
import ..Parquet: Wirreducible #remove all polarization subdiagrams
import ..Parquet: Girreducible #remove all self-energy inseration
import ..Parquet: NoBubble # true to remove all bubble subdiagram
import ..Parquet: Proper #ver4, ver3, and polarization diagrams may require to be irreducible along the transfer momentum/frequency
import ..Parquet: Response, Composite, ChargeCharge, SpinSpin, UpUp, UpDown
import ..Parquet: AnalyticProperty, Instant, Dynamic, D_Instant, D_Dynamic
import ..Parquet: DiagramType, VacuumDiag, SigmaDiag, GreenDiag, PolarDiag, Ver3Diag, Ver4Diag
import ..Parquet: Interaction, DiagPara
import ..Taylor
using ..FrontEnds
import ..FrontEnds: Filter, NoHartree, NoFock, DirectOnly
import ..FrontEnds: Wirreducible #remove all polarization subdiagrams
import ..FrontEnds: Girreducible #remove all self-energy inseration
import ..FrontEnds: NoBubble # true to remove all bubble subdiagram
import ..FrontEnds: Proper #ver4, ver3, and polarization diagrams may require to be irreducible along the transfer momentum/frequency
import ..FrontEnds: Response, Composite, ChargeCharge, SpinSpin, UpUp, UpDown
import ..FrontEnds: AnalyticProperty, Instant, Dynamic
import ..FrontEnds: DiagramId, Ver4Id, Ver3Id, GreenId, SigmaId, PolarId, BareGreenId, BareInteractionId


using AbstractTrees

import ..Utility: taylorexpansion!

import ..Interaction
import ..DiagPara

import ..DiagramId
import ..Ver4Id
import ..Ver3Id
import ..GreenId
import ..SigmaId
import ..PolarId
import ..BareInteractionId
import ..BareGreenId

export eachorder_diag, diagdictGV, diagdict_parquet, leafstates, leafstates_diagtree

include("GV_diagrams/readfile.jl")
Expand Down
Loading
Loading