Database backends addon for PyZX, providing Neo4j, Memgraph, and Apache AGE (PostgreSQL) support for storing and querying ZX-diagrams.
pyzxdb is not published on PyPI. Install it directly from the GitHub repository.
Install directly from GitHub (no clone needed):
pip install git+https://github.com/q-sip/pyZXdb.gitTo pin a specific tag or commit:
pip install git+https://github.com/q-sip/pyZXdb.git@<tag-or-commit>Install from a local clone (recommended for development):
git clone https://github.com/q-sip/pyZXdb.git
cd pyZXdb
pip install -e .To use it as a dependency in another project, add this line to its requirements.txt:
pyzxdb @ git+https://github.com/q-sip/pyZXdb.git
See example.py for an end-to-end demo that exercises each backend (vanilla, age, neo4j, memgraph). It uses pyzx_db_addon.force_backend(...) to rebind pyzx.Graph so that standard PyZX operations (e.g. pyzx.generate.cliffordT, pyzx.simplify.full_reduce) run against the selected database. Run it with:
python example.pyThe project documentation lives in q-sip-docs/ and is built with MkDocs.
1. Install the docs dependencies
pip install -e ".[docs]"2. Serve the documentation locally
cd q-sip-docs
mkdocs serveThe site will be available at http://localhost:8000.
3. Build a static site
cd q-sip-docs
mkdocs buildThe rendered HTML will be written to q-sip-docs/site/.