Ascent Science SQA plugin
This package implements simulated quantum annealing (SQA) with the standard Suzuki--Trotter path-integral mapping and single-spin Metropolis updates. It is a classical simulation of a transverse-field Ising model; it does not use a quantum processor.
For development from this repository, install the core SDK and plugin in editable mode:
python -m pip install -e ./sdk-python -e ./sdk-plugins/sqa
After the 0.1.0 package is published, it can instead be installed with
python -m pip install ascent-science-sqa==0.1.0.
import ascent
solver = ascent.quantum.SimulatedQuantumAnnealing(
trotter_slices=32,
sweeps=500,
beta=5.0,
gamma_start=5.0,
gamma_end=0.01,
seed=42,
)
# Minimize x.T Q x for x in {0, 1}^n.
result = solver.solve_qubo([
[-2.0, 1.0],
[1.0, -2.0],
])
print(result.best_solution, result.best_value)
For an Ising model, solve_ising(J, fields=h) minimizes
s.T @ J @ s + h.T @ s + offset, with spins in {-1, +1}. For a canonical
problem object use solver.solve(QuboProblem(...)) or
solver.solve(IsingProblem(...)).
SQA is stochastic and does not prove optimality. Results therefore have status
FEASIBLE (or TIME_LIMIT if a supplied SolveOptions limit is reached).
Build a release
Use the same release flow as the ACO plugin:
sh scripts/build-release.sh
The wheel, source archive, and SHA256SUMS are written to dist/. If the
default Python does not provide a recent setuptools/build installation, select
another interpreter with ASCENT_SQA_BUILD_PYTHON=/path/to/python.
Metadata
Release files for ascent-science-sqa 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| ascent_science_sqa-0.1.0.tar.gz | 5.5 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| ascent_science_sqa-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 11.3 kB
Release files / ascent_science_sqa-0.1.0.tar.gz
| Download URL | ascent_science_sqa-0.1.0.tar.gz |
|---|---|
| Size | 5.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
53d30f1cfc5cdcaed722a1500d4aa59dbedff2dbe44fb425be1ce84f42b61ca1
|
|
BLAKE2b-256 checksum How to use checksums |
4e0add753b3995d4a820ecb6c209957e45ee30575265ce231073c4716e6721e9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.13
|
Release files / ascent_science_sqa-0.1.0-py3-none-any.whl
| Download URL | ascent_science_sqa-0.1.0-py3-none-any.whl |
|---|---|
| Size | 5.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
e29769853d4eae87cef74cc44a2366e6513ce5ffa84988f1d7396004c942f95f
|
|
BLAKE2b-256 checksum How to use checksums |
20a7f8ed2d9d9c6b55963cff98474c36ba0b56a6f556d0b5e1567317d5abb66a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.13
|