SGate function

Apply a SGate