Classiq SDK Package
Project description
The Classiq Quantum Algorithm Design platform helps teams build sophisticated quantum circuits that could not be designed otherwise
We do this by synthesizing high-level functional models into optimized quantum circuits, taking into account the constraints that are important to the designer. Furthermore, we are able to generate circuits for practically any universal gate-based quantum computer and are compatible with most quantum cloud providers.
Requirements
Python 3.8+
Installation
pip install --upgrade pip
$ pip install 'classiq[all]'
Example
from classiq import generator
from classiq.builtin_functions import StatePreparation, QFT
from classiq_interface.generator.state_preparation import (
PMF,
Metrics,
NonNegativeFloatRange,
)
circuit_generator = generator.Generator(qubit_count=20, max_depth=100)
probabilities = (0.5, 0.1, 0.2, 0.005, 0.015, 0.12, 0.035, 0.025)
pmf = PMF(pmf=probabilities)
sp_params = StatePreparation(
probabilities=pmf,
num_qubits=4,
error_metric={Metrics.KL: NonNegativeFloatRange(upper_bound=0.3)},
)
output_dict = circuit_generator.StatePreparation(params=sp_params)
state_preparation_output = output_dict["OUT"]
qft_params = QFT(num_qubits=3)
circuit_generator.QFT(
params=qft_params, in_wires={"IN": state_preparation_output}
)
circuit = circuit_generator.generate()
circuit.show()
License
See license.
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
classiq-0.3.0.tar.gz
(21.7 kB
view details)
Built Distribution
classiq-0.3.0-py3-none-any.whl
(28.7 kB
view details)
File details
Details for the file classiq-0.3.0.tar.gz
.
File metadata
- Download URL: classiq-0.3.0.tar.gz
- Upload date:
- Size: 21.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.11 CPython/3.8.12 Linux/5.11.0-1022-azure
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a3b6b564efef3747483a1df425303def2be7b119f3a62d42d7aae60908cda21f |
|
MD5 | 19eac6f97fdff8e833a4145fd5e1a226 |
|
BLAKE2b-256 | 6274a61cd1b9741e1fff45285961a3f9371492e74ce47c8dafd25c0fb6133ae6 |
File details
Details for the file classiq-0.3.0-py3-none-any.whl
.
File metadata
- Download URL: classiq-0.3.0-py3-none-any.whl
- Upload date:
- Size: 28.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.11 CPython/3.8.12 Linux/5.11.0-1022-azure
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9d5321a2cc98037672ae1b9c7d04aca3e8247228ba1ea1fef53bc0492753fd30 |
|
MD5 | 5ab031da1b39862160f2f7fe2f665a44 |
|
BLAKE2b-256 | 3fe111fa912a650080845cc2861c24c5fa0265e1c964a4c33ad5d2ad9c389a82 |