Synthesis and electronic properties of 1,2-hemisquarimines and their encapsulation in a cucurbit[7]uril host.