Analog computing with optical and microwave bosonic systems