The present invention provides a device for analyzing the composition of a heteropolymer comprising a carbon nanotube through which the heteropolymer is driven by electrophoresis. The carbon nanotube also serves as one electrode in a reading circuit. One end of the carbon nanotube is held in close proximity to a second electrode, and each end of the carbon nanotube is functionalized with flexibly-tethered chemical-recognition moieties, such that one will bind one site on the emerging polymer, and the second will bind another site in close proximity, generating an electrical signal between the two electrodes when the circuit is completed by the process of chemical recognition.