quantrs2_tytan/testing_framework/
config.rs1use serde::{Deserialize, Serialize};
7use std::collections::HashMap;
8use std::time::Duration;
9
10#[derive(Debug, Clone, Serialize, Deserialize)]
12pub struct TestConfig {
13 pub seed: Option<u64>,
15 pub cases_per_category: usize,
17 pub problem_sizes: Vec<usize>,
19 pub samplers: Vec<SamplerConfig>,
21 pub timeout: Duration,
23 pub validation: ValidationConfig,
25 pub output: OutputConfig,
27}
28
29#[derive(Debug, Clone, Serialize, Deserialize)]
31pub struct SamplerConfig {
32 pub name: String,
34 pub num_samples: usize,
36 pub parameters: HashMap<String, f64>,
38}
39
40#[derive(Debug, Clone, Serialize, Deserialize)]
42pub struct ValidationConfig {
43 pub check_constraints: bool,
45 pub check_objective: bool,
47 pub statistical_tests: bool,
49 pub tolerance: f64,
51 pub min_quality: f64,
53}
54
55#[derive(Debug, Clone, Serialize, Deserialize)]
57pub struct OutputConfig {
58 pub generate_report: bool,
60 pub format: ReportFormat,
62 pub output_dir: String,
64 pub verbosity: VerbosityLevel,
66}
67
68#[derive(Debug, Clone, Serialize, Deserialize)]
70pub enum ReportFormat {
71 Text,
73 Json,
75 Html,
77 Markdown,
79 Csv,
81}
82
83#[derive(Debug, Clone, Serialize, Deserialize)]
85pub enum VerbosityLevel {
86 Error,
88 Warning,
90 Info,
92 Debug,
94}