Compensation of losses in photodetection and in quantum-state measurements | Synapse