Causal Structures and the Classification of Higher Order Quantum Computations