How to gracefully leave a research lab (due to major change)? I'm a freshman electrical engineering student who has been working in a research lab for the past year. I decided a few months ago that I am going to change my major to computer science, and that I will be leaving the lab I'm still working at.

How can I gracefully leave this lab without burning bridges (I may want to use this job as a reference in the future)? Should I tell them I'm changing majors or will it be easier to not let them know that?
Nobody expects undergraduates to have their life plans all sorted out: if you tell the professor you are changing majors and planning to leave the lab, it shouldn't be all that shocking to them.

What you should do, however, is make sure that you leave things in good order.  Plan to complete your work for the current semester, and set up a plan with the professor and whoever else for how to leave things in a state where it will cause as little disruption in the work as possible.  This might be cleaning up your lab notebooks, or about finishing a certain set of experiments, or training another person who will take over your tasks.  The key is to have the discussion as early as possible, and make it clear that you take your responsibilities to the lab seriously, and want to act professionally in using your remaining time to wrap up and/or transition the work.