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.

build

before build on linux system, install the libcerf3 and libcerf-dev_3 package in the src/libcerf folder, or self-download and install the package according to the linux distribution。

python -m build -w -v

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

Uploaded CPython 3.12Windows x86-64

envelopes_qc-0.1.2-cp311-cp311-win_amd64.whl (210.2 kB view details)

Uploaded CPython 3.11Windows x86-64

envelopes_qc-0.1.2-cp310-cp310-win_amd64.whl (209.6 kB view details)

Uploaded CPython 3.10Windows x86-64

envelopes_qc-0.1.2-cp39-cp39-win_amd64.whl (210.4 kB view details)

Uploaded CPython 3.9Windows x86-64

File details

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

File metadata

File hashes

Hashes for envelopes_qc-0.1.2-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 60247317a5661e77c121a47990a20c28218c800de8430f7f3bffb7a68d39da98
MD5 ebde2a8ab9178c2fc0486238b2bbb590
BLAKE2b-256 5aa5aeef331ea9697ba636a165f6812fa3ef144140436688ddd5375ab38a16c8

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for envelopes_qc-0.1.2-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 6ade64c8ec21928f0e17890704f92f53ee837802fbabc09d316778cfb626b3df
MD5 5c8e0d17111c384279ae11c2c342cfe1
BLAKE2b-256 add231c7f1be4256fcf152a7a9e07ffb3838f0b23059618402d4829bdf95b1ad

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for envelopes_qc-0.1.2-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 eb9c91c7e1f55388f2bd1e0b1a8ca84c30389af96ed45714001ce8d1178b0a40
MD5 91866d8f14f4363f1463a6dba8e1c96f
BLAKE2b-256 b4d6efe0e008f76e0a1507052e681d19d1f218c6b50c471fa92756864210c989

See more details on using hashes here.

File details

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

File metadata

  • Download URL: envelopes_qc-0.1.2-cp39-cp39-win_amd64.whl
  • Upload date:
  • Size: 210.4 kB
  • Tags: CPython 3.9, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.9.13

File hashes

Hashes for envelopes_qc-0.1.2-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 386da0276a491aeee3e91953cd7e2ee59e68fca99f6b363500f7e4e4854d99f5
MD5 99e5251d2bf25ae2524215fb3020e2a4
BLAKE2b-256 388bbfeeea6b679786d835a02f5ef300f824ddaabd83161ad4d40b6be9df4281

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