Skip to main content

waveforms

View build status Coverage Status PyPI version

Form waveforms used in experiment.

Installation

We encourage installing waveforms via the pip tool (a python package manager):

python -m pip install waveforms

To install from the latest source, you need to clone the GitHub repository on your machine.

git clone https://github.com/feihoo87/waveforms.git

Then dependencies and waveforms can be installed in this way:

cd waveforms
python -m pip install numpy
python -m pip install -e .

Usage

import numpy as np
import matplotlib.pyplot as plt

from waveforms import *

pulse = cosPulse(20e-9)

x_wav = zero()
y_wav = zero()

I, Q = mixing(0.5*pulse, freq=-20e6, DRAGScaling=0.2)
x_wav += I
y_wav += Q

I, Q = mixing(pulse >> 1e-6, freq=-20e6, phase=np.pi/2, DRAGScaling=0.2)
x_wav += I
y_wav += Q

I, Q = mixing((0.5 * pulse) >> 2e-6, freq=-20e6, DRAGScaling=0.2)
x_wav += I
y_wav += Q


t = np.linspace(-1e-6, 9e-6, 10001)
plt.plot(t, x_wav(t))
plt.plot(t, y_wav(t))
plt.show()

Packed binary representation

Starting with version 3, Waveform and WaveVStack use a packed-binary backend. It is intended for workloads with many small pulses and for low-overhead serialization.

import waveforms as wf

# Optional; call this once, before constructing or loading waveform objects.
wf.set_time_resolution(1e-12)

pulse = (wf.gaussian(12e-9) >> 20e-9) * wf.cos(2 * wf.pi * 5e9)
data = pulse.to_bytes()
restored = wf.Waveform.from_bytes(data)

Time resolution is process-wide and is not stored in each binary block. A process loading a block must therefore use the same resolution as the process that created it. The setting is locked when the first waveform object is created or loaded.

Reporting Issues

Please report all issues on github.

License

MIT

Metadata

Release files for waveforms 3.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for waveforms 3.1.0
File Size Uploaded
waveforms-3.1.0.tar.gz 47.7 kB Details

Built distributions (wheels)

Table of built distributions (wheels) for waveforms 3.1.0
File
waveforms-3.1.0-cp314-cp314t-win_amd64.whl CPython 3.14 CPython 3.14 free-threading Windows x86-64 Details
waveforms-3.1.0-cp314-cp314t-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_34_x86_64.whl CPython 3.14 CPython 3.14 free-threading Linux glibc 2.34+ x86-64, Linux glibc 2.17+ x86-64 Details
waveforms-3.1.0-cp314-cp314t-macosx_10_15_universal2.whl CPython 3.14 CPython 3.14 free-threading macOS 10.15+ universal2 (ARM64, x86-64) Details
waveforms-3.1.0-cp314-cp314-win_amd64.whl CPython 3.14 CPython 3.14 Windows x86-64 Details
waveforms-3.1.0-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_34_x86_64.whl CPython 3.14 CPython 3.14 Linux glibc 2.17+ x86-64, Linux glibc 2.34+ x86-64 Details
waveforms-3.1.0-cp314-cp314-macosx_10_15_universal2.whl CPython 3.14 CPython 3.14 macOS 10.15+ universal2 (ARM64, x86-64) Details
waveforms-3.1.0-cp313-cp313-win_amd64.whl CPython 3.13 CPython 3.13 Windows x86-64 Details
waveforms-3.1.0-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_34_x86_64.whl CPython 3.13 CPython 3.13 Linux glibc 2.17+ x86-64, Linux glibc 2.34+ x86-64 Details
waveforms-3.1.0-cp313-cp313-macosx_10_13_universal2.whl CPython 3.13 CPython 3.13 macOS 10.13+ universal2 (ARM64, x86-64) Details
waveforms-3.1.0-cp312-cp312-win_amd64.whl CPython 3.12 CPython 3.12 Windows x86-64 Details
waveforms-3.1.0-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_34_x86_64.whl CPython 3.12 CPython 3.12 Linux glibc 2.34+ x86-64, Linux glibc 2.17+ x86-64 Details
waveforms-3.1.0-cp312-cp312-macosx_10_13_universal2.whl CPython 3.12 CPython 3.12 macOS 10.13+ universal2 (ARM64, x86-64) Details
waveforms-3.1.0-cp311-cp311-win_amd64.whl CPython 3.11 CPython 3.11 Windows x86-64 Details
waveforms-3.1.0-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_34_x86_64.whl CPython 3.11 CPython 3.11 Linux glibc 2.17+ x86-64, Linux glibc 2.34+ x86-64 Details
waveforms-3.1.0-cp311-cp311-macosx_10_9_universal2.whl CPython 3.11 CPython 3.11 macOS 10.9+ universal2 (ARM64, x86-64) Details
waveforms-3.1.0-cp310-cp310-win_amd64.whl CPython 3.10 CPython 3.10 Windows x86-64 Details
waveforms-3.1.0-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_34_x86_64.whl CPython 3.10 CPython 3.10 Linux glibc 2.34+ x86-64, Linux glibc 2.17+ x86-64 Details
waveforms-3.1.0-cp310-cp310-macosx_10_9_universal2.whl CPython 3.10 CPython 3.10 macOS 10.9+ universal2 (ARM64, x86-64) Details

Total release size: 25.9 MB

Release files / waveforms-3.1.0.tar.gz

Download URL waveforms-3.1.0.tar.gz
Size 47.7 kB
Tags Source
SHA-256 checksum
How to use checksums
0093a1120d0ae980c6f09cc03ddd75690f93bab9e532435b8391e6c7b6ea40fe
BLAKE2b-256 checksum
How to use checksums
089ff02ee8b2658f735566482a1b8e511ad45e609979055c68e8ea17f2d77ee1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.6

Release files / waveforms-3.1.0-cp314-cp314t-win_amd64.whl

Download URL waveforms-3.1.0-cp314-cp314t-win_amd64.whl
Size 365.9 kB
Tags CPython 3.14 CPython 3.14 free-threading Windows x86-64
SHA-256 checksum
How to use checksums
c69f4d54d982f829b0a107437e356dc17a4794a4b00c7a5e16e418ff4281ea15
BLAKE2b-256 checksum
How to use checksums
094bf2609efc251aeeb40217b0c76cad8ad36942f9fc1990c0152c3b7a3546e2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.7

Release files / waveforms-3.1.0-cp314-cp314t-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_34_x86_64.whl

Download URL waveforms-3.1.0-cp314-cp314t-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_34_x86_64.whl
Size 3.0 MB
Tags CPython 3.14 CPython 3.14 free-threading Linux glibc 2.17+ x86-64 Linux glibc 2.34+ x86-64
SHA-256 checksum
How to use checksums
10425eb5d9aeb72a872a829e528734bf64566127b3eb6cb8c62747159260c999
BLAKE2b-256 checksum
How to use checksums
2a0f94b376dc0c17eee3a73bd99ef97508b4c5def415e4ed1c538cb898880f3c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.7

Release files / waveforms-3.1.0-cp314-cp314t-macosx_10_15_universal2.whl

Download URL waveforms-3.1.0-cp314-cp314t-macosx_10_15_universal2.whl
Size 896.3 kB
Tags CPython 3.14 CPython 3.14 free-threading macOS 10.15+ universal2 (ARM64, x86-64)
SHA-256 checksum
How to use checksums
ef01d22f5ea89a962549506cc06140a9dcd8e7c1b66e57cd8e96621c6fe0484a
BLAKE2b-256 checksum
How to use checksums
824d77beba9f37dcb29181423b5f3874f390c1956d1ad7d41e9f3458f2deb511
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.7

Release files / waveforms-3.1.0-cp314-cp314-win_amd64.whl

Download URL waveforms-3.1.0-cp314-cp314-win_amd64.whl
Size 339.7 kB
Tags CPython 3.14 Windows x86-64
SHA-256 checksum
How to use checksums
5eef8347cd764c7cdddd246ecc57a68aeded120dfa79aa5a5c6693ed7fed18c6
BLAKE2b-256 checksum
How to use checksums
5fc78a7fbb8c6fb41e74120e846bf0c0ac01fdf007363ba4eb8eee91337506c2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.7

Release files / waveforms-3.1.0-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_34_x86_64.whl

Download URL waveforms-3.1.0-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_34_x86_64.whl
Size 3.0 MB
Tags CPython 3.14 Linux glibc 2.17+ x86-64 Linux glibc 2.34+ x86-64
SHA-256 checksum
How to use checksums
ab28c034eb838b3906c51d384df9e70a08b450b61b33b58a8c2c2a8247ba9a04
BLAKE2b-256 checksum
How to use checksums
7115f689ef61bd9170f4eef90d33d71a7f7e2a59cde5a565870516d1a89a50c4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.7

Release files / waveforms-3.1.0-cp314-cp314-macosx_10_15_universal2.whl

Download URL waveforms-3.1.0-cp314-cp314-macosx_10_15_universal2.whl
Size 853.1 kB
Tags CPython 3.14 macOS 10.15+ universal2 (ARM64, x86-64)
SHA-256 checksum
How to use checksums
a8925edfce3511ff7f0b74e5795bff3b162e3ce5096cd893940424ef1ca16e35
BLAKE2b-256 checksum
How to use checksums
7a14b260bea19d8c3bf4f923d28d3040becafa0c1c1090054ce980c6d5c980af
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.6

Release files / waveforms-3.1.0-cp313-cp313-win_amd64.whl

Download URL waveforms-3.1.0-cp313-cp313-win_amd64.whl
Size 331.4 kB
Tags CPython 3.13 Windows x86-64
SHA-256 checksum
How to use checksums
5536b72dfcebe6ac3ee0214b59dd5f432d3ccb1d9fbb6ffd102a4c63e3b6bae6
BLAKE2b-256 checksum
How to use checksums
d34781b02d45158f02cccdc357f5ecfb3c8db7dad8abec3cdc832c14b75c6b55
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.15

Release files / waveforms-3.1.0-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_34_x86_64.whl

Download URL waveforms-3.1.0-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_34_x86_64.whl
Size 3.1 MB
Tags CPython 3.13 Linux glibc 2.17+ x86-64 Linux glibc 2.34+ x86-64
SHA-256 checksum
How to use checksums
b7cad2d9e16e7742f758141fbcfad89e172c306c05bb93e2678938b9bf779874
BLAKE2b-256 checksum
How to use checksums
fdfeb64d254df8daea6bc9b85cd9baff530ba3c621fbbdbb0e262359f6abd868
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.15

Release files / waveforms-3.1.0-cp313-cp313-macosx_10_13_universal2.whl

Download URL waveforms-3.1.0-cp313-cp313-macosx_10_13_universal2.whl
Size 848.6 kB
Tags CPython 3.13 macOS 10.13+ universal2 (ARM64, x86-64)
SHA-256 checksum
How to use checksums
9af702176fa963d323df52fa09a142ffa77dfbb007c959e37465b0f7f05d7056
BLAKE2b-256 checksum
How to use checksums
e73772c9481d693e3e63393f15fb678583319569aea072c0c4323d94612515cf
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Release files / waveforms-3.1.0-cp312-cp312-win_amd64.whl

Download URL waveforms-3.1.0-cp312-cp312-win_amd64.whl
Size 332.5 kB
Tags CPython 3.12 Windows x86-64
SHA-256 checksum
How to use checksums
015cdc51e2356987a7a43498c5c9fee26f44e6f761ef21d557b1816b4505ebd6
BLAKE2b-256 checksum
How to use checksums
694f6a8286037c2a0fdac0254b3c67db6a6297e48bbd3e36287d6a8a19a3e66a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.10

Release files / waveforms-3.1.0-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_34_x86_64.whl

Download URL waveforms-3.1.0-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_34_x86_64.whl
Size 3.1 MB
Tags CPython 3.12 Linux glibc 2.17+ x86-64 Linux glibc 2.34+ x86-64
SHA-256 checksum
How to use checksums
7b19769c9df25ed7fa097b45bf28569f99c5350ff90ad7700b40271d2fd2d856
BLAKE2b-256 checksum
How to use checksums
3c545e1d006b6b769e20a9f6bc9a5c7aac093aa05392ad0166e9a41f94a88607
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.14

Release files / waveforms-3.1.0-cp312-cp312-macosx_10_13_universal2.whl

Download URL waveforms-3.1.0-cp312-cp312-macosx_10_13_universal2.whl
Size 848.3 kB
Tags CPython 3.12 macOS 10.13+ universal2 (ARM64, x86-64)
SHA-256 checksum
How to use checksums
5f22bfb794a23ce1c9c9f4c2e400b2fb35c45f928e8b74b739e9bdf81a734ecf
BLAKE2b-256 checksum
How to use checksums
9d35528573593be26e2da9fa3d5a3801466a3d196c13ae7195ab57cfd4484ab2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.10

Release files / waveforms-3.1.0-cp311-cp311-win_amd64.whl

Download URL waveforms-3.1.0-cp311-cp311-win_amd64.whl
Size 369.0 kB
Tags CPython 3.11 Windows x86-64
SHA-256 checksum
How to use checksums
ede1f36dc83fe27bd5d7b82f093c6290ef74c4e805196492151909c5a257ae3f
BLAKE2b-256 checksum
How to use checksums
29aea14329c8b049f571417798ccb7467e4d1b99744e8298233e9e936cffd6e9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.11.9

Release files / waveforms-3.1.0-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_34_x86_64.whl

Download URL waveforms-3.1.0-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_34_x86_64.whl
Size 3.4 MB
Tags CPython 3.11 Linux glibc 2.17+ x86-64 Linux glibc 2.34+ x86-64
SHA-256 checksum
How to use checksums
ce55f829aa6dcaf3e47b2e7c8bf0063ec3335ac7482bcb67cfa21b9f83468f4f
BLAKE2b-256 checksum
How to use checksums
9bdc87bdb3154f04f7075a8224b84ec03dd872c92a387fc6e1e5ea4cded600a2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.11.16

Release files / waveforms-3.1.0-cp311-cp311-macosx_10_9_universal2.whl

Download URL waveforms-3.1.0-cp311-cp311-macosx_10_9_universal2.whl
Size 833.2 kB
Tags CPython 3.11 macOS 10.9+ universal2 (ARM64, x86-64)
SHA-256 checksum
How to use checksums
b8205bbc7a5c288f45f7084fd12e3d4b72b2ffa488b5f800dcf5eb1944816fe0
BLAKE2b-256 checksum
How to use checksums
d208c10f46bd315a620afb3c3383305d2b7b3c1a1f429ce3dce846e60525d4ac
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.11.9

Release files / waveforms-3.1.0-cp310-cp310-win_amd64.whl

Download URL waveforms-3.1.0-cp310-cp310-win_amd64.whl
Size 369.3 kB
Tags CPython 3.10 Windows x86-64
SHA-256 checksum
How to use checksums
d2a9d105942df9b77fdacd088bf693ffc69c46e45761e699db8a1e0eb1264c06
BLAKE2b-256 checksum
How to use checksums
35418d663ba6d9ca5cb1be4eb24e4ea6131987b1b454ee5d94e8a2fe3386edf5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.10.11

Release files / waveforms-3.1.0-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_34_x86_64.whl

Download URL waveforms-3.1.0-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_34_x86_64.whl
Size 3.1 MB
Tags CPython 3.10 Linux glibc 2.17+ x86-64 Linux glibc 2.34+ x86-64
SHA-256 checksum
How to use checksums
84c28ec64319aa54eeb9aa6455966270f10f9deb43bea01f0fa8c40c9487585e
BLAKE2b-256 checksum
How to use checksums
f42f5b4cc6c42fda9397928a6a0eadd8b2e3798382bda6efb556b563934c5c5e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.10.21

Release files / waveforms-3.1.0-cp310-cp310-macosx_10_9_universal2.whl

Download URL waveforms-3.1.0-cp310-cp310-macosx_10_9_universal2.whl
Size 836.5 kB
Tags CPython 3.10 macOS 10.9+ universal2 (ARM64, x86-64)
SHA-256 checksum
How to use checksums
823b921342ad3c9f9cdb58d957e553d10d4885adb2fa342e23c02ce76885f569
BLAKE2b-256 checksum
How to use checksums
6f35e6fdfc7756587712589b992e5fdd11eaa23efeb28e3242869f4bf4bc3611
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.10.11

Release history Release notifications | RSS feed

3.7.0

19 release files

3.4.0

19 release files

3.3.2

19 release files

3.3.0

19 release files

3.2.0

19 release files

This release

3.1.0 This release

19 release files

3.0.0

19 release files

2.3.0

19 release files

2.2.3

19 release files

2.2.2

19 release files

2.2.0

13 release files

2.1.0

13 release files

2.0.1

13 release files

1.9.4

10 release files

1.9.1

10 release files

1.8.9

10 release files

1.8.8

10 release files

1.8.7

10 release files

1.8.6

10 release files

1.8.5

10 release files

1.8.4

10 release files

1.8.1

10 release files

1.8.0

10 release files

1.7.9

10 release files

1.7.8

10 release files

1.7.7

10 release files

1.7.6

7 release files

1.7.5

7 release files

1.7.4

7 release files

1.7.3

7 release files

1.7.2

7 release files

1.7.1

7 release files

1.7.0

7 release files

1.6.11

7 release files

1.6.10

7 release files

1.6.9

7 release files

1.6.8

4 release files

1.6.7

7 release files

1.6.6

7 release files

1.6.5

7 release files

1.6.4

7 release files

1.6.3

7 release files

1.6.2

7 release files

1.6.1

7 release files

1.6.0

7 release files

1.5.99

7 release files

1.5.98

7 release files

1.5.97

9 release files

1.5.93

7 release files

1.5.92

7 release files

1.5.90

7 release files

1.5.89

7 release files

1.5.87

7 release files

1.5.86

7 release files

1.5.85

7 release files

1.5.84

7 release files

1.5.83

7 release files

1.5.81

7 release files

1.5.80

7 release files

1.5.79

7 release files

1.5.78

7 release files

1.5.77

7 release files

1.5.76

7 release files

1.5.75

5 release files

1.5.74

5 release files

1.5.63

7 release files

1.5.62

7 release files

1.5.61

5 release files

1.5.60

2 release files

1.5.59

2 release files

1.5.57

2 release files

1.5.56

5 release files

1.5.55

5 release files

1.5.54

7 release files

1.5.53

7 release files

1.5.52

7 release files

1.5.51

7 release files

1.5.50

7 release files

1.5.47

7 release files

1.5.42

2 release files

1.5.38

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page