Initial implementation of gates, circuit and validation