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

Uploaded CPython 3.12Windows x86-64

envelopes_qc-0.0.16-cp311-cp311-win_amd64.whl (205.0 kB view details)

Uploaded CPython 3.11Windows x86-64

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

Uploaded CPython 3.10Windows x86-64

envelopes_qc-0.0.16-cp39-cp39-win_amd64.whl (209.0 kB view details)

Uploaded CPython 3.9Windows x86-64

File details

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

File metadata

File hashes

Hashes for envelopes_qc-0.0.16-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 4ba2d6303dea44560d6afdad0d6f0d9e2f6eb8485bfab441479dab529e65ebaa
MD5 a822afe1d4260413d102468a9d813cb7
BLAKE2b-256 c0ac2badc46a00854dfa3984a8de4445edcd5c42d8fbc64e1a0048757a5b758d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for envelopes_qc-0.0.16-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 1ca88f7ee446fae9caebee1b19ff8ac4369a4bc43f45f3619d70c7ce4c7b85ab
MD5 063780af6da269c06c85c4bb3cd3dbc9
BLAKE2b-256 2d982e5e1b8e0a7806eb0af450c47d7f0f826c80893a20235d5a9f1b00d32d03

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for envelopes_qc-0.0.16-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 a4bc6557165bd79d7fcb2651697975ddb0cfcf5865a95548ccd03616e6bb83e2
MD5 444749fada8a8a18843ada02b8ca1fed
BLAKE2b-256 6c1e3d9fb4b1bfef69373d92ebe1e12e9092c84f101380077d88f5c6d722854f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for envelopes_qc-0.0.16-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 45294ecffcaa89500d596238f57c7f7fd39d9ab07836d7d8829eb008ea0822b7
MD5 b86a76d898e202cb4ae89e7230311e95
BLAKE2b-256 61705be6eb39848ef2235698bc8ef054f38a5745edbbff1116c4492bf97c9682

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