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

Uploaded Python 3

File details

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

File metadata

  • Download URL: ewl-0.5.0.tar.gz
  • Upload date:
  • Size: 5.4 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.5

File hashes

Hashes for ewl-0.5.0.tar.gz
Algorithm Hash digest
SHA256 236e9591225f3c80dd369017b317021cbf4e776ef6753b1097dad9dadc0ee304
MD5 de4666a7cc2a7a5cab28d7d201197d08
BLAKE2b-256 ffb4378b68800e5bd24df797812145f33c624a3d77cdbc4694a450587318b8c7

See more details on using hashes here.

File details

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

File metadata

  • Download URL: ewl-0.5.0-py3-none-any.whl
  • Upload date:
  • Size: 5.3 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.5

File hashes

Hashes for ewl-0.5.0-py3-none-any.whl
Algorithm Hash digest
SHA256 901cf5601e92c14fb529ab64244e2fedd33dc329a892988036c311735c66f96b
MD5 639c256ff626bcdc7165cce8fece6f9d
BLAKE2b-256 a50c27107ac40f8db3840d92387bb02b7b8eabcef06522812302d25f05d770cb

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