Skip to main content

Envelops impelemented by C++ and Python.

Project description

envelopes-qc

High performance tools for building and decoding envelopes used in superconducting 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.8-cp312-cp312-win_amd64.whl (200.5 kB view details)

Uploaded CPython 3.12Windows x86-64

envelopes_qc-0.0.8-cp311-cp311-win_amd64.whl (198.8 kB view details)

Uploaded CPython 3.11Windows x86-64

envelopes_qc-0.0.8-cp310-cp310-win_amd64.whl (198.1 kB view details)

Uploaded CPython 3.10Windows x86-64

envelopes_qc-0.0.8-cp39-cp39-win_amd64.whl (203.0 kB view details)

Uploaded CPython 3.9Windows x86-64

File details

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

File metadata

File hashes

Hashes for envelopes_qc-0.0.8-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 3a6e29f7b55c97efb4fbc92ba5d846d80ad92c382c2dc051d21449af8312456b
MD5 85d9283836284a02ed4cef0ff8f0dc5e
BLAKE2b-256 b3febe052523625a42349d1b176196fa77d9230e9641d6931597fd9506d3a788

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for envelopes_qc-0.0.8-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 741e74eb4d02e355a3bfa76de0822bfd5f44b67fb97531f6fc5389ea3ad99e43
MD5 809921a9f5539cb0ebaf38f044f7b2d6
BLAKE2b-256 0cb04e07f7afda0aec48ceacc572e74b840a38e7d815cb1afe15955a992aa429

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for envelopes_qc-0.0.8-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 d6dcd3b4b522b886dc4a8e25662c83c9cecdc04b84b5a2c2320ae0e4c2e076db
MD5 477971f167dd24d5d1472cd576347a8f
BLAKE2b-256 7625decb76ad7c105454bf3c7137744cf309330b718bace3315827cf7fa60cd6

See more details on using hashes here.

File details

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

File metadata

  • Download URL: envelopes_qc-0.0.8-cp39-cp39-win_amd64.whl
  • Upload date:
  • Size: 203.0 kB
  • Tags: CPython 3.9, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.9.13

File hashes

Hashes for envelopes_qc-0.0.8-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 c0768de8b88db0092d7fb19f720c5fabb009fa16b4688d95604bf6e2ff5fb544
MD5 c701777c7765da33b25ba3a0d222eec3
BLAKE2b-256 f3f15ae7797a6fb8edcc86e5898be303b967d9489f1b33b8e80dccb1b4a522a8

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