Skip to main content
IBM Quantum Platform

DanglerMatch

class samplomatic.pre_samplex.DanglerMatch(direction: Direction | None = None, node_types: tuple[type[PreNode], ...] | None = None, dangler_type: DanglerType | None = None)

GitHub

Bases: object

A helper class to specify conditions on danglers.

Attributes Summary

Column 1
Column 2
dangler_typeThe desired type of dangler.
directionThe desired direction of the node.
node_typesThe desired type of the node.

Methods Summary

Column 1
Column 2
match_node(node)Check if a node matches the conditions specified in the object

Attributes Documentation

dangler_type

Type: DanglerType | None

Default value: None

The desired type of dangler.

Set to None to get both required and optional danglers.

direction

Type: Direction | None

Default value: None

The desired direction of the node.

Set to None to get all node directions. Note that setting to BOTH will only match nodes with BOTH direction.

node_types

Type: tuple[type[PreNode], ...] | None

Default value: None

The desired type of the node.

Set to None to get all node types.

Methods Documentation

match_node

match_node(node: PreNode) → bool

GitHub

Check if a node matches the conditions specified in the object

Was this page helpful?
Report a bug, typo, or request content on GitHub.