Skip to main content

Envelops impelemented by C++ and Python.

Project description

envelopes

High performance tools for building and decoding envelopes used in superconducting quantum qubit experiments.

Installation

pip install envelopes-qc

Or

  1. Cloning the repository to your machine.
  2. Installing envelopes using pip locally by the following command:
python setup.py build_ext --inplace

or directly building package under the folder "site-package":

pip install .

Usage

from envelopes import evc, DRAG # evc (evp) is the envelopes module implemented by C++ (Python)
import numpy as np
# create an envelope
pi_pulse = DRAG(start=0, amp=1, length=30, alpha=0.5, nonlinearity=-0.2, mixing_freq=0.1, phase=0.0, profile='gaussian') # profile can be 'gaussian' or 'cosine'
amp = np.array([1, 0.3, 0.7, 0.8])
dt = np.array([0, 50, 100, 200])
xy = evc.align(pi_pulse, dt, amp) # align the envelope to the given dt and amplitude
# The following code has equivalent effect but undermine the efficiency:
# xy = 0
# for _dt, _amp in zip(dt, amp):
#     xy += (pi_pulse >> dt) * amp

# decode the envelope
resolution = 0.5
wc = evc.WaveCache(resolution)
# t, wave = evc.decode_envelope(xy, wc) default start and end defined by the envelope will be used
t_start, wave = evc.decode_envelope(xy, wc, start=-50, end=250)
wave = np.array(wave, copy=False) # convert vector wrapper to numpy array
t_list = np.arange(t_start, t_start+len(wave)*resolution, resolution)


import matplotlib.pyplot as plt
plt.figure()
plt.plot(t_list, wave.real, '.-', label='real')
plt.plot(t_list, wave.imag, '.-', label='imag')
plt.legend()
plt.xlabel('time')
plt.ylabel('amplitude')
plt.tight_layout()
plt.show()

Supported Envelopes

See tests/supported_envelopes.ipynb.

Speed test

See tests/speed_test.ipynb.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

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

envelopes_qc-0.0.6-cp312-cp312-win_amd64.whl (192.5 kB view details)

Uploaded CPython 3.12Windows x86-64

envelopes_qc-0.0.6-cp311-cp311-win_amd64.whl (192.0 kB view details)

Uploaded CPython 3.11Windows x86-64

envelopes_qc-0.0.6-cp310-cp310-win_amd64.whl (190.8 kB view details)

Uploaded CPython 3.10Windows x86-64

envelopes_qc-0.0.6-cp39-cp39-win_amd64.whl (188.2 kB view details)

Uploaded CPython 3.9Windows x86-64

File details

Details for the file envelopes_qc-0.0.6-cp312-cp312-win_amd64.whl.

File metadata

File hashes

Hashes for envelopes_qc-0.0.6-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 dea769c9c2672a785325b42ee3b085f8d7c8dec21775c5d5ad4f557602049ca6
MD5 eeb47a528a2980e90d21d81cd05db80c
BLAKE2b-256 b8526e05ee3a06ea62797818d23484a907fa9ffb054ebbb82df6d3e6ce51b2f0

See more details on using hashes here.

File details

Details for the file envelopes_qc-0.0.6-cp311-cp311-win_amd64.whl.

File metadata

File hashes

Hashes for envelopes_qc-0.0.6-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 e07fdbfe9fed0537f020174bc0899003b890447349b0a6103add2a0584d2cc92
MD5 048bf51c625b5db719c592ac7a2a6635
BLAKE2b-256 d4415bc97be9d06454af89122d2baf3af174b31314fe3d3971908212ed905c17

See more details on using hashes here.

File details

Details for the file envelopes_qc-0.0.6-cp310-cp310-win_amd64.whl.

File metadata

File hashes

Hashes for envelopes_qc-0.0.6-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 a8c159f3c3cd2f46fee1fcdec7874b1fa4b81a2ec062705fea0de9c5b39599d1
MD5 29248d5476a45f1d575e9b4d33fc7eb6
BLAKE2b-256 5c60a1f5fd2ebb7b1bfbbd1f5d170303bd2060cd2db6ae8263837f164cbcfd7d

See more details on using hashes here.

File details

Details for the file envelopes_qc-0.0.6-cp39-cp39-win_amd64.whl.

File metadata

  • Download URL: envelopes_qc-0.0.6-cp39-cp39-win_amd64.whl
  • Upload date:
  • Size: 188.2 kB
  • Tags: CPython 3.9, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.9.7

File hashes

Hashes for envelopes_qc-0.0.6-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 11ca27d8a1687ee71369c971622cf978315679c1236293a6d8c5067e6deb707b
MD5 4ecb1bf1f307c535bd60389f3e675145
BLAKE2b-256 1091fbe5f488294af6a5cdbab3fc8e0ef3531533cdec0953722d8559f1ec94a5

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