Theory for a quantum modulated transistor