Threshold Circuits and Quantum Gates