Computing Gradients of Quantum Circuits using Parameter Shift Rule