This release has been yanked by its maintainers, and will be ignored by installers, except when explicitly specified.
Consider using release 0.9.7 instead.
Reason given by maintainers: SDK 已迁移为 0.9.2 核心包加独立算法插件架构;旧版本停止推荐安装。
Ascent Science Python SDK
Ascent Science SDK 0.8.0 is installed as one complete distribution. Algorithms are organized by type and selected through Python subpackages:
python -m pip install --upgrade ascent-science==0.8.0
import ascent
aco = ascent.combinatorial.ACOOptimizer(ants=30, iterations=100)
pso = ascent.combinatorial.PSOOptimizer(particles=30, iterations=100)
exact = ascent.qubo.ExactQUBOOptimizer()
simulator = ascent.qubo.CIMSimulator()
hardware = ascent.cim.CIMOptimizer(task_name="production-qubo")
Algorithm namespaces follow the platform algorithm repository exactly:
| Repository category | SDK namespace | Currently packaged algorithms |
|---|---|---|
| 量子算法 | ascent.quantum |
— |
| 组合优化 | ascent.combinatorial |
ACOOptimizer, PSOOptimizer |
| 精确求解 | ascent.exact |
— |
| 图算法 | ascent.graph |
— |
| 前沿图优化 | ascent.frontier_graph |
— |
| 连续优化 | ascent.continuous |
— |
| 机器学习 | ascent.machine_learning |
— |
| 时间序列 | ascent.time_series |
— |
| 信号与图像 | ascent.signal_image |
— |
| 多目标优化 | ascent.multiobjective |
— |
| 运筹 OR | ascent.operations_research |
— |
| 经典科学计算 | ascent.scientific_computing |
— |
Only implemented and packaged algorithms are exposed as callable classes.
Prototype and planned entries shown in the web directory are not represented as
working SDK classes. ascent.qubo, ascent.cim, and ascent.core are
cross-category functional modules rather than repository
algorithm categories.
The SDK also separates problem models, solver capabilities, and two execution modes:
-
ascent.coreprovides stableProblem,Solver,SolveResult, registry, and QUBO/Ising transformation contracts. -
QuboProblem,IsingProblem,TSPProblem, andContinuousProblemdecouple a problem from the selected solver. -
Category optimizer classes execute local algorithms in the caller's Python process.
-
ascent.cim.CIMOptimizersubmits QUBO/Ising matrices to an explicitly configured real CIM gateway, polls task state, downloads the result, and caches successful results locally.
The hardware client never falls back to a simulator. Without ASCENT_CIM_ENDPOINT, construction raises ConfigurationError.
Local execution
import ascent
optimizer = ascent.qubo.ExactQUBOOptimizer()
result = optimizer.solve_qubo([[-2.0, 0.0], [0.0, -1.0]])
print(result.best_solution, result.best_value)
Named QUBO models and hardware-oriented precision reduction are available without another package:
from ascent import QuboBuilder, reduce_precision
builder = QuboBuilder()
builder.binary("x")
builder.binary("y")
problem = builder.add_linear_equality({"x": 1, "y": 1}, 1, penalty=5).build()
prepared = reduce_precision(problem.matrix, maximum_absolute=1.0, decimal_places=6)
The wheel is pure Python and universal across supported operating systems. Install the single
ascent_science-0.8.0-py3-none-any.whl artifact; platform-specific wheel tags are not used.
After first activation, local solvers validate the cached license offline by default. Set
ASCENT_LICENSE_VALIDATION=online when each solver construction must check revocation online.
Ant colony optimizer
Create the concrete optimizer from its algorithm category, then pass a distance matrix to
solve_tsp:
import ascent
distance_matrix = [
[0, 2, 9, 10],
[2, 0, 6, 4],
[9, 6, 0, 8],
[10, 4, 8, 0],
]
solver = ascent.combinatorial.ACOOptimizer(ants=30, iterations=100, seed=42)
result = solver.solve_tsp(distance_matrix, start_city=0)
print(result.best_route, result.best_distance)
Particle swarm optimizer
Pass any callable objective and one (lower, upper) pair for each dimension:
import ascent
def sphere(position):
return sum(value * value for value in position)
solver = ascent.combinatorial.PSOOptimizer(particles=30, iterations=100, seed=42)
result = solver.solve(sphere, bounds=[(-5.0, 5.0), (-5.0, 5.0)])
print(result.best_position, result.best_value)
CIM hardware execution
from ascent.cim import CIMOptimizer
optimizer = CIMOptimizer(
task_name="production-qubo",
endpoint="https://your-real-cim-gateway.example/v1",
)
task = optimizer.solve_qubo([[-2.0, 0.0], [0.0, -1.0]])
result = task.wait(timeout=600)
print(result.best_solution, result.best_value, result.cached)
Set ASCENT_CIM_ENDPOINT instead of passing endpoint in application code. The configured service must implement POST /tasks, GET /tasks/{id}, POST /tasks/{id}/cancel, and GET /tasks/{id}/logs.
First-use SDK activation stores an owner-only license at ~/.ascent/license.json. Hardware results are cached under ~/.ascent/cim-cache unless caching is disabled.
Metadata
Release files for ascent-science 0.8.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-0.8.0.tar.gz | 32.2 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| ascent_science-0.8.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 71.3 kB
Release files / ascent_science-0.8.0.tar.gz
| Download URL | ascent_science-0.8.0.tar.gz |
|---|---|
| Size | 32.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
05a4db72ab108477e24d4ae28bba8f8ace927ec6b35f10667d1b1c166e7d82d6
|
|
BLAKE2b-256 checksum How to use checksums |
b64301b11ebd83c7aacf52498726018c7e17044a6a0052f63c46274d3851080d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.3
|
Release files / ascent_science-0.8.0-py3-none-any.whl
| Download URL | ascent_science-0.8.0-py3-none-any.whl |
|---|---|
| Size | 39.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
f52e2c43953717235c4217f7569bf932a00514192a3aff65fe341fec8c08dd6a
|
|
BLAKE2b-256 checksum How to use checksums |
ac23b8f874303ef40b211a3d861844764903a624082464044ce917fea46bec2d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.3
|