tqec.circuit.qubit#

Defines GridQubit and helper functions to manage qubits.

This module defines a central class to represent a qubit placed on a 2-dimensional grid, GridQubit, and a few functions to extract qubit-related information from stim.Circuit instances.

Functions

count_qubit_accesses(circuit)

Count the number of times a given qubit is used by an instruction that is not an annotation.

get_used_qubit_indices(circuit)

Returns the indices of qubits that are used by at least one non- annotation instruction.

Classes

GridQubit(x, y)

Represent a qubit placed on a 2-dimensional grid.