Skip to main content

No project description provided

Project description

https://github.com/qc-design/plaquette-graph/actions/workflows/tests_linux.yml/badge.svg https://github.com/qc-design/plaquette-graph/actions/workflows/docs_linux.yml/badge.svg

About

The plaquette-graph plugin extends the Plaquette error correction software, providing a fast graph library written in C++.

Installation

The C++ tests/examples and python bindings can be built independently by

cmake -Bbuild -G Ninja -DPLAQUETTE_GRAPH_BUILD_TESTS=On -DPLAQUETTE_GRAPH_BUILD_BINDINGS=On
cmake --build ./build

You can run the C++ backend tests with

make test-cpp

You can install just the python interface with (this quietly builds the C++ backend):

pip install -r requirements.txt
pip install .

or get the latest stable release from PyPI

pip install plaquette_graph

You can run the python frontend tests with

make test-python

To generate the documentation you will need to install graphviz and doxygen. Then run

pip install -r doc/requirements.txt
make docs
firefox ./doc/_build/html/index.html

Usage

The primary graph class is SparseGraph, an undirected immutable graph structure stored in CSR format for extremely fast lookup of neighbouring vertices and edges. See the documentation for other types of graphs we support.

Python Frontend

import plaquette_graph as pg

edges = [(0, 1), (0, 2), (1, 2)]
num_vertices = 3
graph = pg.SparseGraph(num_vertices, edges)

C++ Backend

#include "SparseGraph.hpp"

int main(int argc, char *argv[]) {

  using namespace Plaquette;
  std::vector<std::pair<size_t,size_t>> edges = {{0,1},{0,2},{1,2}};
  size_t num_vertices = 3;
  auto graph = SparseGraph(num_vertices, edges);

}

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

plaquette_graph-0.0.1a0-cp311-cp311-win_amd64.whl (1.1 MB view hashes)

Uploaded CPython 3.11 Windows x86-64

plaquette_graph-0.0.1a0-cp311-cp311-musllinux_1_1_x86_64.whl (638.2 kB view hashes)

Uploaded CPython 3.11 musllinux: musl 1.1+ x86-64

plaquette_graph-0.0.1a0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (114.0 kB view hashes)

Uploaded CPython 3.11 manylinux: glibc 2.17+ x86-64

plaquette_graph-0.0.1a0-cp311-cp311-macosx_10_9_x86_64.whl (83.2 kB view hashes)

Uploaded CPython 3.11 macOS 10.9+ x86-64

plaquette_graph-0.0.1a0-cp310-cp310-win_amd64.whl (1.1 MB view hashes)

Uploaded CPython 3.10 Windows x86-64

plaquette_graph-0.0.1a0-cp310-cp310-musllinux_1_1_x86_64.whl (638.2 kB view hashes)

Uploaded CPython 3.10 musllinux: musl 1.1+ x86-64

plaquette_graph-0.0.1a0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (114.1 kB view hashes)

Uploaded CPython 3.10 manylinux: glibc 2.17+ x86-64

plaquette_graph-0.0.1a0-cp310-cp310-macosx_13_0_arm64.whl (79.1 kB view hashes)

Uploaded CPython 3.10 macOS 13.0+ ARM64

plaquette_graph-0.0.1a0-cp310-cp310-macosx_10_9_x86_64.whl (83.3 kB view hashes)

Uploaded CPython 3.10 macOS 10.9+ x86-64

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page