This solution uses PGF 3.0.0 pic new feature, to define a new pic element named node vertically split which receives two parameters which are the contents of the left and right parts. It also defines names to the parts of the pic which allow to later add different kind of connections, as it is shown in the example.
\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{calc}
\tikzset{
pics/circle vertically split/.style 2 args = {
code = {
\node[inner sep=3pt,left] (-left) {#1};
\node[inner sep=3pt,right] (-right) {#2};
\path let
\p1 = ($(-left.north west) - (-left.east)$),
\p2 = ($(-right.west) - (-right.south east)$),
\n1 = {max(veclen(\p1), veclen(\p2))*2}
in node[minimum size=\n1, circle, draw] (-shape) at (0,0) {};
\draw (-shape.north) -- (-shape.south);
}
}
}
\begin{document}
\begin{tikzpicture}
\draw (0,0) pic (A) {circle vertically split={$a$}{$b$}}
(2,2) pic (B) {circle vertically split={Hello}{World}}
(2,-1) pic (C) {circle vertically split={Hello}{$b$}};
\draw[->, blue] (A-shape) -- (B-shape);
\draw[blue, dotted] (C-shape.north east) -- (B-shape.south east);
\draw[->, red] (A-right) to[out=0,in=90] (C-right.north);
\end{tikzpicture}
\end{document}
Result:

shape border rotate)? – Claudio Fiandrino Jun 24 '14 at 20:39\node [circle,draw,text width=1.5em] (z){$a$ \hfill $b$}; \draw (z.north) -- (z.south);. – Jun 24 '14 at 23:01