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

Uploaded CPython 3.12Windows x86-64

envelopes_qc-0.1.1-cp311-cp311-win_amd64.whl (208.3 kB view details)

Uploaded CPython 3.11Windows x86-64

envelopes_qc-0.1.1-cp310-cp310-win_amd64.whl (207.6 kB view details)

Uploaded CPython 3.10Windows x86-64

envelopes_qc-0.1.1-cp39-cp39-win_amd64.whl (207.4 kB view details)

Uploaded CPython 3.9Windows x86-64

File details

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

File metadata

File hashes

Hashes for envelopes_qc-0.1.1-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 8e01e8cafea2212c45bde81aa68c8fd275457e05e8dac74df3dc26fd1c4cbba2
MD5 88703eadfebf0042ffa256b25f845874
BLAKE2b-256 eb6264cbea14a043d55deb6d9a0e17eba33a10e45dc2dbec80d5771295cd3ea4

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for envelopes_qc-0.1.1-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 c377f39bc7e5f5079e803e022819d39dd6de7b7694e1ecff6236e68c61000328
MD5 27093b16fab0704cb941a5f7153d21b0
BLAKE2b-256 c9068327d565f81e788e19b6fb8b85c9d0910c74d1d1d3e21cdb48ceb939d2a9

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for envelopes_qc-0.1.1-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 dd8808be03ca1b0a9f4c642e93e5cba11fa443937cc3d15f752157aacb958cac
MD5 e13bed915eca32ec4fd6239b82ac116d
BLAKE2b-256 11cffee785d5ed30cf849d707002d45fa212a88ad0564656b6be8c2fd34fc530

See more details on using hashes here.

File details

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

File metadata

  • Download URL: envelopes_qc-0.1.1-cp39-cp39-win_amd64.whl
  • Upload date:
  • Size: 207.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.1-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 5d7b237e227c96d4b126679ed7449195477a20b9f3a7626a37be03a1e0af5375
MD5 f999c533b5312fb65e1f6467da1326a2
BLAKE2b-256 c9a461bb8480f7603ef93f212037f2a2fc140fef6ded3ee277f4440ecbaba273

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