Skip to main content

A simple Python library to simulate and execute EWL quantum circuits on IBM Q.

Project description

EWL

A simple Python library to simulate and execute EWL quantum circuits on IBM Q.

Installation

pip install ewl

Usage

from ewl import *

psi = (Qubit('00') + i * Qubit('11')) / sqrt2  # initial state

alice = U(theta=pi / 2, alpha=pi / 2, beta=0)  # quantum strategy
bob = U(theta=0, alpha=0, beta=0)  # classical strategy (C)

ewl = EWL(psi, [alice, bob])

ewl.J

ewl.J_H

ewl.draw()

ewl.draw_transpiled(backend_name='ibmq_athens', optimization_level=3)

ewl.calculate_probs()

ewl.simulate_probs(backend_name='statevector_simulator')

ewl.simulate_counts(backend_name='qasm_simulator')

ewl.run(backend_name='ibmq_athens', optimization_level=3)

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

ewl-0.4.0.tar.gz (4.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ewl-0.4.0-py3-none-any.whl (4.2 kB view details)

Uploaded Python 3

File details

Details for the file ewl-0.4.0.tar.gz.

File metadata

  • Download URL: ewl-0.4.0.tar.gz
  • Upload date:
  • Size: 4.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.9.2

File hashes

Hashes for ewl-0.4.0.tar.gz
Algorithm Hash digest
SHA256 864b9a3c51faf308af24914945ccf52f30a7aa802a9219e86178385172208c47
MD5 78f9e9b277bf5d1a0c938a3e0aa06305
BLAKE2b-256 efa1165276061b80a5bab5f412be11eeddf1accba5464b1d36408822a9484ddf

See more details on using hashes here.

File details

Details for the file ewl-0.4.0-py3-none-any.whl.

File metadata

  • Download URL: ewl-0.4.0-py3-none-any.whl
  • Upload date:
  • Size: 4.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.9.2

File hashes

Hashes for ewl-0.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 c87cb6d10a7254863217e2437de107252fb348523ad599a178b740f959db8cf0
MD5 7f2b77e4adec4b8ad8ac66738f731713
BLAKE2b-256 b0526dde4bec423bbf4d28b2d8449787c68104a6bcba05905febe09108afadff

See more details on using hashes here.

Supported by

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