  Measuring the phonon number of the laser-cooled ions is an indispensable step
in evaluating whether an ion is in ground state. At present, commonly used
methods in the experiments are red-to-blue sideband ratios and adiabatic
evolution red-sideband methods. We theoretically propose a method using
composite pulses which does not need a fit of state evolution and can directly
measure the population of the selected Fock state. It can measure higher Fock
state population more directly comparing with the adiabatic evolution
red-sideband method. We use quantum optimal control method to improve the
fidelity of unitary operation of the composite pulses. With quantum optimal
control technology, we can discuss the situation where the laser strength is
strong, and many approximations will not be necessary, where the gate fidelity
can be further improved. Then we give a method to modify the measurement result
for a higher accuracy which has a good performance, and we give an example to
illustrate its application on high Fock state measurement.
