pygsti.objects.EvalTree

class pygsti.objects.EvalTree(items=[])
An Evaluation Tree. Instances of this class specify how to
perform bulk GateSet operations.
EvalTree instances create and store the decomposition of a list
of gate strings into a sequence of 2-term products of smaller strings. Ideally, this sequence would prescribe the way to obtain the entire list of gate strings, starting with just the single gates, using the fewest number of multiplications, but this optimality is not guaranteed.
__init__(items=[])

Create a new, empty, evaluation tree.

Methods

__init__([items]) Create a new, empty, evaluation tree.
append L.append(object) – append object to end
copy() Create a copy of this evaluation tree.
count(...)
extend L.extend(iterable) – extend list by appending elements from the iterable
generate_gatestring_list() Generate a list of the final gate strings this tree evaluates.
get_analysis_plot_infos() Returns debug plot information useful for assessing the quality of a tree.
get_init_labels() Return a tuple of the gate labels (strings) which form the beginning of the tree.
get_list_of_final_value_tree_indices() Get a list of indices (ints) which specifying the tree indices corresponding to each gate string in the gatestring_list passed to initialize.
get_min_tree_size() Returns the minimum sub tree size required to compute each of the tree entries individually.
get_sub_trees() Returns a list of all the sub-trees (also EvalTree instances) of this tree.
get_tree_index_of_final_value(finalValueIndex) Return the index within the tree list of the gate string that had index finalValueIndex in the gatestring_list passed to initialize.
index((value, [start, ...) Raises ValueError if the value is not present.
initialize(gateLabels, gatestring_list) Initialize an evaluation tree using a set of gate strings.
insert L.insert(index, object) – insert object before index
is_split() Returns boolean indicating whether tree is split into sub-trees or not.
num_final_strings() Returns the integer number of “final” gate strings, equal to the length of the gatestring_list passed to initialize.
pop(...) Raises IndexError if list is empty or index is out of range.
print_analysis() Print a brief analysis of this tree.
remove L.remove(value) – remove first occurrence of value.
reverse L.reverse() – reverse IN PLACE
sort L.sort(cmp=None, key=None, reverse=False) – stable sort IN PLACE;
split([maxSubTreeSize, numSubTrees]) Split this tree into sub-trees in order to reduce the maximum size of any tree (useful for limiting memory consumption or for using multiple cores).