Skip to main content

Classiq SDK Package

Reason this release was yanked:

Invalid Python requirements

Project description

Classiq

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

import asyncio

from classiq import generator
from classiq_interface.generator.state_preparation import (
    StatePreparation,
    PMF,
    StatePreparationOutputs,
    Metrics,
    NonNegativeFloatRange,
)
from classiq_interface.generator.qft import QftInputs, QFT

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)},
)

circuit_generator = generator.Generator(qubit_count=20, max_depth=100)
output_dict = circuit_generator.StatePreparation(params=sp_params)

state_preparation_output = output_dict[StatePreparationOutputs.OUT]

qft_params = QFT(num_qubits=3)
circuit_generator.QFT(
    params=qft_params, in_wires={QftInputs.IN: state_preparation_output}
)

circuit_generator.constraints.use_synthesis_engine = True
circuit = asyncio.run(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.1.5.tar.gz (12.9 kB view details)

Uploaded Source

Built Distribution

classiq-0.1.5-py3-none-any.whl (17.4 kB view details)

Uploaded Python 3

File details

Details for the file classiq-0.1.5.tar.gz.

File metadata

  • Download URL: classiq-0.1.5.tar.gz
  • Upload date:
  • Size: 12.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.8 CPython/3.8.11 Linux/5.8.0-1041-azure

File hashes

Hashes for classiq-0.1.5.tar.gz
Algorithm Hash digest
SHA256 6e57297a70cc8986de55e20aee6ba8d4ba77aa13283a62c1ba2d816c67529286
MD5 5666c0fde010b9d4bedb479ec36136a2
BLAKE2b-256 284b5b3847fe7c32b8e93cb67ee9eb036cc90940a55cea49b52ade826e081f0e

See more details on using hashes here.

File details

Details for the file classiq-0.1.5-py3-none-any.whl.

File metadata

  • Download URL: classiq-0.1.5-py3-none-any.whl
  • Upload date:
  • Size: 17.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.8 CPython/3.8.11 Linux/5.8.0-1041-azure

File hashes

Hashes for classiq-0.1.5-py3-none-any.whl
Algorithm Hash digest
SHA256 e643aa4ac3a0fadf2f4b4c767d02c77b7dc286e023dab432041c5c46ca146610
MD5 373ce73046fa61f50331dea462c2ca2c
BLAKE2b-256 9276f46e13378258e7673148a66ab8712a14884e268bb51c2eb594c313fe4980

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page