  This article considers some control problems for closed and open two-level
quantum systems. The closed system's dynamics is governed by the Schr\"odinger
equation with coherent control. The open system's dynamics is governed by the
Gorini-Kossakowski-Sudarshan-Lindblad master equation whose Hamiltonian depends
on coherent control and superoperator of dissipation depends on incoherent
control. For the closed system, we consider the problem for generation of the
phase shift gate for some values of phases and final times for which
numerically show that zero coherent control, which is a stationary point of the
objective functional, is not optimal; it gives an example of subtle point for
practical solving problems of quantum control. For the open system, in the
two-stage method which was developed for generic N-level quantum systems in
[Pechen A., Phys. Rev. A., 84, 042106 (2011)] for approximate generation of a
target density matrix, here we consider the two-level systems for which modify
the first ("incoherent") stage by numerically optimizing piecewise constant
incoherent control instead of using constant incoherent control analytically
computed using eigenvalues of the target density matrix. Exact analytical
formulas are derived for the system's state evolution, the objective functions
and their gradients for the modified first stage. These formulas are applied in
the two-step gradient projection method. The numerical simulations show that
the modified first stage's duration can be significantly less than the
unmodified first stage's duration, but at the cost of optimization in the class
of piecewise constant controls.
