Python client for Kipu platform
Project description
Kipu Python Client
The aim of this repository is to host the Python client that will enable customers to interact without platform and the solvers it contains:
- DCQO
- DCQC (direct and variational)
Those will be indirectly used as the focus of the library will be to ease the usage by requesting the minimum amount of information required and automate all decisions made in order to achieve user goals (precision, execution time or cost among others).
Authentication
In order to access the platform users will need to log in to it.
import os
from kipu import Client
client = Client(api_key=os.environ["API_KEY"])
This way the communication with the backend will be granted by the use of the API key.
Ising model
the most basic function on the client is the composition of a circuit solving an Ising type of model
$$
H = \sum_i^N h_i\sigma_i^z + \sum_i^N \sum_{j>i}^N J_{ij}\sigma_i^z\sigma_j^z.
$$
By providing the $h$ and $J$ coefficients one can ask the library to compose the corresponding circuit to be executed on a gate-based quantum device.
h = [0.0, ...]
J = {
"0-1" : 0.01,...
}
qasm_text = client.compose_circuit(h, J)
That way one would retrieve the QASM code of the circuit.
Optimization
Basically, each enabled case translates the problem to be solved to an Ising Hamiltonian whose ground state is solved by the corresponding endpoint. For FEATURE SELECTION for example, given a dataset we will select which one is the target column and the number of assets we would like to select (maximum number).
target_columns = "target"
max_features = 6
client.feature_selection(df, target_columns, max_features)
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
Built Distribution
File details
Details for the file kipu_client-0.0.3.tar.gz
.
File metadata
- Download URL: kipu_client-0.0.3.tar.gz
- Upload date:
- Size: 5.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: pdm/2.12.3 CPython/3.11.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d1cb79995e8c17a1a93f29fb41345134d48c91a1f1c231abbfce87088be91cd3 |
|
MD5 | 9e47e40c9c0d19d415c077afa17349e9 |
|
BLAKE2b-256 | 93efaf5ccbd76d9ebcc05fef6e1acd309686e42907138a32e373e5b66dd58062 |
File details
Details for the file kipu_client-0.0.3-py3-none-any.whl
.
File metadata
- Download URL: kipu_client-0.0.3-py3-none-any.whl
- Upload date:
- Size: 7.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: pdm/2.12.3 CPython/3.11.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3d289b23123335de371141ade8e89d08b04484ebfc3d4b43882a9a3a8f2c3a42 |
|
MD5 | 96f9dbc1a9c7c74f189b54a62f8d3fb2 |
|
BLAKE2b-256 | e5f2fd3d1313e5e18e74b7a282e303261bf5fa1d43998a05160c16a4138bf07e |