The above configuration is bridged or rigged in a form which resembles the letter "H" and hence the name H-bridge.
The special arrangement of the devices make it possible for driving the devices through two individual signal sources, one which decides the switching rate of the output while the other decides the RMS value of the output from the transformer.
The given circuit idea shows how a H-bridge circuit may be designed for a particular modified sine wave inverter application.
The two gates carry the 50 Hz signal from the source to T1 and T3 such that they conduct alternately.
Transistors T2 and T4 ae fed with the PWM pulses which switch ON together, however when T1 is conducting, T2 should remain shut OFF and similarly when T3 conducts T4 should remain OFF, the two diodes from the respective NAND gates takes care of the issue and allow only the relevant transistors to carry out the PWM switching.
Thus the NPN transistors are responsible for producing the regular 50 or 60 Hz pulses while the PNP transistors are responsible for breaking the square waves as per the PWM sections.
The resultant pulses generate the exact intended, optimized modified sine wave waveform at the output of the transformer.