Atrial tachyarrhythmias including atrial tachycardia (AT) and atrial fibrillation (AF) are the most prevalent heart rhythm disorder and the major cause of morbidity in the USA. Electrotherapy has been effective in terminating AT/AF, but the high-energy biphasic shocks require sedation due to pain, can lead to myocardial stunning, and are associated with co-morbidities. Moreover, attempts to develop the implantable cardioverter defibrillator (ICD) technology for AF has failed so far due to pain caused by high energy shocks and inappropriate shocks, resulting in diminished quality of life or even death. Therefore, there is an unmet need for high-definition AF sensing to reduce inappropriate shocks and similarly, an unmet need for high-definition ultra-low energy electrotherapy to terminate AF. In this project, we present a novel approach to AF sensing and electrotherapy and redesign the ICD into cardiovascular implantable electronic device (CIED) of new generation. We will employ two break-through technological platforms to implement our novel method: (1) A novel conformal chiplet electronics real-time networks (CCERN) technology developed by co-investigator John Rogers and (2) an innovative transillumination optical mapping. We will conduct high-definition, panoramic, transillumination, optical mapping in conjunction with high-definition CCERN to (1) characterize the transmural AT/AF dynamics; (2) optimize the number of sensors needed to dynamically track the wavefronts, phase singularities, and excitable gaps, during AF; and (3) terminate AF using optimal definition ultra low-energy high-definition electrotherapy. This proposed work would advance our understanding of AF mechanisms and pave the path towards creating a targeted personalized therapy dynamically tailored for each arrhythmia episode for each individual patient.