Circuit Theory for Analysis and Design of Spintronic Integrated Circuits