This release is a pre-release and may not be stable for production use.
VeloxQ SDK: README
This project provides a configurable Python API to interact with the VeloxQ platform, designed to provide users with a powerful, robust and user-friendly interface to upload and solve complex optimization problems using an extensive list of physics-inspired and metaheuristic algorithms.
Find additional guides on configuration, jobs, solvers and result files in the VeloxQ SDK Wiki.
Installation & Setup
Install the VeloxQ API client as part of your Python environment. Ensure you have Python 3.9+:
pip install git+https://github.com/quantumz-io/veloxq_sdk.git
NOTE: It is recomended to install this package in a dedicated python environment to prevent any dependency problems.
Quickstart
Before executing any code from the API make sure that you have a proper API key configured. The easiest way to load the api key is using the environment variables:
export VELOX_TOKEN="12345678-90ab-cdef-1234-567890abcdef"
Then to solve your problem, the simplest approach is using solver.sample(...), which:
- Creates a
File(see below) for your problem instance (biases and couplings defined as lists, NumPy arrays, dictionaries, file paths, etc.). - Automatically submits a job to the VeloxQ platform.
- Waits until completion.
- Returns the job result.
It accepts the same argument types as File.from_instance.
Examples:
Submitting biases and couplings defined in memory:
-
Using lists:
from veloxq_sdk import VeloxQSolver solver = VeloxQSolver() biases = [1, -1, 0] couplings = [ [0, -1, 0], [-1, 0, -1], [0, -1, 0] ] result = solver.sample(biases, couplings) # Returns VeloxSampleSet object print(result)
-
Using NumPy arrays:
import numpy as np from veloxq_sdk import VeloxQSolver solver = VeloxQSolver() biases = np.array([1, -1, 0]) couplings = np.array([ [0, -1, 0], [-1, 0, -1], [0, -1, 0] ]) result = solver.sample(biases, couplings) print(result.first) # get lowest energy/state
-
Using dictionaries (sparse data):
from veloxq_sdk import VeloxQSolver solver = VeloxQSolver() biases = {0: 1.0, 2: -1.0} couplings = {(0, 1): -1.0, (1, 2): 0.5} result = solver.sample(biases=biases, couplings=couplings) print(result.energy) # print energies
-
Using
dimod.BinaryQuadraticModelimport dimod from veloxq_sdk import VeloxQSolver bqm = dimod.BinaryQuadraticModel({0: 1.0, 2: -1.0}, {(0, 1): -1.0, (1, 2): 0.5}, 0, dimod.SPIN) solver = VeloxQSolver() result = solver.sample(bqm) print(result.sample) # print all found states
Submitting a problem defined in a file:
from veloxq_sdk import VeloxQSolver
solver = VeloxQSolver()
result = solver.sample("ising_model.h5")
print(result)
Submitting an instance in dictionary format:
from veloxq_sdk import VeloxQSolver
solver = VeloxQSolver()
instance_data = {
"biases": [1, -1],
"couplings": [[0, -1], [-1, 0]]
}
result = solver.sample(instance_data)
print(result)
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file veloxq_sdk-1.0.0rc1.tar.gz.
File metadata
- Download URL: veloxq_sdk-1.0.0rc1.tar.gz
- Upload date:
- Size: 61.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
40a44f31276f10eb56b009fd94dac0a7bc6788572d8fe9311c2abe4fc75f3719
|
|
| MD5 |
f28ca17940e0786cad5761421849dc35
|
|
| BLAKE2b-256 |
afea69d474ee3a5eae650e2eb3fb339a3b8db36ab2e6810b9d5c627d4b7a0412
|
Provenance
The following attestation bundles were made for veloxq_sdk-1.0.0rc1.tar.gz:
Publisher:
publish-pypi.yml on quantumz-io/veloxq_sdk
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
veloxq_sdk-1.0.0rc1.tar.gz -
Subject digest:
40a44f31276f10eb56b009fd94dac0a7bc6788572d8fe9311c2abe4fc75f3719 - Sigstore transparency entry: 2880232518
- Sigstore integration time:
-
Permalink:
quantumz-io/veloxq_sdk@5da2dfdbd88764ac91f779eaeb605b8a3b1cba1b -
Branch / Tag:
refs/tags/v1.0.0-rc.1 - Owner: https://github.com/quantumz-io
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-pypi.yml@5da2dfdbd88764ac91f779eaeb605b8a3b1cba1b -
Trigger Event:
push
-
Statement type:
File details
Details for the file veloxq_sdk-1.0.0rc1-py3-none-any.whl.
File metadata
- Download URL: veloxq_sdk-1.0.0rc1-py3-none-any.whl
- Upload date:
- Size: 39.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c26b8c26be5fb1b8e6d8d8151edf91e0d1370c73ba86471d39906eef9aa958e6
|
|
| MD5 |
3dd8906aa7bb47d92861ddd56c695159
|
|
| BLAKE2b-256 |
478d5b28df19e53a5d748d28b8e0bd0381e4251b4846c288c01428ad978f91b9
|
Provenance
The following attestation bundles were made for veloxq_sdk-1.0.0rc1-py3-none-any.whl:
Publisher:
publish-pypi.yml on quantumz-io/veloxq_sdk
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
veloxq_sdk-1.0.0rc1-py3-none-any.whl -
Subject digest:
c26b8c26be5fb1b8e6d8d8151edf91e0d1370c73ba86471d39906eef9aa958e6 - Sigstore transparency entry: 2880232612
- Sigstore integration time:
-
Permalink:
quantumz-io/veloxq_sdk@5da2dfdbd88764ac91f779eaeb605b8a3b1cba1b -
Branch / Tag:
refs/tags/v1.0.0-rc.1 - Owner: https://github.com/quantumz-io
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-pypi.yml@5da2dfdbd88764ac91f779eaeb605b8a3b1cba1b -
Trigger Event:
push
-
Statement type: