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

Uploaded CPython 3.12Windows x86-64

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

Uploaded CPython 3.11Windows x86-64

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

Uploaded CPython 3.10Windows x86-64

envelopes_qc-0.0.14-cp39-cp39-win_amd64.whl (209.1 kB view details)

Uploaded CPython 3.9Windows x86-64

File details

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

File metadata

File hashes

Hashes for envelopes_qc-0.0.14-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 4aff04c36ff22e9e96bb19417be356d9e6fc3ffc1e74f825340ff33dc27042fa
MD5 17373e3014039239f0be385f608ae7e1
BLAKE2b-256 7bb6e29564765601ad2ba1b73dea1faa334674263ad2f2534b74538cc1b4c35b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for envelopes_qc-0.0.14-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 cefcff7dfef13604929ac9b2f67f41c91f8fedde0d8f596123257ea84800e643
MD5 ef84de455db49ceb73ba25b28333aac2
BLAKE2b-256 e276ade77c51c46fc9c3b5ebe685e827d01230fdeaef166f478cbb02f7741c1a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for envelopes_qc-0.0.14-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 4b35c10c49ea49370cd755f2a26e034efb749e516b11cf058d365a77d0125384
MD5 004b52c4fc063480ca896545a37c2286
BLAKE2b-256 b38fb53b38230411dd369d740e562b7f50df88669aec9f0fc2ffd0391352b587

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for envelopes_qc-0.0.14-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 5e8bc06a93e4f2959ace9d366b756bdbcbeb037fee52b0c2dc282cdb44c0d386
MD5 75d090a982d55e1ba917d15594fc136c
BLAKE2b-256 0d8d996117ab78211decfea4bc245e48cf056a9477e9b9f824bd7a865bd13e4c

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