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 = 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.9.tar.gz (14.2 kB view details)

Uploaded Source

Built Distribution

classiq-0.1.9-py3-none-any.whl (18.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: classiq-0.1.9.tar.gz
  • Upload date:
  • Size: 14.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.8 CPython/3.8.12 Linux/5.8.0-1042-azure

File hashes

Hashes for classiq-0.1.9.tar.gz
Algorithm Hash digest
SHA256 bfa1049fdf473338dbac06f76879d52536e07c0702a5925474c71ec121bda193
MD5 41eab29a523b93efe6c18da74636033f
BLAKE2b-256 74e4eb58739e6ce3d2127426d50c4a2cae20a474b10ec9bd307ec98a70ae7cc0

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for classiq-0.1.9-py3-none-any.whl
Algorithm Hash digest
SHA256 96d28e4cd9874875fb75fbc408bfa5c53efe888fc7d91538633eb4766171d3f4
MD5 aa7658187e09b20ae6cef3070a90ee89
BLAKE2b-256 daa33794ad7369ed1338617e0be092a6d81c05257e8284bbb1ec0ae2f7c08a97

See more details on using hashes here.

Supported by

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