JUNIPER¶
Welcome to JUNIPER, the GPU Accelerated Python Implementation of CEDAR. JUNIPER is a simulation library for neural dynamic architectures. It combines a small frontend for connecting processing elements with a JAX backend that compiles the graph into simulation kernels.
The library is centered on Dynamic Field Theory, where continuous activation fields evolve over time under input, recurrent interaction, resting dynamics, and noise. JUNIPER also includes general array operations, algebraic transforms, image-processing steps, robotics coordinate transforms, TCP I/O, recording, plotting, and reusable nested circuits.
Minimal Example¶
import numpy as np
import juniper as jp
arch = jp.get_arch("example")
inp = jp.CustomInput("inp", shape=(50,))
inp.set_data(np.ones((50,), dtype=np.float32))
field = jp.NeuralField("field", shape=(50,), resting_level=-5.0)
inp >> field
arch.compile(warmup=1)
recording, timing = arch.run_simulation(
num_steps=100,
steps_to_record=["field", "field.activation"],
)
recording.plot(keys=["field.activation"])
Recommended Reading Order¶
For most simulations, use arch.compile() and arch.run_simulation(). For finer control, compile(circuit) returns a CompiledCircuit that can be passed to public functions such as trace, reset_state, and run_simulation.