Circuit models of stochastic genetic networks