Skip to main content

Crate bloq_utils

Crate bloq_utils 

Source
Expand description

Shared utility types for the bloq quantum compiler.

Provides foundational types used across the workspace: Pauli operators (Pauli, PauliBasis, PauliString, PhasedPauliString), basis types (Basis), spatial directions (Direction, UDirection), and block-graph colors (RGBA). qasm parses a small OpenQASM subset into engine-independent instructions.

This crate owns no quantum engine. Graph verification uses QuiZX, while compiled-circuit execution uses ticit; both stay in their owning crates.

Modules§

boolean
Reduced ordered Boolean decision diagrams shared by graph and IR guards.
graph_layout
Shared layered placement and obstacle-aware edge routing for dependency graphs.
qasm
Shared OpenQASM syntax for small Clifford+T components and Pauli feedback.

Structs§

PauliString
A dense unsigned Pauli operator over len qubits, stored as XZ bit vectors.
PhasedPauliString
A packed Hermitian PauliString with an exact phase i^k.
RGBA
An 8-bit-per-channel RGBA color.

Enums§

Basis
Pauli X or Z basis (excludes Y and identity).
Direction
One of the six signed axis directions in 3D.
DirectionParseError
Error returned when parsing a string or [IVec3] into a Direction.
Pauli
A single-qubit Pauli operator.
PauliBasis
Pauli basis: X, Y, or Z (excludes identity).
PauliError
Error returned by the fallible conversions into Pauli and Basis.
PortRole
Direction assigned to an open port.
UDirection
An unsigned axis (X, Y, or Z): a Direction with its sign dropped.