Classiq SDK Package
Reason this release was yanked:
Invalid Python requirements
Project description
Classiq enables the development of quantum circuits and algorithms that could not be created 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 classiq
Example
import asyncio
from classiq.generator import Generator
from classiq.analyzer import Analyzer
from classiq_interface.generator.state_preparation import (
StatePreparation,
PMF,
StatePreparationOutputs,
)
from classiq_interface.generator.qft import QftInputs, QFT
from classiq_interface.generator.preferences.optimization import (
Optimization,
OptimizationType,
)
circuit_generator = Generator(qubit_count=8, max_depth=20)
opt = Optimization(optimization_type=OptimizationType.DEPTH, approximation_error=0.05)
circuit_generator.constraints.optimization = opt
probabilities = (0.125, 0.125, 0.125, 0.125, 0.125, 0.125, 0.125, 0.125)
pmf = PMF(pmf=probabilities)
sp_params = StatePreparation(probabilities=pmf, num_qubits=5)
sp_out_wires = circuit_generator.StatePreparation(params=sp_params)
out_wire_enum = StatePreparationOutputs.OUT
in_wire_enum = QftInputs.IN
wire = sp_out_wires[out_wire_enum]
qft_params = QFT(num_qubits=5)
circuit_generator.QFT(params=qft_params, in_wires={in_wire_enum: wire})
circuit = asyncio.run(circuit_generator.generate())
circuit_analyzer = Analyzer(circuit=circuit)
analysis_result = asyncio.run(circuit_analyzer.analyze())
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.1.0.tar.gz
(11.0 kB
view details)
Built Distribution
classiq-0.1.0-py3-none-any.whl
(14.2 kB
view details)
File details
Details for the file classiq-0.1.0.tar.gz
.
File metadata
- Download URL: classiq-0.1.0.tar.gz
- Upload date:
- Size: 11.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.7 CPython/3.8.5 Darwin/20.3.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | abd3382409e44e0c814e816642098ee3786c7158f56190e9dd13b85ca2e6bcff |
|
MD5 | 6f02c03b82448925efc889af51e1fd57 |
|
BLAKE2b-256 | 2558744f168d040a979741707cec22f005dfb713ea233cd15175cf41ba911309 |
File details
Details for the file classiq-0.1.0-py3-none-any.whl
.
File metadata
- Download URL: classiq-0.1.0-py3-none-any.whl
- Upload date:
- Size: 14.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.7 CPython/3.8.5 Darwin/20.3.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3ee19ba8e474bddba7a0e7c2d02fedd29c708b35d7827c248dc6eaf4d02c9e9e |
|
MD5 | 6303733020d58fbfa14efdd4b69db94f |
|
BLAKE2b-256 | d73a740d22a14c286686b92974a5db088e02abb211ca5d1c47205a886ab6933c |