Skip to main content
Yanked

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.7.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.7.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.core provides stable Problem, Solver, SolveResult, registry, and QUBO/Ising transformation contracts.

  • QuboProblem, IsingProblem, TSPProblem, and ContinuousProblem decouple a problem from the selected solver.

  • Category optimizer classes execute local algorithms in the caller's Python process.

  • ascent.cim.CIMOptimizer submits 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.7.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.

One-command ant colony solver

After the SDK is installed and activated, run the built-in TSP example directly:

ascent-aco

Use a JSON or CSV distance matrix for your own problem:

ascent-aco --matrix distances.json --ants 50 --iterations 300 --start-city 0

JSON input may be a two-dimensional array or an object with a distance_matrix field. Add --json when the result will be consumed by another program.

One-command particle swarm solver

Run the default two-dimensional Sphere benchmark:

ascent-pso

Choose an included objective and tune the search space:

ascent-pso --objective rastrigin --dimensions 5 --lower -5.12 --upper 5.12 \
  --particles 50 --iterations 300

Available command-line objectives are sphere, rastrigin, and rosenbrock. Python callers pass any callable objective to ascent.combinatorial.PSOOptimizer.

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.7.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for ascent-science 0.7.0
File Size Uploaded
ascent_science-0.7.0.tar.gz 34.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for ascent-science 0.7.0
File Interpreter ABI Platform
ascent_science-0.7.0-py3-none-any.whl Python 3 none any Details

Total release size: 76.5 kB

Release files / ascent_science-0.7.0.tar.gz

Download URL ascent_science-0.7.0.tar.gz
Size 34.7 kB
Tags Source
SHA-256 checksum
How to use checksums
111e567274fbdc7502db604ffda27c89f2f6e57854ab5cd69dd7ea27795099a8
BLAKE2b-256 checksum
How to use checksums
1d8f58d78399837aa230d83e7bc91240469031666ea813de81e755e722530603
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.7.0-py3-none-any.whl

Download URL ascent_science-0.7.0-py3-none-any.whl
Size 41.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d2058f094843f9b663cbbc1c2841c498e400d5ea7e0643820fda65a1f36e9976
BLAKE2b-256 checksum
How to use checksums
9b063fcfd76da4ea1004fc24935adbc21527160142906091196bb43c0259621c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.3

Release history Release notifications | RSS feed

0.9.7

1 release file

0.9.6

2 release files

0.9.5

2 release files

0.9.3

2 release files

0.9.2

2 release files

0.9.1

2 release files

0.9.0

1 release file

0.8.0

2 release files

This release

0.7.0 This release

2 release files

0.5.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page