pyEPR — Energy-Participation-Ratio Framework#

Version: 1.0.0 | License: BSD-3-Clause | GitHub | PyPI

pyEPR overview

pyEPR is an open-source Python library for the automated design and quantization of Josephson quantum circuits. It bridges classical distributed microwave simulation (Ansys HFSS) and quantum circuit Hamiltonians using the energy-participation ratio (EPR) method.

Simulate

Run an eigenmode simulation in Ansys HFSS with junction inductances. No manual circuit diagram needed — just the 3-D geometry.

Extract

Compute energy participation ratios pmj and zero-point phase fluctuations φzpf for every mode and junction.

Diagonalize

Numerically diagonalize the full Josephson Hamiltonian to get dressed frequencies, anharmonicities, and the χ matrix.

HFSS junction setup animation — Xmon qubit
New in v0.9.6 — cross-platform gRPC backend (Linux · macOS · Windows)

pyEPR now ships a second HFSS transport through Ansys’s official PyAEDT library — no COM, no pywin32, works on Linux and macOS for the first time.

pip install "pyEPR-quantum[pyaedt]"
from pyEPR.ansys_pyaedt import PyaedtDistributedAnalysis
eprd = PyaedtDistributedAnalysis(pinfo, aedt_version="2026.1")
eprd.do_EPR_analysis()   # pure gRPC — identical physics, cross-platform

Physics and results are identical to the COM path — validated digit-for-digit. Contributed by Joey Yaker. See PyAEDT (gRPC) HFSS backend for full details.


Quick install#

pip install pyEPR-quantum
conda install -c conda-forge pyepr-quantum
uv pip install pyEPR-quantum

No Ansys licence? Start with Using pyEPR without Ansys HFSS or open Tutorial 6 on Binder.


Five-line quickstart#

import pyEPR as epr

pinfo = epr.ProjectInfo(project_path=r'C:\sims', project_name='my_chip',
                         design_name='qubit_cavity')
pinfo.junctions['jQ'] = {'Lj_variable':'Lj1', 'rect':'junc_rect',
                          'line':'junc_line', 'Cj_variable':'Cj1'}
eprd = epr.DistributedAnalysis(pinfo)
eprd.do_EPR_analysis()
epra = epr.QuantumAnalysis(eprd.data_filename)
epra.analyze_all_variations(cos_trunc=8, fock_trunc=15)

See the Quick-start examples page for more complete examples including the no-HFSS numerical workflow.


Contents#

Indices and tables#