A ternary memory cell using small Josephson junction arrays