Optogenetic hardware and systems for control of neural circuits and biological functions with light