Skip to main content

Module bit

Module bit 

Source
Expand description

§Qubit Module

This module defines the fundamental addressing units for quantum circuits.

§Architecture Design

This library adopts a Handle Pattern (also known as Entity-Component style) for qubit management:

  • Qubit acts as a lightweight, Copy-able logical identifier. It does not hold state or topological information itself.
  • State and connectivity are managed by the parent Circuit or DAG.

This design ensures strictly $O(1)$ cloning costs and cache-friendly memory layouts during complex compilation passes.

Structs§

Qubit
A lightweight logical qubit identifier.

Enums§

QubitError
Errors returned when converting an integer into a Qubit.