Similar to:
XACC 280 Week 5 Appendix F