Skip to content

Repository files navigation

pyzxdb

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.

Installation

Install directly from GitHub (no clone needed):

pip install git+https://github.com/q-sip/pyZXdb.git

To 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

Example

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.py

Building the Documentation

The 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 serve

The site will be available at http://localhost:8000.

3. Build a static site

cd q-sip-docs
mkdocs build

The rendered HTML will be written to q-sip-docs/site/.

About

An addon for PyZX implementing functionality for both graph and relational databases

Resources

Stars

3 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages