loom.eka.utilities.validation_tools
Copyright (c) Entropica Labs Pte Ltd 2025.
Use, distribution and reproduction of this program in its source or compiled form is prohibited without the express written consent of Entropica Labs Pte Ltd.
- loom.eka.utilities.validation_tools.coordinate_length_error(list_of_coordinates)[source]
Check if the length of the lists in the list are consistent.
- Return type:
tuple[tuple,...]
- loom.eka.utilities.validation_tools.distinct_error(value)[source]
Check if the elements in a list or tuple are distinct. Throw an error otherwise.
- loom.eka.utilities.validation_tools.empty_list_error(list_obj)[source]
Check if the list is empty. Throw an error if that is the case.
- loom.eka.utilities.validation_tools.ensure_tuple(list_obj)[source]
Adjusts lists to tuples to ensure immutability of the data structures.
- loom.eka.utilities.validation_tools.larger_than_zero_error(value, arg_name)[source]
Check if the value is larger than zero.
- loom.eka.utilities.validation_tools.no_name_error(name)[source]
Check if the name is not empty.
- Return type:
str
- loom.eka.utilities.validation_tools.nr_of_qubits_error(qubits, values)[source]
Check if the number of qubits is consistent with the length of the pauli string.
This field_validator is used for objects that include a pauli field.
- loom.eka.utilities.validation_tools.pauli_error(pauli_str)[source]
Check if the pauli is a valid pauli string.
- Return type:
str