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

Uploaded CPython 3.12Windows x86-64

envelopes_qc-0.0.11-cp311-cp311-win_amd64.whl (204.3 kB view details)

Uploaded CPython 3.11Windows x86-64

envelopes_qc-0.0.11-cp310-cp310-win_amd64.whl (203.8 kB view details)

Uploaded CPython 3.10Windows x86-64

envelopes_qc-0.0.11-cp39-cp39-win_amd64.whl (208.1 kB view details)

Uploaded CPython 3.9Windows x86-64

File details

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

File metadata

File hashes

Hashes for envelopes_qc-0.0.11-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 b92dec4b060a3eb96e0661221664b81691097f05f7d180bb5af7c4d3d40543ee
MD5 fd87dc7571061ecfae2193dee4923074
BLAKE2b-256 ce3ac387aab893d3b34d711fb0d0439dac3baff04c79e64de9873f2915413bd6

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for envelopes_qc-0.0.11-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 ddeca6098c703f12db297259b16ef461359006f8bd9180fda704d8510eeb249d
MD5 eab73f805e15500b23150cbf95fdc755
BLAKE2b-256 69cfee093cfb58711d62e2cea1b1e1ba721b7f9cbf3a83291dc970b242387464

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for envelopes_qc-0.0.11-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 e9f2673459bb84acb79620dfedf3e2a79871543d0f4232b94fe39a968671a28c
MD5 fe33b14a2dc88befbb1ca0f66ac265cf
BLAKE2b-256 733a60c861b254f207a73297a62bd8c2e0e07b5ae005953a56f1d388b44df0a0

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for envelopes_qc-0.0.11-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 15e8224cc661be338f4c870102fbe9491817a02cf3b7e3d9b05a979e3323a6cd
MD5 ad2649bcaf01d1d81c3901be68f421ef
BLAKE2b-256 aef7d5fe5642aedaf14a6921fc5f7291a8e1bae3fb862aa882744a961ef72522

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