Skip to main content

SCCircuits

PyPI Docs DOI

SCCircuits is a Python package for numerical superconducting-circuit analysis. It focuses on matrix-based black-box quantization, dense Hamiltonian construction, spectroscopy workflows, and small research utilities for superconducting quantum circuits.

Documentation

The user-facing documentation is published at:

https://joanjcaceres.github.io/sccircuits/

Recommended starting points:

  • BBQ Overview explains the practical workflow from cQEDraw or circuit matrices to BBQ results.
  • BBQ Quickstart gives a runnable matrix example with frequencies and phase ZPFs.
  • BBQ Examples collects worked examples and the planned cQEDraw project-download example.
  • BBQ Validation explains the code-backed checks behind the matrix reductions and branch conventions.
  • BBQ Implementation Notes maps the mathematical derivation to the current BBQ implementation stages.
  • BBQ API shows how to call sccircuits.BBQ, read frequencies and phase ZPFs, and build Hamiltonians.
  • Circuit Matrix Quantization documents the matrix reductions, mode normalization, units, and branch phase zero-point fluctuations.

The site is intentionally incremental. BBQ is the first fully documented research workflow because it is currently the most mature path between cQEDraw and SCCircuits. The rest of the package should be documented through the same site as those workflows stabilize.

The Markdown source for the website lives in docs/. Build it locally with:

pixi run -e sccircuits docs-build

Companion GUI

cQEDraw is the companion web app for drawing and analyzing superconducting circuit graphs. A typical workflow is:

  1. Draw the circuit in cQEDraw.
  2. Export or copy the generated capacitance matrix, inverse-inductance matrix, and Josephson junction records.
  3. Pass those matrices and records to sccircuits.BBQ.
  4. Inspect mode frequencies, branch phase ZPFs, and Hamiltonian spectra in Python.

Installation

Recommended: pip

Researchers should install SCCircuits from PyPI:

python -m pip install sccircuits

This installs the pure-Python SCCircuits package plus NumPy, SciPy, Matplotlib, SymPy, and PyYAML from normal Python wheels. Pixi is not required to use the package.

Optional extras are available for notebook widgets, development, and docs:

python -m pip install "sccircuits[interactive]"
python -m pip install "sccircuits[dev]"
python -m pip install "sccircuits[docs]"

Development: Pixi

Pixi remains the recommended contributor environment because it keeps the NumPy/SciPy stack reproducible while developing and testing the repository.

git clone https://github.com/joanjcaceres/sccircuits.git
cd sccircuits
pixi run -e sccircuits install-dev
pixi run -e sccircuits test

For local editable development without Pixi:

python -m venv .venv
source .venv/bin/activate
python -m pip install -e ".[dev,interactive,docs]"

Performance Baseline

SCCircuits relies on NumPy and SciPy wheels for cross-platform BLAS/LAPACK linear algebra. The first public package does not compile native extensions or require GPU-specific backends.

To record a quick local diagonalization baseline:

python benchmarks/diagonalization_smoke.py

Quick Example

import numpy as np
from sccircuits import BBQ

capacitance_matrix = np.array(
    [
        [40e-15, -32.9e-15],
        [-32.9e-15, 40e-15],
    ]
)

inverse_inductance_matrix = np.array(
    [
        [1 / 1.23e-9, 0.0],
        [0.0, 1 / 1.23e-9],
    ]
)

bbq = BBQ(
    capacitance_matrix,
    inverse_inductance_matrix,
    nonlinear_branches=(0, 1),
)

print("Mode frequencies in GHz:", bbq.frequencies_ghz)
print("Branch phase ZPFs:", bbq.branch_phase_zpfs)

For cQEDraw exports with Josephson junction records, pass the records directly:

bbq = BBQ(
    capacitance_matrix,
    inverse_inductance_matrix,
    junctions=junctions,
)

BBQ keeps the junction row order when reporting branch_phase_zpfs and josephson_energies_ghz, so drawing tools can map results back to the original branches.

Core Modules

  • sccircuits.BBQ: black-box quantization from capacitance and inverse-inductance matrices.
  • sccircuits.Circuit: dense superconducting-circuit Hamiltonian construction and diagonalization.
  • sccircuits.TransitionFitter: transition-frequency fitting utilities.
  • sccircuits.PointPicker: interactive point selection for data analysis.

Development

Run the main checks with:

pixi run -e sccircuits test
pixi run -e sccircuits lint
pixi run -e sccircuits docs-build

Check the pip package path with:

python -m build
python -m twine check dist/*
python -m pip install dist/sccircuits-*.whl
python -m pip check
python tests/pip_smoke.py

If dependency resolution becomes inconsistent, recreate the Pixi environment:

pixi clean
pixi run -e sccircuits install-dev

License

This project is licensed under the MIT License. See LICENSE for details.

Contact

Joan Caceres - contact@joanjcaceres.com

Project link: https://github.com/joanjcaceres/sccircuits

Download files

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

Source Distribution

sccircuits-0.1.1.tar.gz (63.2 kB view details)

Uploaded Source

Built Distribution

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

sccircuits-0.1.1-py3-none-any.whl (56.1 kB view details)

Uploaded Python 3

File details

Details for the file sccircuits-0.1.1.tar.gz.

File metadata

  • Download URL: sccircuits-0.1.1.tar.gz
  • Upload date:
  • Size: 63.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for sccircuits-0.1.1.tar.gz
Algorithm Hash digest
SHA256 63b8537d4ef320033c6f1f19e358398cd62d490396e60216736ccb519fa3fcc8
MD5 528ef827c39ca7f9f3f580b8120d648b
BLAKE2b-256 65e0f63a9aa87a72e48c67a3c52f4f14f8a4db1233ff15512fc4bc9d15311513

See more details on using hashes here.

Provenance

The following attestation bundles were made for sccircuits-0.1.1.tar.gz:

Publisher: publish.yml on joanjcaceres/sccircuits

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

File details

Details for the file sccircuits-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: sccircuits-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 56.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for sccircuits-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 7ed6f7a8d27357ebd3abe05cea8458faed749839f15129ec62a8a47e3d553683
MD5 57d70727fbf44cc8d8f1eaa03e271a5b
BLAKE2b-256 fbc628074e2ee155d77f3e32dbd6a481a225a8f7262faf4b9d6019a3ee7a90e7

See more details on using hashes here.

Provenance

The following attestation bundles were made for sccircuits-0.1.1-py3-none-any.whl:

Publisher: publish.yml on joanjcaceres/sccircuits

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

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 files

0.1.0

2 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