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()
ewl.run(backend_name='ibmq_athens', optimization_level=3)
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
ewl-0.3.0.tar.gz
(4.1 kB
view details)
Built Distribution
ewl-0.3.0-py3-none-any.whl
(4.1 kB
view details)
File details
Details for the file ewl-0.3.0.tar.gz
.
File metadata
- Download URL: ewl-0.3.0.tar.gz
- Upload date:
- Size: 4.1 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
Algorithm | Hash digest | |
---|---|---|
SHA256 | f7e70ad6da770cb5bdb5666fe5c751379f6c53f32e64b4fc0ebf8a916354ea0f |
|
MD5 | af2a2c1c4cd449e1e5143218a73b7b5d |
|
BLAKE2b-256 | 80398ed59a66c904f3e088c2c62e57eedaeadc78df621110f8001f1e67d611ba |
File details
Details for the file ewl-0.3.0-py3-none-any.whl
.
File metadata
- Download URL: ewl-0.3.0-py3-none-any.whl
- Upload date:
- Size: 4.1 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
Algorithm | Hash digest | |
---|---|---|
SHA256 | ef1901d9aa14e2b8947c590c7c03e7e8697f02186ec9acdbc4549d10c0ea0e32 |
|
MD5 | e84a3fc90427b6bc626dff78401a2a4b |
|
BLAKE2b-256 | 9d624afcc684bc8361b0fffa31427095cb5f4bfe716e6e76b1398b476750e326 |