When we have an open and closed Topological Field Theory (TFT) each element ξ of the closed algebra C defines an endomorphism ξ_{a} = i_{a}(ξ) ∈ O_{aa} of each object a of B, and η ◦ ξ_{a} = ξ_{b} ◦ η for each morphism η ∈ O_{ba} from a to b. The family {ξ_{a}} thus constitutes a natural transformation from the identity functor 1_{B} : B → B to itself.

For any C-linear category B we can consider the ring E of natural transformations of 1_{B}. It is automatically commutative, for if {ξ_{a}}, {η_{a}} ∈ E then ξ_{a} ◦ η_{a} = η_{a} ◦ ξ_{a} by the definition of naturality. (A natural transformation from 1_{B} to 1_{B} is a collection of elements {ξ_{a} ∈ O_{aa}} such that ξ_{a} ◦ f = f ◦ ξ_{b} for each morphism f ∈ O_{ab} from b to a. But we can take a = b and f = η_{a}.) If B is a Frobenius category then there is a map π_{a}^{b} : O_{bb} → O_{aa} for each pair of objects a, b, and we can define j^{b} : O_{bb} → E by j^{b}(η)_{a} = π_{a}^{b}(η) for η ∈ O_{bb}. In other words, j^{b} is defined so that the * Cardy condition* ι

_{a}◦ j

^{b}= π

_{a}

^{b}holds. But the question arises whether we can define a trace θ : E → C to make E into a Frobenius algebra, and with the property that

θ_{a}(ι_{a}(ξ)η) = θ(ξj^{a}(η)) —– (1)

∀ ξ ∈ E and η ∈ O_{aa}. This is certainly true if B is a semisimple * Frobenius* category with finitely many simple objects, for then E is just the ring of complex-valued functions on the set of classes of these simple elements, and we can readily define θ : E → C by θ(ε

_{a}) = θ

_{a}(1

_{a})

^{2}, where a is an irreducible object, and ε

_{a}∈ E is the characteristic function of the point a in the spectrum of E. Nevertheless, a Frobenius category need not be semisimple, and we cannot, unfortunately, take E as the closed string algebra in the general case. If, for example, B has just one object a, and O

_{aa}is a commutative local ring of dimension greater than 1, then E = O

_{aa}, and so ι

_{a}: E → O

_{aa}is an isomorphism, and its adjoint map j

^{a}ought to be an isomorphism too. But that contradicts the Cardy condition, as π

_{a}

^{a}is multiplication by ∑ψ

_{i}ψ

^{i}, which must be nilpotent.

The commutative algebra E of natural endomorphisms of the identity functor of a linear category B is called the Hochschild cohomology HH^{0}(B) of B in degree 0. The groups HH^{p}(B) for p > 0, vanish if B is semisimple, but in the general case they appear to be relevant to the construction of a closed string algebra from B. For any Frobenius category B there is a natural homomorphism K(B) → HH^{0}(B) from the Grothendieck group of B, which assigns to an object a the transformation whose value on b is π_{b}^{a}(1_{a}) ∈ O_{bb}. In the semisimple case this homomorphism induces an isomorphism K(B) ⊗ C → HH^{0}(B).

For any additive category B the Hochschild cohomology is defined as the cohomology of the cochain complex in which a k-cochain F is a rule that to each composable k-tuple of morphisms

Y_{0} →^{φ1} Y_{1} →^{φ2} ··· →^{φk} Y_{k} —– (2)

assigns F(φ_{1},…,φ_{k}) ∈ Hom(Y_{0},Y_{k}). The differential in the complex is defined by

(dF)(φ_{1},…,φ_{k+1}) = F(φ_{2},…,φ_{k+1}) ◦ φ_{1} + ∑_{i=1}^{k}(−1)^{i} F(φ_{1},…,φ_{i+1} ◦ φ_{i},…,φ_{k+1}) + (−1)^{k+1}φ_{k+1} ◦ F(φ_{1},…,φ_{k}) —– (3)

(Notice, in particular, that a 0-cochain assigns an endomorphism F_{Y} to each object Y, and is a cocycle if the endomorphisms form a natural transformation. Similarly, a 2-cochain F gives a possible infinitesimal deformation F(φ_{1}, φ_{2}) of the composition law (φ_{1}, φ_{2}) ↦ φ_{2} ◦ φ_{1} of the category, and the deformation preserves the associativity of composition iff F is a cocycle.)

In the case of a category B with a single object whose algebra of endomorphisms is O the cohomology just described is usually called the Hochschild cohomology of the algebra O with coefficients in O regarded as a O-bimodule. This must be carefully distinguished from the Hochschild cohomology with coefficients in the dual O-bimodule O^{∗}. But if O is a Frobenius algebra it is isomorphic as a bimodule to O^{∗}, and the two notions of Hochschild cohomology need not be distinguished. The same applies to a Frobenius category B: because Hom(Y_{k}, Y_{0}) is the dual space of Hom(Y_{0}, Y_{k}) we can think of a k-cochain as a rule which associates to each composable k-tuple of morphisms a linear function of an element φ_{0} ∈ Hom(Y_{k}, Y_{0}). In other words, a k-cochain is a rule which to each “circle” of k + 1 morphisms

···→^{φ0} Y_{0} →^{φ1} Y1 →^{φ2}···→^{φk} Y_{k} →^{φ0}··· —– (4)

assigns a complex number F(φ_{0},φ_{1},…,φ_{k}).

If in this description we restrict ourselves to cochains which are cyclically invariant under rotating the circle of morphisms (φ_{0},φ_{1},…,φ_{k}) then we obtain a sub-cochain complex of the Hochschild complex whose cohomology is called the cyclic cohomology HC^{∗}(B) of the category B. The cyclic cohomology, which evidently maps to the Hochschild cohomology is a more natural candidate for the closed string algebra associated to B than is the Hochschild cohomology. A very natural Frobenius category on which to test these ideas is the category of holomorphic vector bundles on a compact Calabi-Yau manifold.