---
title: find_unreachable_nodes (latest version)
description: API reference for samplomatic.graph_utils.find_unreachable_nodes in the latest version of samplomatic
source: https://quantum.cloud.ibm.com/docs/en/api/samplomatic/auto/graph-utils-find-unreachable-nodes
---

# find\_unreachable\_nodes

`samplomatic.graph_utils.find_unreachable_nodes(graph: PyDiGraph, start_idxs: Sequence[int]) → set[int]`

[GitHub](https://github.com/Qiskit/samplomatic/tree/main/samplomatic/graph_utils/find_unreachable_nodes.py#L22-L39)

Find all nodes from the graph that are not reachable from the start nodes.

**Parameters**

- **graph** – The graph to search.
- **start\_idxs** – The node indices to start from.

**Returns**

A set of the unreachable node indices.
