(a) Schematic of a laser oscillator: a gain medium with complex refractive index n=n′+in′′, embedded in an optical cavity, emits outgoing coherent waves with defined phase and spatial pattern at frequency ω0 when the amount of amplification n′′ reaches a threshold value. (b) Schematic of the time-reversed laser oscillator that realizes a coherent perfect absorber: when the gain medium is replaced by an absorbing medium with complex refractive index n*=n′-in′′, incoming waves with definite phase and spatial pattern [the time-reversed waves of the lasing mode in (a)] are fully absorbed in the medium. (c) Typical behavior of total intensity reflection coefficient versus frequency in a simple two-port photonic device, comprising a slab of lossy material (like Si) of thickness a embedded in a fiber or waveguide (inset), excited at the two input sides. The red and blue lines show the spectral reflection curves for coherent input waves with controlled phase difference Δθ (Δθ=0, blue curve; Δθ=π, red curve). The dashed black line depicts the spectral reflection curve for incoherent input waves. The peaks in the coherent reflection curves correspond to the odd- and even-symmetric modes sustained by the slab structure.