Skip to main content

AIQ — Impact Automata on Quivers

PyPI version Python 3.10+ License: MIT

An algebraic framework for modeling dynamics on complex systems using quiver representations, path algebras, and Brauer configuration algebras.

Based on: Zainea Maya & Moreno Cañadas, "Autómatas de Impacto sobre Quivers: Un Marco Algebraico para Modelar Dinámicas de Sistemas Complejos".

Features

Module Description
quiver Quiver Q=(Q₀,Q₁,s,t) with adjacency matrices, BFS distances, O(1) degree queries
path_algebra Path algebras kQ, ideals I, quotient algebras kQ/I
impact Impact degree, vector, Fundamental Neighborhood System (SFV), impact rates
automaton Impact automata (AIQ) with SI/SIS/SIR evolution rules, Monte Carlo
brauer Brauer configuration algebras: δ_B, entropy H(B), dimension formulas
morphisms Morphisms of quivers and AIQs (base, dynamic, algebraic)
datasets Paper examples + Cora + cit-HepPh citation networks
validation Temporal validation with real citation data
visualization Quiver drawing, heatmaps, evolution grids, validation dashboard

Installation

pip install aiq-quivers

For development:

git clone https://github.com/izaineam/aiq-quivers.git
cd aiq-quivers
pip install -e ".[dev]"

Quick Start

Impact Automaton (AIQ)

from aiq import Quiver, AIQ

# Define a citation quiver
Q = Quiver(
    vertices=["P1", "P2", "P3", "P4", "P5"],
    arrows=[
        ("a1", "P1", "P2"), ("a2", "P1", "P3"),
        ("a3", "P2", "P4"), ("a4", "P3", "P4"),
        ("a5", "P3", "P5"), ("a6", "P4", "P5"),
    ],
)

# Create AIQ with SIR rule
aiq = AIQ(Q, states=["S", "R", "O"], evolution_rule="SIR",
          beta=1.0, recovery_prob=0.3)

# Set initial config: P1 is Relevant, rest Susceptible
aiq.set_initial_config({"P1": "R", "P2": "S", "P3": "S", "P4": "S", "P5": "S"})

# Run 10 steps
aiq.run(10, seed=42)
print(aiq.state_counts())

Brauer Configuration Analysis

from aiq.brauer import example_partitions_of_10

bc = example_partitions_of_10()
print(bc.summary())
# BrauerConfiguration(|Γ₀|=4, |Γ₁|=3, δ_B=13, H(B)=1.8339)
#   dim_k Λ_M = 45
#   dim_k Z(Λ_M) = 14
#   δ_B = 13
#   H(B) = 1.833927

# From citation network JSON
from aiq.brauer import brauer_from_citation_json
bc = brauer_from_citation_json("data/canadas_citation_network.json")
analysis = bc.brauer_analysis()

Path Algebra

from aiq import Quiver, PathAlgebra

Q = Quiver([1, 2, 3, 4],
           [("α₁", 1, 2), ("α₂", 1, 2), ("γ", 1, 3), ("β", 2, 4), ("δ", 3, 4)])

pa = PathAlgebra(Q)
assert pa.verify_matrix_equivalence()  # dim(e_i·kQ_k·e_j) == (A^k)_{ij}
print(f"dim(kQ) = {pa.total_dimension()}")  # 12

Key Concepts

  • Impact degree g(cᵢ, cⱼ): shortest directed path length (Def. 2.2)
  • Impact vector vec_g(cᵢ, cⱼ): walk counts by length (Def. 2.5)
  • SFV {A_k(c)}: fundamental neighborhood system (Def. 2.3)
  • Impact rate i^t(c): weighted influence from neighbors (Def. 2.9)
  • Brauer factor δ_B = Σ μ(m)·val(m): algebraic impact invariant
  • Brauer entropy H(B): Shannon entropy of the configuration

Running Tests

pytest tests/ -v

Citation

@article{zainea2025aiq,
  title={Aut{\'o}matas de Impacto sobre Quivers:
         Un Marco Algebraico para Modelar Din{\'a}micas de Sistemas Complejos},
  author={Zainea Maya, Isaac and Moreno Ca{\~n}adas, Agust{\'i}n},
  year={2025},
  institution={Universidad Nacional de Colombia}
}

License

MIT License. See LICENSE.

Metadata

Release files for aiq-quivers 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 aiq-quivers 1.2.1
File Size Uploaded Provenance Actions
aiq_quivers-1.2.1.tar.gz 84.0 kB With provenance Details for aiq_quivers-1.2.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for aiq-quivers 1.2.1
File Interpreter ABI Platform Actions
aiq_quivers-1.2.1-py3-none-any.whl Python 3 none any Details for aiq_quivers-1.2.1-py3-none-any.whl

Total release size: 157.4 kB

Release files / aiq_quivers-1.2.1.tar.gz

Download URL aiq_quivers-1.2.1.tar.gz
Size 84.0 kB
Tags Source
SHA-256 checksum
How to use checksums
93e9bac886e1871ddf9c40db048290fa5212872c7686d90b84b1158a9f0aa45f
BLAKE2b-256 checksum
How to use checksums
49b93006909fccb6dad99c6221712f1ea5e70c4bcbc690034c041a5bec3fe259
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

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 Jun 9, 2026.

Transparency log

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

Download URL aiq_quivers-1.2.1-py3-none-any.whl
Size 73.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d0b1eda9a3d922f028771b26d272d7931cf847a03078468decb50f4b9d5856ef
BLAKE2b-256 checksum
How to use checksums
4495e0da8234a8bcbb5903703d178f4ab108a92e486e2c11b25d830d23a0755d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

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 Jun 9, 2026.

Transparency log

Security for aiq-quivers 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

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for aiq_quivers-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 Jun 9, 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