John Henry Cardinal Newman is correct that (assuming that it was hypothetically possible) a heretical pope would ipso facto (i.e., by the fact itself) fall from office:
(Newman, John Henry. Certain Difficulties Felt by Anglicans in Catholic Teaching Considered, Volume II. London: Longmans, Green, and Co., 1892, p. 377)