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.15-cp312-cp312-win_amd64.whl (207.1 kB view details)

Uploaded CPython 3.12Windows x86-64

envelopes_qc-0.0.15-cp311-cp311-win_amd64.whl (204.9 kB view details)

Uploaded CPython 3.11Windows x86-64

envelopes_qc-0.0.15-cp310-cp310-win_amd64.whl (204.5 kB view details)

Uploaded CPython 3.10Windows x86-64

envelopes_qc-0.0.15-cp39-cp39-win_amd64.whl (208.9 kB view details)

Uploaded CPython 3.9Windows x86-64

File details

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

File metadata

File hashes

Hashes for envelopes_qc-0.0.15-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 51e6e11f5dcc94ea843ecf8731bc3ea855f543ddc18e68f55815aa3011ed91fe
MD5 f8ef9779667a10daedc63fa2184e16bf
BLAKE2b-256 c9266e9a958c04215e754b9cf5295a236e32a7c0fec8df15e73e5838c88059cb

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for envelopes_qc-0.0.15-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 2512c815c7ef075670d790346d0667b684c2753d6084af99926332e40e46dae0
MD5 940a29d7eace66541cd81b939bceb3a2
BLAKE2b-256 05e634820469419192a4ff9c2fdaa40bbd22149eb2a24de0e76f3f89ecc23f00

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for envelopes_qc-0.0.15-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 58039e7212c585f4493297bb3f8d5023641ac2a50b5c0b2ad61c1e971b582d5b
MD5 6c684e1fcf10fb54366d31e3ea8335b3
BLAKE2b-256 d46e2d15a8eebb7639129e2661e263fb388a9a4fae2dc69969d76a113edc70a7

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for envelopes_qc-0.0.15-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 04341c9945dfa436b36a8f1d0d3e35acfbb9e259451b5c1c232ceb4e076c2dee
MD5 e9d18f2168a5e8b5c9560ca2ad46ef2f
BLAKE2b-256 52c354917372bb2c01eafb25f1c3adfdb8894fe27f94bdd349a1a19912a3e43f

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