Develop a transition plan to find a better job before quitting. This is easier with today's electronic communications and good job market. When you have an offer, tell your supervisor first, and provide at least two weeks notice. Probably the most graceful exit is a prompt one. Don't burn any bridges by bad-mouthing anybody or anything.
Paths have a way of crossing later.
Make suggestions for your replacement if you have any. You like what you do, but your job or career field faces elimination. Look for the application of your work in other industries. For example, an ultrasound engineer or technician might be able to switch from a downsizing defense firm to a growing medical-equipment manufacturer. The Kiplinger Washington Editors, Inc.