Application of quantum optical effects in switching