Skip to main content

Quantum compiler and common circuits generator

Project description

License Publish Status Downloads

Quantpiler

This library can generate some common circuits and compile python functions to circuits

Examples:

Compile:

from quantpiler.compiler import compile

def example_func(a, b):
    a = True
    a_or_b = a | b
    tmp = a & (a_or_b | (a == b))
    b = tmp != False

qc = compile(example_func, 4)
qc.draw(output="mpl")

Compiled circuit

qRAM

from quantpiler.qram import new_qram

values = {0: 1, 1: 3, 2: 6, 3: 7}
qram = new_qram(2, 3, values)

qram.draw(output="mpl")

qRAM circuit

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

quantpiler-0.1.3.tar.gz (7.3 kB view hashes)

Uploaded Source

Built Distribution

quantpiler-0.1.3-py3-none-any.whl (7.7 kB view hashes)

Uploaded Python 3

Supported by

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