  Causal nonseparability refers to processes where events take place in a
coherent superposition of different causal orders. These may be the key
resource for experimental violations of causal inequalities and have been
recently identified as resources for concrete information-theoretic tasks.
Here, we take a step forward by deriving a complete operational framework for
causal nonseparability as a resource. Our first contribution is a formal
definition of quantum control of causal orders, a stronger form of causal
nonseparability (with the celebrated quantum switch as best-known example)
where the causal orders of events for a target system are coherently controlled
by a control system. We then build a resource theory -- for both generic causal
nonseparability and quantum control of causal orders -- with a
physically-motivated class of free operations, based on process-matrix
concatenations. We present the framework explicitly in the mindset with a
control register. However, our machinery is versatile, being applicable also to
scenarios with a target register alone. Moreover, an important subclass of our
operations not only is free with respect to causal nonseparability and quantum
control of causal orders but also preserves the very causal structure of causal
processes. Hence, our treatment contains, as a built-in feature, the basis of a
resource theory of quantum causal networks too. As applications, first, we
establish a sufficient condition for pure-process free convertibility. This
imposes a hierarchy of quantum control of causal orders with the quantum switch
at the top. Second, we prove that causal-nonseparability distillation exists,
i.e. we show how to convert multiple copies of a process with arbitrarily
little causal nonseparability into fewer copies of a quantum switch. Our
findings reveal conceptually new, unexpected phenomena, with both fundamental
and practical implications.
