mbqc_scheduling.Paths
- class mbqc_scheduling.Paths(paths)
Bases:
object
Opaque Rust object. The information returned from the scheduling algorithm (run) describing valid initalization-measurement paths.
- __init__(paths)
Create a new Paths object.
Methods
__init__
(paths)Create a new Paths object.
deserialize
(file_path[, serialization_format])Deserialize the internal data structure from a file.
deserialize_from_string
(string[, ...])Deserialize the internal data structure from a string.
Transform and return the internal Rust data representation into the according Python representation.
serialize
(file_path[, serialization_format])Serialize the internal data structure into a file.
serialize_to_string
([serialization_format])Serialize the internal data structure into a string.
Transform and return the internal Rust data representation into the according Python representation replacing the internal data with its default value.
- static deserialize(file_path, serialization_format='serde_json')
Deserialize the internal data structure from a file.
- Parameters:
file_path (str) – The path to the file to read from.
serialization_format (str) – The serialization format to use. The supported formats are: serde_json and bincode.
- static deserialize_from_string(string, serialization_format='serde_json')
Deserialize the internal data structure from a string.
- Parameters:
string (str) – The string to read from.
serialization_format (str) – The serialization format to use. The supported formats are: serde_json.
- into_py_paths()
Transform and return the internal Rust data representation into the according Python representation. If you do this mutiple times consider using the according take_ method to avoid an additional clone, however, be aware that the internal data is replaced with its default value.
- Return type:
list[Path]
- serialize(file_path, serialization_format='serde_json')
Serialize the internal data structure into a file.
- Parameters:
file_path (str) – The path to the file to write to.
serialization_format (str) – The serialization format to use. The supported formats are: serde_json and bincode.
- serialize_to_string(serialization_format='serde_json')
Serialize the internal data structure into a string.
- Parameters:
serialization_format (str) – The serialization format to use. The supported formats are: serde_json.