  We introduce a general categorical framework to reason about quantum theory
and other process theories living in spacetimes where Closed Timelike Curves
(CTCs) are available, allowing resources to travel back in time and provide
computational speedups. Our framework is based on a weakening of the definition
of traced symmetric monoidal categories, obtained by dropping the yanking axiom
and the requirement that the trace be defined on all morphisms. We show that
the two leading models for quantum theory with closed timelike curves---namely
the P-CTC model of Lloyd et al. and the D-CTC model of Deutsch---are captured
by our framework, and in doing so we provide the first compositional
description of the D-CTC model. Our description of the D-CTC model results in a
process theory which respects the constraints of relativistic causality: this
is in direct contrast to the P-CTC model, where CTCs are implemented by a trace
and allow post-selection to be performed deterministically.
