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

Uploaded CPython 3.12Windows x86-64

envelopes_qc-0.0.12-cp311-cp311-win_amd64.whl (204.8 kB view details)

Uploaded CPython 3.11Windows x86-64

envelopes_qc-0.0.12-cp310-cp310-win_amd64.whl (204.4 kB view details)

Uploaded CPython 3.10Windows x86-64

envelopes_qc-0.0.12-cp39-cp39-win_amd64.whl (208.7 kB view details)

Uploaded CPython 3.9Windows x86-64

File details

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

File metadata

File hashes

Hashes for envelopes_qc-0.0.12-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 b36db2cc95f66fbbf61425fccadb230c35b4ac1858c40a2c21c9c9173415544c
MD5 52a884ebd6b640dc52e020133be1110a
BLAKE2b-256 e1b03ca7d50036a3ced028e8451b95b6b7b498eb355fa4c72f371b5c0246c354

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for envelopes_qc-0.0.12-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 39ae384cdcfd51acdbe91569f7f6e346609ac85f4452c8aed34428dd7b90ab17
MD5 a344cd7c0ea8a7e544e88e1373ccc020
BLAKE2b-256 0a5cf15f4b46c87603b8996b8e02d277e49e980069695c6c9cf8a37f7fe7a523

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for envelopes_qc-0.0.12-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 b9ef834643f6d1e242d36b10d08f0fb2dd977c1d118565ce20af0ec09b190ce1
MD5 58c6772b4157363a68cd24f830e3a250
BLAKE2b-256 5eb35178ffea1f37daa09223241dc6f9cfda28de429b196e77956b2833b4cb5f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for envelopes_qc-0.0.12-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 a5978e231da50f074586fdb99bc9b3da4a226f7dd4cc789352b83a7a96f49225
MD5 f83494626767876bc09fda85f5180f8f
BLAKE2b-256 b4a1862d16b8eeb5da3fd6c783392e58c14c76b3a97ef17cfd3e5b89296ad993

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