For therapies based on human induced pluripotent stem cell (hiPSC)-derived cardiomyocytes (CM) to be effective, arrhythmias must be avoided. Towards achieving this goal, light-activated channelrhodopsin-2 (ChR2), a cation channel activated with 480 nm light, and a first generation halorhodopsin (NpHR1.0), an anion pump activated by 580 nm light, have been introduced into hiPSC. By using in vitro approaches, hiPSC-CM are able to be optogenetically activated and inhibited. ChR2 and NpHR1.0 are stably transduced into undifferentiated hiPSC via a lentiviral vector. Via directed differentiation, both wildtype hiPSC-CM (hiPSC(WT)-CM) and hiPSC(ChR2/NpHR)-CM are produced and subjected to both electrical and optical stimulation. Both hiPSC(WT)-CM and hiPSC(ChR2/NpHR)-CM respond to traditional electrical stimulation and produce similar contractility features but only hiPSC(ChR2/NpHR)-CM can be synchronized and inhibited by optical stimulation. Here it is shown that light sensitive proteins can enable in vitro optical control of hiPSC-CM. For future therapy, in vivo optical stimulation could allow precise and specific synchronization of implanted hiPSC-CM with patient cardiac rates and rhythms.