Recent Releases of simulated-bifurcation
simulated-bifurcation - v2.0.0
Simulated Bifurcation v2.0.0
⚠️ From this version onwards, the package is maintained only for versions of Python >= 3.9
What's Changed
🚀 Features
- Quadratic models can be created from SymPy
Polys for a more mathematical and intuitive experience
```python from sympy import poly, symbols import simulated_bifurcation as sb
x, y = symbols("x y") sb.minimize(poly(3 * x**2 - 5 * x * y + 3 * y + 2), domain="spin") ```
- Optimization variables can now be defined on different domains
```python from sympy import poly, symbols import simulated_bifurcation as sb
x, y = symbols("x y") sb.minimize(poly(3 * x**2 - 5 * x * y + 3 * y + 2), domain=["spin", "int2"]) # x is in {-1, 1}, y is in {0, 1, 2, 3} ```
Quadratic models can still be defined from tensors or arrays, in any order
- Computations can be stopped using a keyboad interruption
- Clearer parameters names
| Previous name | Previous values | New name | New values |
| - | - | - | - |
| ballistic | True or False | mode | "ballistic" or "discrete" |
| use_window | True or False | early_stopping | True or False |
- Models' dtype and computation dtype are now the same and can only be
torch.float32ortorch.float64 sb.optimizehas been removed, users shall now rely onsb.maximizeandsb.minimizeonly- GPU tests now cover the package
🐞 Bug fixes
- Initial energy tensor device the same as device defined in class
- CUDA computations are now only allowed with float32 or float64 values
New Contributors
- @Ali-Xoerex made their first contribution in https://github.com/bqth29/simulated-bifurcation-algorithm/pull/74
Full Changelog: https://github.com/bqth29/simulated-bifurcation-algorithm/compare/release-1.2.1...v2.0.0
- Python
Published by bqth29 about 1 year ago
simulated-bifurcation - 1.2.1
simulated-bifurcation version 1.2.1 Release Notes
🚀 What's New
- New Stop Criterion: Control SB's runtime with the optimizer's new timeout feature. Specify the optimization
timeout in seconds using
timeoutparameter in the optimization functions (optimize,maximize, andminimize). - Optimization Models Pool Extension: The Integer Weights Knapsack problem and the Optimal Trading Trajectory Problem (sequential Markowitz model) have joined the catalog of available models.
- Model Device and Dtype Flexibility: Move your models to another dtype or device without having to individually
modify each tensor that makes it up, using the polynomial's
tomethod.
🐞 Bug fixes
- The optimizer's stop window now works energy-wise instead of spin-wise to speed up convergence if the states are degenerate.
- Fixed the selection of the best agent when the optimization direction is maximization to select an agent with a maximal energy (previously an agent with minimal energy was returned).
- Typing error in Python 3.8: The occurrences of the typing annotation
listhave been replaced bytyping.Listfor Python 3.8 compatibility purposes.
🔔 Deprecation warnings
- The parameter
input_typehas been deprecated inoptimize,maximize, andminimize; it will be removed in version 1.3.0. It is replaced by thedomainparameter. - The classes
SpinQuadraticPolynomial,BinaryQuadraticPolynomialandIntegerQuadraticPolynomialhave been deprecated. From version 1.3.0 onwards, polynomials will no longer have a definition domain. The domain only needs to be specified when creating an Ising model, and conversely when converting spins back into the original domain.
➡️ Looking forward to version 1.3.0
- Mathematical Definition of Polynomials: Discover a more natural way of defining polynomial instances using the
polynomial's
from_expressionmethod. This method generates native SB polynomials (tensors of coefficients) fromSympyexpressions, making them easier to read and understand, especially for small dimensions.
🚧 Known issues
- A
MemoryErroris raised when creating an integer polynomial if the number of bits is large (~30 bits). Unfortunately, there are no good fixes on the user side for this at the moment. The issue will be addressed in version 1.3.0. The cause of this bug is the creation of a tensor containing all allowed values (2^n where n is the number of bits). See this issue.
- Python
Published by BusyBeaver-42 over 2 years ago
simulated-bifurcation - 1.2.0
simulated-bifurcation version 1.2.0 Release Notes
What's New
- Optimization Enhancement: Experience a 2x speed boost in the optimizer.
- Algorithm Invocation Improvement: Enjoy a more user-friendly interaction with the Simulated Bifurcation algorithm through the new
minimizeandmaximizestatic functions. - General Polynomial API: Introducing a versatile polynomial API designed to construct and solve second-order multivariate polynomial problems using SB. This accommodates various variable types, including spin, binary, integer variables, and user-defined variable types.
- Implementation of several usual NP-hard optimization problems: the
modelsmodule brings together interfaces for several NP-hard optimization problems (e.g., QUBO, Ising, number partitioning). - Constants from physical theories have been transformed into optimization environment variables.
- Code Standardization: The codebase has undergone standardization using Black and isort code formatters, enhancing code consistency and readability.
- Python
Published by bqth29 almost 3 years ago
simulated-bifurcation - PyPI
The project has been added to PyPI. You can now download the Simulated Bifurcation algorithm for Python using
pip install simulated-bifurcation
- Python
Published by bqth29 about 3 years ago