Skip to main content
IBM Quantum Platform
Informations sur la traduction

D'autres traductions de cette page seront bientôt disponibles.

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

Chronique « 1 »
Chronique « 2 »
dangler_typeThe desired type of dangler.
directionThe desired direction of the node.
node_typesThe desired type of the node.

Methods Summary

Chronique « 1 »
Chronique « 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

Cette page a-t-elle été utile ?
Signaler un bogue, une coquille ou proposer du contenu sur GitHub.