Skip to main content

Python toolkit for superconducting qubit simulation.

Project description

pysuqu logo

pysuqu

Python toolkit for superconducting qubit simulation.

English | 简体中文

version python license focus

English

pysuqu is the public package-first distribution of the pysuqu 2.0 codebase. This repository starts directly at version 2.0.0 and intentionally publishes the reusable library, public documentation, public tests, and public-safe demo notebooks only.

Public package Reproducible demos Public-safe scope
pysuqu/ exports the main simulation toolkit demo/ contains fresh notebooks with synthetic data only private legacy notebooks and exploratory materials stay out of this repo

Highlights

  • Superconducting qubit modeling utilities under pysuqu.qubit
  • Decoherence and noise-analysis workflows under pysuqu.decoherence
  • Public demo notebooks covering qubits, decoherence, waveforms, and coupler workflows
  • Public tests, benchmark harnesses, and packaging metadata prepared for the public 2.0.1 release

Installation

pip install -r requirements.txt
pip install -e .

To build distributable artifacts locally:

python -m build

Quick Start

import numpy as np

from pysuqu.qubit import AbstractQubit
from pysuqu.decoherence import ZNoiseDecoherence

qubit = AbstractQubit(
    frequency=5e9,
    anharmonicity=-250e6,
    frequency_max=6e9,
    qubit_type="Transmon",
    energy_trunc_level=12,
)

energies = qubit.get_energylevel()
print(f"f01 = {energies[1] / 2 / np.pi:.3e} Hz")

psd_freq = np.logspace(4, 8, 4000)
psd_s = 5e-16 / psd_freq + 4e-21

result = ZNoiseDecoherence(
    psd_freq=psd_freq,
    psd_S=psd_s,
    qubit_freq=5e9,
    qubit_anharm=-250e6,
).cal_tphi2(method="cal", idle_freq=5e9, is_print=False)

print(result.value, result.unit)

Documentation

Public Demo Notebooks

Repository Layout

pysuqu/
  pysuqu/        package source
  tests/          public test suite
  docs/           public documentation
  demo/           public tutorial notebooks and synthetic demo data
  benchmarks/     local performance benchmark harnesses
  requirements.txt
  setup.py
  pyproject.toml
  LICENSE

License

This repository is licensed under the GNU Affero General Public License v3.0 or later.

If pysuqu is helpful to your work, you are very welcome to watch the repository, fork it, and contribute improvements.

简体中文

pysuqupysuqu 2.0 的公开、以 Python 包为中心的发布仓库。这个仓库从 2.0.0 版本直接开始,对外只公开可复用的库代码、公开文档、公开测试,以及 使用公开安全合成数据重写后的 demo notebook。

公开包主体 可复现实例 公开范围控制
pysuqu/ 提供核心模拟能力 demo/ 提供新的公开 notebook 与合成数据 旧私有 notebook 与探索性材料不会进入本仓库

主要内容

  • pysuqu.qubit 中的超导量子比特建模能力
  • pysuqu.decoherence 中的退相干与噪声分析工作流
  • 覆盖单比特、退相干、波形门操作、多比特 coupler 工作流的公开 demo
  • 为公开 2.0.1 版本整理好的测试、benchmark harness 与发布元数据

安装

pip install -r requirements.txt
pip install -e .

如需本地验证构建产物:

python -m build

快速开始

import numpy as np

from pysuqu.qubit import AbstractQubit
from pysuqu.decoherence import ZNoiseDecoherence

qubit = AbstractQubit(
    frequency=5e9,
    anharmonicity=-250e6,
    frequency_max=6e9,
    qubit_type="Transmon",
    energy_trunc_level=12,
)

energies = qubit.get_energylevel()
print(f"f01 = {energies[1] / 2 / np.pi:.3e} Hz")

psd_freq = np.logspace(4, 8, 4000)
psd_s = 5e-16 / psd_freq + 4e-21

result = ZNoiseDecoherence(
    psd_freq=psd_freq,
    psd_S=psd_s,
    qubit_freq=5e9,
    qubit_anharm=-250e6,
).cal_tphi2(method="cal", idle_freq=5e9, is_print=False)

print(result.value, result.unit)

文档入口

公开 Demo

仓库结构

pysuqu/
  pysuqu/        包源码
  tests/          公开测试
  docs/           公开文档
  demo/           公开 notebook 与合成 demo 数据
  requirements.txt
  setup.py
  pyproject.toml
  LICENSE

许可证

本仓库采用 GNU Affero General Public License v3.0 或更高版本

如果 pysuqu 对你的工作有帮助,也非常欢迎你关注仓库、fork 项目并提交贡献。

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pysuqu-2.0.1.tar.gz (199.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pysuqu-2.0.1-py3-none-any.whl (116.0 kB view details)

Uploaded Python 3

File details

Details for the file pysuqu-2.0.1.tar.gz.

File metadata

  • Download URL: pysuqu-2.0.1.tar.gz
  • Upload date:
  • Size: 199.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for pysuqu-2.0.1.tar.gz
Algorithm Hash digest
SHA256 42710a3833c0ffa943d6a77ed1cc7dd61cd525b5dd5d4fc2d002e6959c5df363
MD5 f80b8a4b74f172477d92a680ff86002d
BLAKE2b-256 9eb4eca277cde8b7fa50b3d505338d42bb9e6226a32043679e98d4c477416745

See more details on using hashes here.

Provenance

The following attestation bundles were made for pysuqu-2.0.1.tar.gz:

Publisher: publish-pypi.yml on znb888/pysuqu

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pysuqu-2.0.1-py3-none-any.whl.

File metadata

  • Download URL: pysuqu-2.0.1-py3-none-any.whl
  • Upload date:
  • Size: 116.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for pysuqu-2.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 22b8e7aeea0ec2d8ba8d2131eef37efbfa9c82860954ca3b018dd0d206359fd5
MD5 8b1dbcab154cd04a9a86cb61eafabc10
BLAKE2b-256 009a3a14f5b9eab961a135ea6e7f41c3e97046a4fc0316bb0a95d38b06b42544

See more details on using hashes here.

Provenance

The following attestation bundles were made for pysuqu-2.0.1-py3-none-any.whl:

Publisher: publish-pypi.yml on znb888/pysuqu

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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