  Graphical probabilistic circuit models of stochastic computing are more
powerful than the predominant deep learning models, but also have more
demanding requirements. For example, they require "programmable stochasticity",
e.g. generating two random binary bit streams with tunable amount of
correlation between the corresponding bits in the two streams. Electronic
implementation of such a system would call for several components leaving a
large footprint on a chip and dissipating excessive amount of energy. Here, we
show an elegant implementation with just two dipole-coupled magneto-tunneling
junctions (MTJ), with magnetostrictive soft layers, fabricated on a
piezoelectric film. The resistance states of the two MTJs (high or low) encode
the bits in the two streams. The first MTJ is driven to a random resistance
state via a current or voltage generating spin transfer torque and/or voltage
controlled magnetic anisotropy, while the second MTJ's resistance state is
determined solely by dipole coupling with the first. The effect of dipole
coupling can be varied with local strain applied to the second MTJ with a local
voltage (~0.2 V) and that varies the correlation between the resistance states
of the two MTJs and hence between the bits in the two streams (from 0% to
100%). This paradigm can be extended to arbitrary number of bit streams.
