The gate_tree dictionary keys are described below:

Gate Tree Dictionary Key

Type

Domain

Description

gate_type

str

‘bern’

The type of gate.

hard_gate

bool

true / false

Whether the gate is hard_gate or not.

nodes

list of dict

See Description

List of node dictionaries.

edges

list of dict

See Description

List of edge dictionaries.

The keys of each node dictionary in nodes are described below:

Node Dictionary Key

Type

Domain

Description

node_id

int

[0, inf)

The node ID.

node_type

str

{‘gate’, ‘component’}

The node type.

gate_func

dict

See Description

The gate_func dictionary contains the gate function parameters for the Bernoulli gate. Specifiable if node_type is “gate”.

comp_id

int

[0, inf)

The component ID. Specifiable if node_type is “component”.

The keys of each edge dictionary in edges are described below:

Edge Dictionary Key

Type

Domain

Description

source

int

[0, inf)

The node_id of the source node.

target

int

[0, inf)

The node_id of the target node.

is_left

bool

true / false

Whether the target node is the left-child of the source.

The keys of the gate_func dictionary are described below:

Gate Function Dictionary Key

Type

Domain

Description

attr_name

str

See Description

The attribute name.

aid

str

See Description

The attribute ID.

threshold

float

(-inf, inf)

Threshold value of the Bernoulli-gating function.

prob_left_smaller_than_threshold

float

[0.0, 1.0]

Probability that the value of left-child node is smaller than the threshold.