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.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.3.1.tar.gz (4.2 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.3.1-py3-none-any.whl (4.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: ewl-0.3.1.tar.gz
  • Upload date:
  • Size: 4.2 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.3.1.tar.gz
Algorithm Hash digest
SHA256 718cd3f55e96f375e285581ff4711be9c6a0db09ad232454350f07d47c4088a0
MD5 6db333ecdf13f20ee2a13586234da112
BLAKE2b-256 9e6bad7046f58d0f7293bd509ce8e97422bb20ca5839fc1565af907f614bd6ae

See more details on using hashes here.

File details

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

File metadata

  • Download URL: ewl-0.3.1-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.3.1-py3-none-any.whl
Algorithm Hash digest
SHA256 4cc1d469e4b8c2499897edb6dc2695395de128177ea7da8c45c9a1d6e10282ac
MD5 49580cc5524e34806fa1b327452446e3
BLAKE2b-256 81bc0db59d7151d771e6f9bd6beefcf836b1c3adb9e5f7c7089bc06ebd266d50

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