Implementation of QuCircuit