Skip to main content
Pre-release

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:

  1. Creates a File (see below) for your problem instance (biases and couplings defined as lists, NumPy arrays, dictionaries, file paths, etc.).
  2. Automatically submits a job to the VeloxQ platform.
  3. Waits until completion.
  4. 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.BinaryQuadraticModel

    import 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

veloxq_sdk-1.0.0rc1.tar.gz (61.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

veloxq_sdk-1.0.0rc1-py3-none-any.whl (39.7 kB view details)

Uploaded Python 3

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

Hashes for veloxq_sdk-1.0.0rc1.tar.gz
Algorithm Hash digest
SHA256 40a44f31276f10eb56b009fd94dac0a7bc6788572d8fe9311c2abe4fc75f3719
MD5 f28ca17940e0786cad5761421849dc35
BLAKE2b-256 afea69d474ee3a5eae650e2eb3fb339a3b8db36ab2e6810b9d5c627d4b7a0412

See more details on using hashes here.

Provenance

The following attestation bundles were made for veloxq_sdk-1.0.0rc1.tar.gz:

Publisher: publish-pypi.yml on quantumz-io/veloxq_sdk

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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

Hashes for veloxq_sdk-1.0.0rc1-py3-none-any.whl
Algorithm Hash digest
SHA256 c26b8c26be5fb1b8e6d8d8151edf91e0d1370c73ba86471d39906eef9aa958e6
MD5 3dd8906aa7bb47d92861ddd56c695159
BLAKE2b-256 478d5b28df19e53a5d748d28b8e0bd0381e4251b4846c288c01428ad978f91b9

See more details on using hashes here.

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

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

This release

1.0.0rc1 This release

2 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