RustSFQ
A domain-specific language for constructing Single Flux Quantum (SFQ) circuits in Rust.
⚠️ This project is in active development and considered beta. APIs and behavior may change without notice.
Documentation is available at: https://mebuki-mebuki.github.io/rust_sfq/
Features
-
Gate-level SFQ circuit design in Rust
Define Single Flux Quantum (SFQ) circuits at the gate level using a Rust-native DSL. -
Automatic wire name generation with optional labels
Wire names are automatically generated to ensure uniqueness, but you can also assign explicit labels when needed. -
Input-output consistency validation
The system guarantees that all wires satisfies input-output consistency. For example, no wire can be used multiple times unless explicitly split using aSplitgate. -
Multiple simulation netlist formats supported
Export circuits to various netlist formats for use in different SFQ simulation or analysis tools.
Example
DSL description for half adder
use *;
Output in SPICE format
.subckt HalfAdder a b clk c s
XSPLIT1 a _XSPLIT1_q1 _XSPLIT1_q2 THmitll_SPLIT
XSPLIT2 b _XSPLIT2_q1 _XSPLIT2_q2 THmitll_SPLIT
XSPLIT3 clk clk_1 _XSPLIT3_q2 THmitll_SPLIT
XAND4 _XSPLIT1_q1 _XSPLIT2_q1 clk_1 c THmitll_AND
XXOR5 _XSPLIT1_q2 _XSPLIT2_q2 _XSPLIT3_q2 s THmitll_XOR
.ends
Installation
Add this crate to your Cargo.toml:
[]
= "0.1.3"
Changelog
See the CHANGELOG for a list of updates and version history.