You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
inplace_prod — Propagate subgraph factors up multiplicative chains and merge.
merge_prefactors — Factorize multiplicative graph prefactors, e.g., $a * G + b * G \rightarrow (a + b) * G$.
merge_chains — Merge operator chains into a single operation, e.g., $a+(+(\cdots+(+b)\cdots)) \rightarrow a+b$ and $G_1 +(+(\cdots+)+)\; G_2 \rightarrow G_1 + G_2$.
merge_operators — Use the associativity of an operator $\mathcal{O}$ to "deparenthesize" an expression, i.e., join two sub-operations into a single $n$-ary form. Use with $\mathcal{O} = \bigotimes$ requires Base.:*(g1, g2).
split_operator — Use the associativity of an operator $\mathcal{O}$ to "parenthesize" an expression, i.e., split the $n$-ary form of a node into two sub-operations. Use with $\mathcal{O} = \bigotimes$ requires Base.:/(g1, g2).
High-priority transformations for the Parquet front-end:
relabel — Update the label(s) of quantum operators in a graph and its subgraphs, e.g., {{1,2}=>3, 3=>4}.
standarize_labels — Finds all labels in a graph and its subgraphs (e.g., 1,4,5,7...) and then relabels them in standard order 1,2,3,4,...
unghost_legs — A special case of split_operator for graph decomposition $(\mathcal{O} = \bigotimes)$ which does not require Base.:/(g1, g2). Extracts a vertex with ghost legs and its connected propagators into a new $\bigotimes$ node, thereby "unghosting" its legs.
replace_subgraph — Replace one subgraph of a graph g with another one of possibly different topology.
Low-priority transformations requiring associative graph (de)composition to be defined via Base.:*(g1, g2) and Base.:/(g1, g2):
expand — Expand a factorized graph expression: $(G_1 + G_2) * W \mapsto G_1 * W + G_2 * W$. The recursive depth should be specified by an argument depth which is 1 by default.
factorize — Factorize a graph expression (the inverse of expand): $G_1 * W + G_2 * W \mapsto (G_1 + G_2) * W$. The recursive depth should be specified by an argument depth which is 1 by default. Requires Base.:/(g1, g2).
tofeynmanrep — Convert a general graph to the Feynman representation by chaining expand and merge_chains.
fromfeynmanrep — Optimize a graph in the Feynman representation by chaining factorize and merge_chains.
Definitions/Examples
The text was updated successfully, but these errors were encountered:
Write unit tests and functions for essential tree transformations in the intermediate (computational graph) representation:
Transformations
Transformations for tree sanitization:
prune_unary
— Prune trivial unary operations, e.g.,inplace_prod
— Propagate subgraph factors up multiplicative chains and merge.merge_prefactors
— Factorize multiplicative graph prefactors, e.g.,merge_chains
— Merge operator chains into a single operation, e.g.,merge_operators
— Use the associativity of an operatorBase.:*(g1, g2)
.split_operator
— Use the associativity of an operatorBase.:/(g1, g2)
.High-priority transformations for the Parquet front-end:
relabel
— Update the label(s) of quantum operators in a graph and its subgraphs, e.g., {{1,2}=>3, 3=>4}.standarize_labels
— Finds all labels in a graph and its subgraphs (e.g., 1,4,5,7...) and then relabels them in standard order 1,2,3,4,...unghost_legs
— A special case ofsplit_operator
for graph decompositionBase.:/(g1, g2)
. Extracts a vertex with ghost legs and its connected propagators into a newreplace_subgraph
— Replace one subgraph of a graph g with another one of possibly different topology.Low-priority transformations requiring associative graph (de)composition to be defined via
Base.:*(g1, g2)
andBase.:/(g1, g2)
:expand
— Expand a factorized graph expression:depth
which is 1 by default.factorize
— Factorize a graph expression (the inverse ofexpand
):depth
which is 1 by default. RequiresBase.:/(g1, g2)
.tofeynmanrep
— Convert a general graph to the Feynman representation by chainingexpand
andmerge_chains
.fromfeynmanrep
— Optimize a graph in the Feynman representation by chainingfactorize
andmerge_chains
.Definitions/Examples
The text was updated successfully, but these errors were encountered: