io¶
import qrules.io
Serialization module for the qrules
.
The io
module provides tools to export or import objects from qrules
to
and from disk, so that they can be used by external packages, or just to store
(cache) the state of the system.
-
asdot
(instance: object, *, render_node: bool = True, render_final_state_id: bool = True, render_resonance_id: bool = False, render_initial_state_id: bool = False, strip_spin: bool = False, collapse_graphs: bool = False) → str[source]¶ Convert a
object
to a DOT languagestr
.Only works for objects that can be represented as a graph, particularly a
StateTransitionGraph
or alist
ofStateTransitionGraph
instances.See also