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.

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

Uploaded CPython 3.12Windows x86-64

envelopes_qc-0.0.2-cp311-cp311-win_amd64.whl (189.1 kB view details)

Uploaded CPython 3.11Windows x86-64

envelopes_qc-0.0.2-cp310-cp310-win_amd64.whl (187.7 kB view details)

Uploaded CPython 3.10Windows x86-64

envelopes_qc-0.0.2-cp39-cp39-win_amd64.whl (185.2 kB view details)

Uploaded CPython 3.9Windows x86-64

File details

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

File metadata

File hashes

Hashes for envelopes_qc-0.0.2-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 98da04b90eda84bd9e5d09a5cace85090d8ee41964cc77bb41890ef11f835bd0
MD5 0af482f6fa0d3751fcf97ecfe2203385
BLAKE2b-256 b09b22b3ee5f0984c413e69ed244665329a661bcf2866d7b919c6bd13fbd790e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for envelopes_qc-0.0.2-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 d7fd92785ae888597dfa65e616a5bdb146bcdf4710fbc0c951d38d5fed3d3ef7
MD5 7842e720dbe6f2950daa92f6f89bb734
BLAKE2b-256 f4730dcea1c9a65b5ca3cabccf56f320cf3e84ce9b32f450bfa57987596f8b29

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for envelopes_qc-0.0.2-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 13ef1aed1d60624360aecd84d816e4c1a55a2d223dea608d5e05449d114d2054
MD5 f7b11fa30250f5a54e7ba94f4255bc2b
BLAKE2b-256 96c9bef5b7492cc5fc18b9044b2b4d9115c00d174ad899dceaa37d345a6ecaac

See more details on using hashes here.

File details

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

File metadata

  • Download URL: envelopes_qc-0.0.2-cp39-cp39-win_amd64.whl
  • Upload date:
  • Size: 185.2 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.2-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 ac4a1fc7907bc558b4bc89a029398a6ceab34ec2b8e9e5866bbf85a1bf3c13d0
MD5 af36659dab46ac8575738e026127f8da
BLAKE2b-256 60bdaed1af108d563c8eb6ba7d439498568c6e07862431637306405bc61f3d73

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