Skip to main content

Homological Observability

This package provides tools for analyzing the recoverability of accumulated cycle histories in finite-state Markov jump processes. Use it to study your own network, compare observation schemes, and reproduce the paper's finite-model calculations.

A state snapshot records where a system is; its cycle history records the net circulation accumulated around the network. At finite temporal resolution, the same sequence of snapshots can hide different net windings, even when all transition rates are known. Longer observation adds both snapshots and history to recover. How rapidly must sampling improve to keep pace, and how can additional counters reduce that requirement?

What the theory establishes. The paper organizes unresolved cycle differences into an integer hierarchy and derives the asymptotic sampling conditions for recovering accumulated windings. Its information phase diagram describes how residual uncertainty grows as observation time and sampling resolution change. These transitions persist at equilibrium under detailed balance. The scientific scope explains the assumptions and physical interpretation.

Read the paper · Reproduce the calculations · Cite

Analyze your own network. Provide its transition graph and optional integer counter rules. Each counter accumulates signed integer increments on edge crossings. Find which cycle differences remain hidden, how sampling must scale to resolve them, and which counter choices reveal different or redundant information. The command line and Python API return explanatory reports backed by exact integer calculations.

Task Inputs Guide
Analyze your own network and observation scheme Graph, optional counters and sampling parameters analyze
Compare counter configurations Several counter choices on one graph compare
Construct a critical-limit experiment Graph, optional counters, exact rates, critical layer and intensity critical
Reproduce the paper's calculations Included models and reference data reproduce

The graph must be finite, connected, and simple, with positive transition-rate support in both directions. The recording protocol uses regular noiseless state snapshots and optional exact counters. Network and counter analyses need no rate values. The critical experiment uses exact positive rates to compute path weights and limiting mark distributions.

Install

Use Python 3.11–3.13. In your working directory, create a virtual environment and install the package from PyPI. On macOS or Linux:

python3 -m venv .venv
.venv/bin/python -m pip install homological-observability==1.2.1

On Windows PowerShell:

py -3.12 -m venv .venv
.venv\Scripts\python.exe -m pip install homological-observability==1.2.1

Python 3.11 or 3.13 can be selected in place of 3.12. On Windows, use .venv\Scripts\homological-observability.exe in place of .venv/bin/homological-observability below, and .venv\Scripts\python.exe in place of .venv/bin/python. Activation is optional. Installation needs internet access; examples and reference data are included in the package.

Try a counter comparison

A four-state ring and a seven-state ring are connected by a bridge. You can count signed crossings on either ring: which choice postpones the earliest remaining cycle-history ambiguity?

.venv/bin/homological-observability study-example bridge --output bridge-study.json
.venv/bin/homological-observability compare bridge-study.json --output-dir bridge-results

Open bridge-results/comparison.md. The study completes all six candidates; three of its results are:

Configuration First hidden layer Remaining hidden rank
Snapshots only 2 2
Counter x on the four-state ring 4 1
Counter y on the seven-state ring 2 1

Counting the short ring postpones the first unresolved cycle direction to layer four. Counting the long ring leaves the earlier ambiguity in place. The two counters retain different information, even though each leaves one hidden direction. The study also shows that a weighted counter can tie a scalar objective without retaining the same information, and that a proportional extra channel is redundant.

The worked comparison explains the hidden layers and the example's sampling law. COMPLETE records the scope of the calculation; the report describes the remaining ambiguity. The bundle contains structured results, exact witnesses, the input, and replay instructions. Each run uses a new output directory.

Reproduce the paper evidence

After installing the package above, run:

.venv/bin/homological-observability reproduce --check --output-dir generated_results

This command regenerates the paper's finite-model calculations, compares them with the packaged reference data, and writes generated_results/REPORT.md and generated_results/companion_summary.png. Successful verification prints PASS: all calculation checks completed and PASS: generated tables agree with frozen reference results. The output directory also contains the numerical CSV tables. For pinned dependencies and the reader-side test suite, follow the reproduction guide.

Analyze your own network

For one observation scheme, prepare my-model.json with your graph, optional counter rules, and any sampling parameters. The model input guide explains the fields and includes a complete example. Run:

.venv/bin/homological-observability analyze my-model.json

To compare several counter configurations, adapt the bridge study. Save a copy of bridge-study.json as my-study.json. Update the study and model names, research question, graph, and candidate counters. Replace the example's alpha: 0.375 with your own sampling exponent, or remove it for a comparison of graph and counter information alone. Keep an explicit cycle enumeration budget, then run:

.venv/bin/homological-observability compare my-study.json --output-dir my-results

The study editing guide walks through these choices. The input guide describes signed edge increments, sampling units, validation, and resource limits. Every exported study also includes a model file for each candidate, ready to inspect separately with analyze.

Python API

Run this with the virtual environment's Python interpreter:

import homological_observability as ho

study = ho.load_study_example("bridge")
comparison = ho.compare_configurations(study)
print(ho.render_comparison_text(comparison))

Use ho.load_study("my-study.json") for your own study. The output guide describes structured results and renderers, including single-configuration analysis and rate-dependent critical experiments.

Interpretation and further reading

Integer lattice calculations and finite catalogues are exact when complete. Sampling thresholds, phase labels, and entropy coefficients describe long-time asymptotic limits under the stated model assumptions. Choosing a sampling interval for a specified finite-run error tolerance requires additional risk analysis. Cycle enumeration can grow exponentially; use computation budgets and check the reported completeness of each result.

Theory and citation

The paper map connects the software's calculations to the theoretical results and paper evidence.

Cite the paper for theoretical results and the software for computations. When your work uses both, cite them separately. The citation guide provides the full paper and software references and a copyable paper BibTeX entry. Record the software version used and the Git commit for a source checkout.

Authors: HongZheng Liu, YiNuo Tian, Zhiyue Wu, and Jianqun Cheng.

The software is distributed under the MIT License. The archived paper is licensed under CC BY 4.0.

Metadata

Release files for homological-observability 1.2.1

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

Source distribution (sdist)

Source distribution for homological-observability 1.2.1
File Size Uploaded Provenance
homological_observability-1.2.1.tar.gz 343.8 kB With provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for homological-observability 1.2.1
File Interpreter ABI Platform
homological_observability-1.2.1-py3-none-any.whl Python 3 none any Details

Total release size: 448.1 kB

Release files / homological_observability-1.2.1.tar.gz

Download URL homological_observability-1.2.1.tar.gz
Size 343.8 kB
Tags Source
SHA-256 checksum
How to use checksums
b8712a8b9e15927b455d503af5424c3140feb6ed862b66df23ebb6424a10bbdc
BLAKE2b-256 checksum
How to use checksums
924933b409312d52acd3da15a6b22c2099fe09b681b1c72255e5d68604518705
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 23, 2026.

Transparency log

Release files / homological_observability-1.2.1-py3-none-any.whl

Download URL homological_observability-1.2.1-py3-none-any.whl
Size 104.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
36adc6cfd66806b447d0c3da551f283abf93182a1082f359c6ddd2e9774b1eb4
BLAKE2b-256 checksum
How to use checksums
83ed4cbcdddf78eed6d37a3f0f04664d18bab2341df08a26837d3bc4ddb1b5db
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 23, 2026.

Transparency log

Security for homological-observability 1.2.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for homological_observability-1.2.1.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 23, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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