pyrates

PyRates.pyrates.frontend

pyrates.frontend.dict module

pyrates.frontend.dict.add_to_dict(template, template_dict: dict, full_dict: dict)[source]
pyrates.frontend.dict.from_circuit(circuit: pyrates.frontend.template.circuit.CircuitTemplate, return_dict: dict, base: str = 'CircuitTemplate') → str[source]

Reformat graph structure into a dictionary that can be saved as YAML template. The current implementation assumes that nodes and edges are given by as templates.

pyrates.frontend.dict.from_edge(edge: pyrates.frontend.template.edge.EdgeTemplate, return_dict: dict, base: str = 'EdgeTemplate') → Optional[str][source]

Reformat edge template into a list that can be saved as YAML template.

pyrates.frontend.dict.from_node(node: Union[pyrates.frontend.template.node.NodeTemplate, pyrates.frontend.template.edge.EdgeTemplate], return_dict: dict, base: str = 'NodeTemplate') → str[source]

Reformat operator structure into a dictionary that can be saved as YAML template.

pyrates.frontend.dict.from_operator(op: pyrates.frontend.template.operator.OperatorTemplate, updates: dict, return_dict: dict, base: str = 'OperatorTemplate') → str[source]

Reformat operator template into a dictionary that can be saved as YAML template.

pyrates.frontend.file module

pyrates.frontend.file.parse_path(path: str)[source]

Parse a path of form path.to.template_file.template_name or path/to/template_file/template_name, returning a tuple of (name, file, abspath).

pyrates.frontend.utility module

pyrates.frontend.utility.deep_freeze(freeze: Union[dict, list, set, tuple])[source]
Parameters:freeze
Returns:
Return type:frozen