use super::hardware::HardwareSpec;
use super::passes::{ExportFormat, PerformanceConstraints, TranspilationPass};
use serde::{Deserialize, Serialize};
#[derive(Debug, Clone, Copy, PartialEq, Eq, Serialize, Deserialize)]
pub enum OptimizationLevel {
None,
Light,
Medium,
Aggressive,
Custom,
}
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct EnhancedTranspilerConfig {
pub hardware_spec: HardwareSpec,
pub enable_ml_routing: bool,
pub enable_hw_decomposition: bool,
pub enable_performance_prediction: bool,
pub enable_error_mitigation: bool,
pub enable_cross_platform: bool,
pub enable_visual_output: bool,
pub optimization_level: OptimizationLevel,
pub custom_passes: Vec<TranspilationPass>,
pub performance_constraints: PerformanceConstraints,
pub export_formats: Vec<ExportFormat>,
}
impl Default for EnhancedTranspilerConfig {
fn default() -> Self {
Self {
hardware_spec: HardwareSpec::default(),
enable_ml_routing: true,
enable_hw_decomposition: true,
enable_performance_prediction: true,
enable_error_mitigation: true,
enable_cross_platform: true,
enable_visual_output: true,
optimization_level: OptimizationLevel::Aggressive,
custom_passes: Vec::new(),
performance_constraints: PerformanceConstraints::default(),
export_formats: vec![
ExportFormat::QASM3,
ExportFormat::OpenQASM,
ExportFormat::Cirq,
],
}
}
}