Dead gate elimination in hybrid quantum–classical programs | Synapse