Skip to main content

cqlib_core/visualization/result/
mod.rs

1// This code is part of Cqlib.
2//
3// (C) Copyright China Telecom Quantum Group 2026
4//
5// This code is licensed under the Apache License, Version 2.0. You may
6// obtain a copy of this license in the LICENSE.txt file in the root directory
7// of this source tree or at http://www.apache.org/licenses/LICENSE-2.0.
8//
9// Any modifications or derivative works of this code must retain this
10// copyright notice, and modified files need to carry a notice indicating
11// that they have been altered from the originals.
12
13//! SVG-first result/statistics visualization.
14//!
15//! This module provides histogram and probability-distribution plots for measurement
16//! outcomes and other count-based statistics.
17//!
18//! # Module Structure
19//!
20//! - [`ResultPlotOptions`]: sorting, coloring, and layout options
21//! - [`plot_histogram`]: render an [`crate::device::ExecutionResult`] as raw measured counts
22//! - [`plot_distribution`]: render an [`crate::device::ExecutionResult`] as normalized probabilities
23
24mod data;
25mod options;
26mod plot;
27
28pub use data::{plot_distribution, plot_histogram};
29pub use options::ResultPlotOptions;
30pub use plot::render_result_plot_to_file;
31
32#[cfg(test)]
33#[path = "data_test.rs"]
34mod data_test;
35
36#[cfg(test)]
37#[path = "options_test.rs"]
38mod options_test;
39
40#[cfg(test)]
41#[path = "plot_test.rs"]
42mod plot_test;