Self-testing of Quantum Circuits