ThRust is a software framework for thermodynamic and probabilistic computing.

Overview

ThRust

ThRust is a Rust crate that provides a framework for thermodynamic and probabilistic computing. This package currently supports the following features:

  • Basic pbit gates: COPY, NOT, AND, OR.
  • Basic p-circuit compilation and composability.
  • p-circuit simulation through Markov Chain Monte Carlo sampling.

Note: This repository is in early development, there could be frequent breaking changes until the first stable release.

Installation

To install this crate, run the following command:

cargo add th-rust

Tutorial

GridPbit's are used to construct a 2D lattice.

let p0 = GridPbit::new(0, 0);
let p1 = GridPbit::new(0, 1);

This construction can be visualized in the following way:

Pbits can then be used as inputs to probabilistic spin logic (PSL) gates:

let cp0 = Copy::new(p0, p1);

A set of PSL gates can be used to construct a p-circuit:

let circuit = Circuit::new();
circuit.append(Box::new(cp0));
circuit.compile();

Alternatively, circuits can be created from a vector of PSL gates:

let circuit = Circuit::from_vector(vec![Box::new(cp0)]);
circuit.compile();

Finally, create a new simulator to find the ground state configurations via Markov chain Monte Carlo

let mut sim = MCMC::new(circuit);
sim.run();

Composability

ThRust also implements basic p-circuit composability. For example, here's an example of a two-gate p-circuit:

let p1 = GridPbit::new(0, 0);
let p2 = GridPbit::new(0, 1);
let p3 = GridPbit::new(1, 0);
let p4 = GridPbit::new(2, 0);
let p5 = GridPbit::new(2, 1);

let mut circuit = Circuit::new();
circuit.append(Box::new(And::new(p1, p2, p3)));
circuit.append(Box::new(Or::new(p3, p4, p5)));
circuit.compile();

let mut sim = MCMC::new(circuit);
sim.run();

Future Additions

Running list of features to implement:

  • Circuit compilation for disjoint circuits
  • More robust algorithm for circuit compilation
  • Better plotting implementation with more options
  • Compute and report observables including confiuration energy
  • Enforce connectivity constraints
  • Compile high level code for FPGA hardware implementations

References

Various references to learn more about probabilistic computing.

  1. Thermodynamic AI and the fluctuation frontier
  2. p-Bits for Probabilistic Spin Logic
  3. Massively Parallel Probabilistic Computing with Sparse Ising Machines

Citation

If you use this repository, please cite!

License

See the LICENSE file.

You might also like...
A Machine Learning Framework for High Performance written in Rust
A Machine Learning Framework for High Performance written in Rust

polarlight polarlight is a machine learning framework for high performance written in Rust. Key Features TBA Quick Start TBA How To Contribute Contrib

zenoh-flow aims at providing a zenoh-based data-flow programming framework for computations that span from the cloud to the device.

Eclipse Zenoh-Flow Zenoh-Flow provides a zenoh-based dataflow programming framework for computations that span from the cloud to the device. ⚠️ This s

High performance distributed framework for training deep learning recommendation models based on PyTorch.
High performance distributed framework for training deep learning recommendation models based on PyTorch.

PERSIA (Parallel rEcommendation tRaining System with hybrId Acceleration) is developed by AI platform@Kuaishou Technology, collaborating with ETH. It

Simple WIP GPGPU framework for Rust built on top of wgpu

gpgpu A simple GPU compute library based on wgpu. It is meant to be used alongside wgpu if desired. To start using gpgpu, just create a Framework inst

Accel: GPGPU Framework for Rust

Accel: GPGPU Framework for Rust crate crates.io docs.rs GitLab Pages accel CUDA-based GPGPU framework accel-core Helper for writing device code accel-

Multi-agent (path finding) planning framework

multi-agent (path finding) planning framework Mapf is a (currently experimental) Rust library for multi-agent planning, with a focus on cooperative pa

☁ Puff ☁ - The deep stack framework.
☁ Puff ☁ - The deep stack framework.

☁ Puff ☁ Python with an async runtime built-in Rust for GraphQL, ASGI, WSGI, Postgres, PubSub, Redis, Distributed Tasks, and HTTP2 Client. What is Puf

Stable Diffusion v1.4 ported to Rust's burn framework
Stable Diffusion v1.4 ported to Rust's burn framework

Stable-Diffusion-Burn Stable-Diffusion-Burn is a Rust-based project which ports the V1 stable diffusion model into the deep learning framework, Burn.

A Framework for Production-Ready Continuous Machine Learning
A Framework for Production-Ready Continuous Machine Learning

CML "Domain generalization is dead, Continuous Machine Learning lives forever." —— an iKun CML is a framework for production-ready continuous machine

Owner
Chase Zimmerman
amateur quantum physicist
Chase Zimmerman
Damavand is a quantum circuit simulator. It can run on laptops or High Performance Computing architectures, such CPU distributed architectures or multi GPU distributed architectures.

Damavand is a code that simulates quantum circuits. In order to learn more about damavand, refer to the documentation. Development status Core feature

prevision.io 6 Mar 29, 2022
Kuintessence - Open Source HPC Computing Orchestration System

Kuintessence is an advanced computing orchestration system designed to revolutionize HPC workload and cluster management, to empower HPC users by allowing them to concentrate on their scientific ideas rather than getting bogged down by HPC environment complications, and enhance research productivity to its fullest potential.

National Supercomputing Center in Jinan 4 Aug 31, 2023
Orkhon: ML Inference Framework and Server Runtime

Orkhon: ML Inference Framework and Server Runtime Latest Release License Build Status Downloads Gitter What is it? Orkhon is Rust framework for Machin

Theo M. Bulut 129 Dec 21, 2022
A fast, safe and easy to use reinforcement learning framework in Rust.

RSRL (api) Reinforcement learning should be fast, safe and easy to use. Overview rsrl provides generic constructs for reinforcement learning (RL) expe

Thomas Spooner 139 Dec 13, 2022
Machine learning framework for building object trackers and similarity search engines

Similari Similari is a framework that helps build sophisticated tracking systems. The most frequently met operations that can be efficiently implement

In-Sight 71 Dec 28, 2022
Framework and Language for Neuro-Symbolic Programming

Scallop Scallop is a declarative language designed to support rich symbolic reasoning in AI applications. It is based on Datalog, a logic rule-based q

null 27 Dec 14, 2022
A Rust machine learning framework.

Linfa linfa (Italian) / sap (English): The vital circulating fluid of a plant. linfa aims to provide a comprehensive toolkit to build Machine Learning

Rust-ML 2.2k Jan 2, 2023
Open Machine Intelligence Framework for Hackers. (GPU/CPU)

Leaf • Introduction Leaf is a open Machine Learning Framework for hackers to build classical, deep or hybrid machine learning applications. It was ins

Autumn 5.5k Jan 1, 2023
Xaynet represents an agnostic Federated Machine Learning framework to build privacy-preserving AI applications.

xaynet Xaynet: Train on the Edge with Federated Learning Want a framework that supports federated learning on the edge, in desktop browsers, integrate

XayNet 196 Dec 22, 2022
Tangram is an automated machine learning framework designed for programmers.

Tangram Tangram is an automated machine learning framework designed for programmers. Run tangram train to train a model from a CSV file on the command

Tangram 1.4k Dec 30, 2022