Integrator for Python-based quantum computing software
Project description
scikit-quant is an aggregator package to improve interoperability between quantum computing software packages. Our first focus in on classical optimizers, making the state-of-the art from the Applied Math community available in Python for use in quantum computing.
Full documentation: https://scikit-quant.readthedocs.io/
Website: http://scikit-quant.org
Installation
pip install sckit-quant
Usage
Basic example (component interfaces for standard quantum programming frameworks and for SciPy are available as well):
import numpy as np
from skquant.opt import minimize
# some interesting objective function to minimize
def objective_function(x):
fv = np.inner(x, x)
fv *= 1 + 0.1*np.sin(10*(x[0]+x[1]))
return np.random.normal(fv, 0.01)
# create a numpy array of bounds, one (low, high) for each parameter
bounds = np.array([[-1, 1], [-1, 1]], dtype=float)
# budget (number of calls, assuming 1 count per call)
budget = 40
# initial values for all parameters
x0 = np.array([0.5, 0.5])
# method can be ImFil, SnobFit, Orbit, NOMAD, or Bobyqa
result, history = \
minimize(objective_function, x0, bounds, budget, method='imfil')
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
scikit-quant-0.8.2.tar.gz
(21.0 kB
view details)
File details
Details for the file scikit-quant-0.8.2.tar.gz.
File metadata
- Download URL: scikit-quant-0.8.2.tar.gz
- Upload date:
- Size: 21.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.1 importlib_metadata/3.10.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.8.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
53bbcc4d4a4351dd3965eddd35143d4ef15518f42a6db4b6550cb836dfa3747a
|
|
| MD5 |
27b22b0a6ebe4bed31fe5ecc60cfe683
|
|
| BLAKE2b-256 |
6493269528f7f846944588d6636c71f74938873a5439ae2739a0d18138033cf0
|