Skip to main content

Envelops impelemented by C++ and Python.

Project description

envelopes

High performance tools for building and decoding envelopes used in superconducting quantum 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.4-cp312-cp312-win_amd64.whl (192.0 kB view details)

Uploaded CPython 3.12Windows x86-64

envelopes_qc-0.0.4-cp311-cp311-win_amd64.whl (191.6 kB view details)

Uploaded CPython 3.11Windows x86-64

envelopes_qc-0.0.4-cp310-cp310-win_amd64.whl (190.3 kB view details)

Uploaded CPython 3.10Windows x86-64

envelopes_qc-0.0.4-cp39-cp39-win_amd64.whl (187.8 kB view details)

Uploaded CPython 3.9Windows x86-64

File details

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

File metadata

File hashes

Hashes for envelopes_qc-0.0.4-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 377f4a4d192de825f7b3632cde98f213ff9c56d6fc5ea999c4302b63fd613df4
MD5 ecc8fcaeae6d3f52722353e51311162e
BLAKE2b-256 d7c5508b56f80ea9f5615c355d10e7d9e0e58ff024596bad13779ec42e801fb4

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for envelopes_qc-0.0.4-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 f514ea40342c5f3b071ee6eff5f597c5508462a73452085546b24ca2b4feda3c
MD5 0a18ede0cf9646908986fcfe678f1331
BLAKE2b-256 c1cc1dce3c5d64395b70a5eb7795742aaa43894ccbcb56fe21ecf40845bf8b14

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for envelopes_qc-0.0.4-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 30e4ec84f632b5cb9cbf0d5e2a2e1b73361db57dffa9b351ef134122ea21e84b
MD5 8e729d96838c116c591763754889577c
BLAKE2b-256 d7708b98933463d518eacb1ee7a0e2ecf3e8805a5a3d6e59dea75cf1f5a9bbd0

See more details on using hashes here.

File details

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

File metadata

  • Download URL: envelopes_qc-0.0.4-cp39-cp39-win_amd64.whl
  • Upload date:
  • Size: 187.8 kB
  • Tags: CPython 3.9, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.9.7

File hashes

Hashes for envelopes_qc-0.0.4-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 0896478d2f3ef8a6f3a84a145ec4963bc1f6d455c1ef9f62138f7f7af02f7d0c
MD5 562a08cd02a0af3e61b1d1bc076d901c
BLAKE2b-256 beedc26003ba3a54cd2b217c81af2f235c8c0b9a63bd92517b4787977a882082

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