  The magnetic field dependence of energy levels in gapped single- and bilayer
graphene quantum dots (QDs) defined by electrostatic gates is studied
analytically in terms of the Dirac equation. Due to the absence of sharp edges
in these types of QDs, the valley degree of freedom is a good quantum number.
We show that its degeneracy is efficiently and controllably broken by a
magnetic field applied perpendicular to the graphene plane. This opens up a
feasible route to create well-defined and well controlled spin- and
valley-qubits in graphene QDs. We also point out the similarities and
differences in the spectrum between single- and bilayer graphene quantum dots.
Striking in the case of bilayer graphene is the anomalous bulk Landau level
(LL) that crosses the gap which results in crossings of QD states with this
bulk LL at large magnetic fields in stark contrast to the single-layer case
where this LL is absent. The tunability of the gap in the bilayer case allows
us to observe different regimes of level spacings directly related to the
formation of a pronounced ``Mexican hat'' in the bulk bandstructure. We discuss
the applicability of such QDs to control and measure the valley isospin and
their potential use for hosting and controlling spin qubits.
