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

Uploaded CPython 3.12Windows x86-64

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

Uploaded CPython 3.11Windows x86-64

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

Uploaded CPython 3.10Windows x86-64

envelopes_qc-0.0.10-cp39-cp39-win_amd64.whl (208.0 kB view details)

Uploaded CPython 3.9Windows x86-64

File details

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

File metadata

File hashes

Hashes for envelopes_qc-0.0.10-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 2b56ca76708923e86ab84fe2b4171e7eb3d46d6fa7d94da2f3a9ca7d2cf32242
MD5 17c8c03f44435bce3b7d449fe22ec621
BLAKE2b-256 eab446f94266b957b9ef6d269671a75eecb1b9d353b5be97ef9ed96648ee8553

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for envelopes_qc-0.0.10-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 95d9641bd9df7b0373c802ceaf3ebedb290329d3e9223c566653853c2156761b
MD5 6d01759c135ec02318a10a85352b9204
BLAKE2b-256 edad1927a410013613f05d99ef9625cd539ce445b3464b2c62cc25b5f079d9a6

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for envelopes_qc-0.0.10-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 1107cb4f2f18d638d81c568d5e8ef62c30df868008a754df8f025645c0a8473d
MD5 3a8125c9ceff338c64048306ea7781ea
BLAKE2b-256 8c178a4e8f4fc8efcf637746e52fd5633c485240f1d9b734ea86c467546abd23

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for envelopes_qc-0.0.10-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 a45b4b074ef3fe7109020cac0a8559195f7e92512e6fb310a3f5a72879f836db
MD5 57e097cff761688808b122c7ce0c619f
BLAKE2b-256 342fd8af30bfc85e701081b9a0567566883b08b4d1cf64526bc7076acdd3efcb

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