Text this: Higher semantics of quantum protocols