A comprehensive benchmarking suite for comparing quantum computing libraries including LogosQ (Rust), Yao.jl, C++, PennyLane, and Qiskit. This project provides Docker containerization, memory usage monitoring, and interactive D3.js visualizations.
- Multi-Library Support: Benchmarks LogosQ, Yao.jl, C++, PennyLane, and Qiskit
- Docker Containerization: Complete environment setup with single command
- Memory Monitoring: Real-time memory usage tracking during benchmarks
- Interactive Visualization: D3.js dashboard for analyzing results
- Comprehensive Metrics: Execution time, memory usage, circuit depth analysis
- Multiple Benchmark Types: GHZ states, random circuits, QFT implementations
- Clone the repository:
git clone https://github.com/zazabap/LogosQBenchmarks
cd LogosQBenchmarks- Build and run the complete benchmark suite:
docker-compose up --build- Access the visualization dashboard at
http://localhost:8080
- Rust (latest stable)
- Julia 1.6+
- Python 3.8+
- Node.js 16+
- C++ compiler with CMake
- Essential build tools
- Install Rust dependencies:
cd rust
cargo build --release- Install Julia dependencies:
julia -e 'using Pkg; Pkg.add(["Yao", "BenchmarkTools", "JSON", "CSV", "DataFrames"])'- Install Python dependencies:
pip install pennylane qiskit matplotlib pandas numpy psutil- Build C++ components:
cd cpp
mkdir build && cd build
cmake ..
make- Install visualization dependencies:
cd visualization
npm install- Run all benchmarks:
./run_benchmarks.sh- Run specific library benchmarks:
# LogosQ (Rust)
cd rust && cargo run --release
# Yao.jl
cd julia && julia yao_benchmark.jl
# C++
cd cpp/build && ./cpp_benchmark
# PennyLane
cd python && python pennylane_benchmark.py
# Qiskit
cd python && python qiskit_benchmark.py- Start visualization server:
cd visualization
npm startLogosQBenchmarks/
├── rust/ # LogosQ Rust implementation
│ ├── src/
│ │ ├── lib.rs # Core quantum simulation library
│ │ └── main.rs # Benchmark runner
│ └── Cargo.toml
├── julia/ # Yao.jl benchmarks
│ └── yao_benchmark.jl
├── cpp/ # C++ quantum simulator
│ ├── src/
│ │ ├── quantum_simulator.hpp
│ │ ├── quantum_simulator.cpp
│ │ └── main.cpp
│ └── CMakeLists.txt
├── python/ # Python benchmarks
│ ├── qiskit_benchmark.py
│ └── pennylane_benchmark.py
├── visualization/ # D3.js dashboard
│ ├── public/
│ │ ├── index.html
│ │ ├── dashboard.js
│ │ └── styles.css
│ ├── server.js
│ └── package.json
├── scripts/ # Utility scripts
│ └── combine_results.py
├── results/ # Benchmark outputs (created at runtime)
├── logs/ # Memory usage logs (created at runtime)
├── docker-compose.yml # Docker orchestration
├── Dockerfile # Container definition
└── run_benchmarks.sh # Main benchmark runner
Tests creation of maximally entangled states: |000...0⟩ + |111...1⟩
Evaluates performance on circuits with random single-qubit gates and CNOT gates
Benchmarks the quantum algorithm with O(n²) complexity
The D3.js dashboard provides four main views:
- Performance: Execution time comparisons with filtering options
- Memory: Memory usage analysis and scaling with qubit count
- Scalability: Performance scaling and circuit depth analysis
- Summary: Overall library comparison and rankings
- Interactive filtering by benchmark type
- Logarithmic/linear scale options
- Detailed tooltips with comprehensive metrics
- Responsive design for different screen sizes
- Real-time data loading from benchmark results
The system monitors memory usage during benchmark execution:
- Real-time tracking: Memory usage sampled every 100ms
- Per-library logs: Separate memory profiles for each library
- Visualization: Memory usage trends in the dashboard
- Analysis: Memory efficiency comparisons
Benchmark results are stored in JSON format with the following structure:
{
"library": "LibraryName",
"version": "1.0.0",
"results": [
{
"name": "GHZ-8",
"num_qubits": 8,
"num_gates": 8,
"execution_time_ms": 42.5,
"memory_usage_mb": 12.3,
"circuit_depth": 2
}
],
"total_time_ms": 1250.0
}Default configuration tests up to 14 qubits to balance thoroughness with execution time. Modify qubit_sizes arrays in benchmark scripts to adjust.
- Random Circuit Gates: 10 * num_qubits per circuit
- Memory Sampling: Every 100ms during execution
- QFT Limit: Up to 10 qubits due to complexity
- Fork the repository
- Create a feature branch:
git checkout -b feature-name - Add your improvements or new library support
- Run the benchmark suite to ensure compatibility
- Submit a pull request
To add support for a new quantum library:
- Create a new directory:
newlibrary/ - Implement benchmark scripts following the existing pattern
- Update
run_benchmarks.shto include the new library - Add library colors and configuration to
visualization/public/dashboard.js - Update documentation
- Exponential Scaling: Memory usage grows exponentially with qubit count
- Optimization Levels: C++ and Rust use high optimization (-O3, --release)
- Simulator Backends: Different libraries use different simulation backends
- Hardware Dependencies: Performance may vary significantly across different hardware
- 4GB RAM
- 2 CPU cores
- 2GB disk space
- 16GB+ RAM for larger qubit counts
- 8+ CPU cores for parallel execution
- SSD for faster I/O
MIT License - see LICENSE file for details.
If you use this benchmarking suite in your research, please cite:
@software{logosq_benchmarks,
title={LogosQ Quantum Computing Benchmarks},
author={LogosQ Team},
year={2024},
url={https://github.com/zazabap/LogosQBenchmarks}
}For issues, questions, or contributions:
- Open an issue on GitHub
- Check the documentation in each component directory
- Review the Docker logs for debugging information
Note: This benchmarking suite is designed for CPU-based quantum simulation. GPU acceleration and quantum hardware benchmarks are planned for future releases.