|
def | __init__ (self, id_num, name, is_quantum, pa_nd, projected_axis, has_commas=True) |
|
def | __init__ (self, id_num, name="blank", size=2) |
|
def | set_potential (self, pot) |
|
def | resize (self, size) |
|
def | set_state_name (self, position, name) |
|
def | st_name_index (self, st_name) |
|
def | forget_all_evidence (self) |
|
def | get_active_states (self) |
|
def | set_active_states (self, states) |
|
def | set_state_names_to_product (self, list_of_iters, repeat=1, trim=False) |
|
def | __init__ (self, id_num, name="blank") |
|
def | add_parent (self, node) |
|
def | add_parents (self, node_list) |
|
def | remove_parent (self, node) |
|
def | has_parent (self, node) |
|
def | add_child (self, node) |
|
def | add_children (self, node_list) |
|
def | remove_child (self, node) |
|
def | has_child (self, node) |
|
def | undirect (self) |
|
def | get_markov_blanket (self) |
|
def | __init__ (self, id_num, name="blank") |
|
def | __lt__ (self, other) |
|
def | add_neighbor (self, node) |
|
def | remove_neighbor (self, node) |
|
def | has_neighbor (self, node) |
|
The Constructor of this class builds a BayesNode that has a transition
matrix appropriate for a marginalizer node. Given a quantum state |a0,
a1, a2,....> and asked to project along axis or component 2,
a marginalizer node will give back |a2>. That is the gist of it.
The following is expected:
* the focus node has exactly one parent node,
* the states of the parent node are of one of two forms: has_commas=True
or False
When 'has_commas' is True, the states of the parent node must be of the
form (a_0, a_1, a_2,... a_{n-1}) where a_0 \in S_0, a_1 \in S_1,
etc. The sets S_0, S_1, ... S_{n-1} need not be the same. If
'projected_axis' equals k, then QFog will use S_k as the states of the
focus node. The transition matrix will be assigned the value \delta(b_k,
a_k), where \delta() is the Kronecker delta function, b_k is the state
of the focus node and a_k is the kth component of the state of the
parent node.
The case 'has_commas' is False is virtually identical to the True case,
except that now the states of the parent node are not tuples, and don't
have commas. Instead they are all strings of the same length. In this
case, projected axis k refers to the position k (0 based) on the string.
More information about marginalizer nodes can be found in the documents
entitled "Quantum Fog Manual", and "Quantum Fog Library Of Essays" that
are included with the legacy QFog.
Attributes
----------
has_commas : bool
projected_axis : int
potential : Potential
active_states : list[int]
clique : Clique
size : int
state_names : list[str]
children : set[BayesNode]
neighbors : set[BayesNode]
parents : set[BayesNode]
id_num : int
topo_index : int
name : str
visited : bool