BrainPy-style Modeling#
The BrainPy-style layer is the native modeling surface of brainpy.state: a
library of composable spiking neurons, synapses, synaptic outputs, projections,
short-term plasticity, and readouts that you assemble into networks and drive
with the brainstate transform primitives. The same building blocks serve
both worlds — biophysical simulation and gradient-based, brain-inspired
training — because every model is a differentiable, state-based Module.
How to use this guide#
Four sequential, learning-oriented notebooks that take you from a single neuron to a trained spiking network. Read them in order the first time.
Goal-directed recipes, split into a Simulation track and a Training track. Jump straight to the task you have in front of you.
There is no separate model catalog: the autodoc API reference is the directory. Browse neurons, synapses, projections, and outputs by family, with full signatures and docstrings.
Tutorials vs. how-to#
The two sections answer different questions, in the spirit of the Diátaxis framework:
Tutorials are a guided lesson. They are sequential, they assume no prior knowledge of the API, and each one builds on the last. Their job is to give you a working mental model of how neurons, synapses, projections, and the transform loops fit together.
How-to guides are task recipes. They assume you already know the basics and want to accomplish one concrete thing — choose a neuron model, swap a synaptic output, add a transmission delay, train through a long rollout without exhausting memory. Each is independent; read only the one you need.
For the why behind the design — the State paradigm, physical units, and the AlignPre/AlignPost projection scheme that ties simulation and learning together — see the Core Concepts spine. Tutorials and how-to guides link back to the relevant concept chapters as they go.