Skip to main content

quantrs2_device/cross_platform_benchmarking/
functions.rs

1//! Auto-generated module
2//!
3//! 🤖 Generated with [SplitRS](https://github.com/cool-japan/splitrs)
4
5use quantrs2_circuit::prelude::*;
6
7use super::types::{ComplexityLevel, CrossPlatformBenchmarkConfig, QuantumPlatform};
8
9#[cfg(test)]
10mod tests {
11    use super::*;
12    #[test]
13    fn test_cross_platform_config_default() {
14        let config = CrossPlatformBenchmarkConfig::default();
15        assert_eq!(config.target_platforms.len(), 2);
16        assert_eq!(config.complexity_levels.len(), 3);
17        assert!(config.enable_cost_analysis);
18    }
19    #[test]
20    fn test_complexity_level_creation() {
21        let complexity = ComplexityLevel {
22            name: "Test".to_string(),
23            qubit_count: 5,
24            circuit_depth: 10,
25            gate_count_range: (10, 30),
26            two_qubit_gate_ratio: 0.4,
27            description: "Test complexity level".to_string(),
28        };
29        assert_eq!(complexity.name, "Test");
30        assert_eq!(complexity.qubit_count, 5);
31        assert_eq!(complexity.two_qubit_gate_ratio, 0.4);
32    }
33    #[test]
34    fn test_platform_enum() {
35        let ibm_platform = QuantumPlatform::IBMQuantum("ibmq_qasm_simulator".to_string());
36        let aws_platform = QuantumPlatform::AWSBraket(
37            "arn:aws:braket:::device/quantum-simulator/amazon/sv1".to_string(),
38        );
39        assert_ne!(ibm_platform, aws_platform);
40    }
41}