---
title: wire (latest version)
description: API reference for qiskit_paulice.wire in the latest version of qiskit-addon-paulice
source: https://quantum.cloud.ibm.com/docs/en/api/qiskit-addon-paulice/qiskit-paulice-wire
---

# Wire

`qiskit_paulice.wire`

Wires: the stretches of a qubit’s timeline between consecutive gates.

### Wire

*class* `Wire(qubit, after_instruction)`

[GitHub](https://github.com/Qiskit/qiskit-paulice/tree/main/qiskit_paulice/wire.py#L21-L33)

Bases: [`NamedTuple`](https://docs.python.org/3/library/typing.html#typing.NamedTuple)

A stretch of one qubit’s timeline between two consecutive gates on that qubit.

Barriers and measurements are not gates, so they do not start or end a wire.

#### qubit

Index of the qubit.

**Type**

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

#### after\_instruction

Index into `QuantumCircuit.data` of the gate on `qubit` that the wire follows. `None` denotes the qubit’s input wire, before its first gate.

**Type**

[int](https://docs.python.org/3/builtins/functions.html#int) | None

Create new instance of Wire(qubit, after\_instruction)

#### count

`count(value, /)`

Return number of occurrences of value.

#### index

`index(value, start=0, stop=9223372036854775807, /)`

Return first index of value.

Raises ValueError if the value is not present.
