Converters Reference
module converters
function tn_from_uai_file
Parses a UAI file and returns the einsum format string and tensors representing the graphical model.
Args:
file_path
(str): The path to the UAI file.
Returns:
tuple[str, list]
: A tuple containing the format string and a list of tensors.
function tn_from_dimacs_file
Converts a DIMACS (weighted) model counting file to a tensor network.
Args:
file_path
(str): The path to the DIMACS file.clause_split_threshold
(int, optional): The threshold for splitting clauses. Defaults to 3.
Returns:
tuple[str, list]
: A tuple containing the equation and the list of tensors.