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
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.5.0.tar.gz
(5.4 kB
view hashes)
Built Distribution
ewl-0.5.0-py3-none-any.whl
(5.3 kB
view hashes)