Understanding quantum circuits