Reporting

The divi.reporting module provides logging, progress reporting, and visualization functionality for quantum program execution.

Usage

Logging is enabled automatically on import; call disable_logging() to silence it.

from divi.reporting import enable_logging, disable_logging

# Enable logging (called automatically on import)
enable_logging()

# Disable logging if needed
disable_logging()

Advanced Features

Warning

Developer-Facing Features: The progress bar and progress reporting systems are intended for advanced users and developers who need custom logging and progress reporting. Most users will not need to interact with these features directly.

make_progress_bar() creates a customized Rich progress bar designed for quantum program execution tracking, with custom columns (job name, progress bar, status, elapsed time), a conditional spinner, emoji status indicators, Jupyter adaptation, and job-polling support for service-based backends.

Divi also includes a progress reporting system for real-time feedback during long-running quantum computations. The system supports both console logging (LoggingProgressReporter) and queue-based progress updates (QueueProgressReporter) for integration with external monitoring systems.

Functions

disable_logging()

Disable all logging and progress output for the divi package.

enable_logging([level])

Enable logging for the divi package with Rich formatting.

handle_batch_message(msg, progress_bar, ...)

Process a batch-level progress message in the unified progress bar.

make_progress_bar()

Create the unified Rich Progress bar.

make_progress_display([is_jupyter])

Create a Live-wrapped progress bar covering both per-program and batch rows.

progress_disabled()

Return True if DIVI_DISABLE_PROGRESS is set to a truthy value (1, true, yes, on; case-insensitive).

queue_listener(queue, progress_bar, ...[, ...])

Drain a message queue and update the unified progress bar.

Classes

LoggingProgressReporter()

Reports progress by logging messages to the console.

ProgressReporter()

An abstract base class for reporting progress of a quantum program.

QueueProgressReporter(job_id, progress_queue)

Reports progress by putting structured dictionaries onto a Queue.

TerminalStatus()

Terminal status for a progress row; members equal their string value.

Variables

BATCH_COLORS

Built-in immutable sequence.