Quantrs-Tytan
Quantrs-Tytan is a high-level quantum annealing library for the Quantrs framework, inspired by the Python Tytan library. It provides easy-to-use interfaces for formulating and solving quantum annealing problems, with support for multiple backend solvers.
Features
- Symbolic Problem Construction: Define QUBO problems using symbolic expressions
- Higher-Order Binary Optimization (HOBO): Support for terms beyond quadratic (3rd order and higher)
- Multiple Samplers: Choose from various solvers including:
- Simulated Annealing
- Genetic Algorithm
- GPU-accelerated Annealing
- External quantum annealing hardware (via D-Wave)
- Auto Result Processing: Automatically convert solutions to multi-dimensional arrays
- SciRS2 Integration: Optional high-performance scientific computing via SciRS2:
- Optimized matrix operations with scirs2-linalg
- Advanced numerical routines with scirs2-core
- Specialized optimization algorithms with scirs2-optimize
- Solution clustering analysis (disabled due to dependency conflicts)
Installation
Add to your Cargo.toml:
[]
= { = "https://github.com/cool-japan/quantrs", = "0.1.0" }
Examples
Example with symbolic math (requires 'dwave' feature)
// This example requires the 'dwave' feature
Example without symbolic math
use ;
use HashMap;
use Array;
Features
parallel: Enable multi-threading for samplers (default)gpu: Enable GPU-accelerated samplersdwave: Enable symbolic math and D-Wave connectivity (requires SymEngine)scirs: Enable high-performance computing with SciRS2 librariesadvanced_optimization: Enable advanced optimization algorithms from SciRS2gpu_accelerated: Full GPU-acceleration with SciRS2 GPU primitivesclustering: Enable basic solution clustering and analysis toolsplotters: Enable visualization of energy distributions and other plots
Integration with Existing Quantrs Modules
Quantrs-Tytan is built on top of the core Quantrs annealing stack, extending it with higher-level interfaces. It's compatible with all existing Quantrs projects and can be used alongside other components.
Building with SymEngine (for the dwave feature)
To build with SymEngine support on macOS:
-
Install the required libraries:
-
Set the required environment variables:
-
Build with the
dwavefeature:
For more detailed instructions, see the TODO.md file in the main project directory.
License
This project is licensed under either:
- Apache License, Version 2.0, (LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0)
- MIT license (LICENSE-MIT or http://opensource.org/licenses/MIT)
at your option.