Quadratic And Linear Optimization With Analog Circuits