BPSK can be calculated by multiplying your carrier wave (sinusoidal wave form) with a bipolar bit stream. (for example 1 = 1V, 0 =-1). The multiplication assures that the sine wave inverses (flips around the time axis). This means you need a sine wave source, your bipolar bit streams source, and an (analog) multiplier.
Basically QPSK is the mathematical sum of two BPSK signals, but the sinusoidal wave forms are 90 degrees out of phase. This means you have to split your bit stream in two streams (with half the bitrate).
In real world it is more difficult; to reduce the bandwidth of the signal, transitions from one state to another state are not instantaneous but go smoothly. This results in many variations on the QPSK scheme (constant envelope QPSK, offset QPSK, etc). this also implicated the generation as you have to shape the transitions from your two bit streams.
If you apply a filter to suppress harmonics, you can use a bipolar square wave source instead of sine wave source. When spectral efficiency is not important, you can use digital multiplication (exor function) for the multipliers.