Measuring the cyclotron state of a trapped electron