  We show that quantum theory allows for transformations of black boxes that
cannot be realized by inserting the input black boxes within a circuit in a
pre-defined causal order. The simplest example of such a transformation is the
classical switch of black boxes, where two input black boxes are arranged in
two different orders conditionally on the value of a classical bit. The quantum
version of this transformation-the quantum switch-produces an output circuit
where the order of the connections is controlled by a quantum bit, which
becomes entangled with the circuit structure. Simulating these transformations
in a circuit with fixed causal structure requires either postselection, or an
extra query to the input black boxes.
