Thermally reconfigurable loss in a passive optical cavity