---
title: PreNode (latest version)
description: API reference for samplomatic.pre_samplex.PreNode in the latest version of samplomatic
source: https://quantum.cloud.ibm.com/docs/en/api/samplomatic/auto/pre-samplex-pre-node
---

# PreNode

*class* `samplomatic.pre_samplex.PreNode(subsystems: Partition[int], direction: Direction, *, trace_info: TraceInfo | None = None)`

[GitHub](https://github.com/Qiskit/samplomatic/tree/main/samplomatic/pre_samplex/graph_data.py#L46-L66)

Bases: [`object`](https://docs.python.org/3/builtins/functions.html#object)

The node type used during samplex building, different than the type in the final samplex.

**Attributes Summary**

|                                                                                                          |                                                                     |
| -------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------- |
| [`direction`](#samplomatic.pre_samplex.PreNode.direction "samplomatic.pre_samplex.PreNode.direction")    | The direction of virtual gates that can interact with this node.    |
| [`subsystems`](#samplomatic.pre_samplex.PreNode.subsystems "samplomatic.pre_samplex.PreNode.subsystems") | The subsystems that virtual gates act on.                           |
| [`trace_info`](#samplomatic.pre_samplex.PreNode.trace_info "samplomatic.pre_samplex.PreNode.trace_info") | Debug trace information, populated when building with `debug=True`. |

**Methods Summary**

|                                                                                                         |                                                                                                                                                                  |
| ------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [`get_style`](#samplomatic.pre_samplex.PreNode.get_style "samplomatic.pre_samplex.PreNode.get_style")() | Summarizes the style of this node when plotted via [`plot_graph()`](/docs/api/samplomatic/auto/visualization-plot-graph "samplomatic.visualization.plot_graph"). |

**Attributes Documentation**

### direction

Type: [`Direction`](/docs/api/samplomatic/auto/constants-direction "samplomatic.constants.Direction")

Default value: `<dataclasses._MISSING_TYPE object>`

The direction of virtual gates that can interact with this node.

### subsystems

Type: [`Partition`](/docs/api/samplomatic/auto/partition-partition "samplomatic.partition.Partition")\[[`int`](https://docs.python.org/3/builtins/functions.html#int)]

Default value: `<dataclasses._MISSING_TYPE object>`

The subsystems that virtual gates act on.

### trace\_info

Type: `TraceInfo` | [`None`](https://docs.python.org/3/builtins/constants.html#None)

Default value: `None`

Debug trace information, populated when building with `debug=True`.

**Methods Documentation**

### get\_style

`get_style() → NodeStyle`

[GitHub](https://github.com/Qiskit/samplomatic/tree/main/samplomatic/pre_samplex/graph_data.py#L59-L66)

Summarizes the style of this node when plotted via [`plot_graph()`](/docs/api/samplomatic/auto/visualization-plot-graph "samplomatic.visualization.plot_graph").
