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 building on Linux, install the libcerf3 and libcerf-dev packages in the src/libcerf folder, or download and install them according to your Linux distribution.

python -m build -w -v

Installation

pip install envelopes-qc

Or build from source:

  1. Clone the repository to your machine.
  2. Install the package locally with one of the following commands:
# Development build (compile in place)
python setup.py build_ext --inplace
# Install into the active Python environment
pip install .

Usage

from envelopes import evc
import numpy as np

# Create a GaussianDRAG envelope
center = 15
width = 10
pi_pulse = evc.GaussianDRAG(
    t0=center, w=width, amp=1.0, coef=0.5, df=0.1, phase=0.0
)

# Schedule multiple pulses
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 is less efficient:
# 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 from the envelope
t_start, wave = evc.decode_envelope(xy, wc, start=-50, end=250)
# wave is already a zero-copy numpy ndarray view of the internal buffer
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 and the detailed envelope reference in doc/envelope_reference.md.

Speed Test

See tests/speed_test.ipynb.

Documentation

Detailed usage documentation is available in the doc/ folder. Start from doc/index.md:

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

Uploaded CPython 3.12Windows x86-64

envelopes_qc-0.1.3-cp311-cp311-win_amd64.whl (221.6 kB view details)

Uploaded CPython 3.11Windows x86-64

envelopes_qc-0.1.3-cp310-cp310-win_amd64.whl (221.0 kB view details)

Uploaded CPython 3.10Windows x86-64

envelopes_qc-0.1.3-cp39-cp39-win_amd64.whl (223.3 kB view details)

Uploaded CPython 3.9Windows x86-64

File details

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

File metadata

File hashes

Hashes for envelopes_qc-0.1.3-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 a30a58833894b52ebd0a8056857966d6cb8244a9005691befedbb3cf55dc5e05
MD5 fae109e3ac29a5dd60e8d442066a1f4d
BLAKE2b-256 01dcebd3a4ed972d02f6aabb87033cd1cb63c320b3353db61d9af0c65f56ecd9

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for envelopes_qc-0.1.3-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 40b447195301d57a93a8bf3b9ac2af4791605c4de1643594ba7dc4837c1ca8ee
MD5 2a21dbe9cc5dd08082b5410beb97f8a4
BLAKE2b-256 7558d773bd574b9ef46adcc49a48d41d6fbbddfa08cf22fd6e1ce87a953b9577

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for envelopes_qc-0.1.3-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 9370bcc03d88daabe87bb2392f7bb135d891ce202eae8f76ab32bd10703454d1
MD5 0a7bf40c4f783f14636a45418ba9aea7
BLAKE2b-256 372032bfb9e101beb7b3a985b976f155b48886131bab28ee76d237761037cf0c

See more details on using hashes here.

File details

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

File metadata

  • Download URL: envelopes_qc-0.1.3-cp39-cp39-win_amd64.whl
  • Upload date:
  • Size: 223.3 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.3-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 484bef547194945ba7235fb37e96d78f62bcf51b1c1c2321e015aa84082e66a3
MD5 ba5599b48d1e5ad85cd560d3c944be56
BLAKE2b-256 5b0a49a1e02cee8cfdb755f488e1b0e846ec4faf997923c269048f0c8227570f

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