Propagation and amplification of molecular information using a photoresponsive molecular switch