θ_{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.