Computes the ranks of cohomology groups of certain chain complexes associated to pure or mixed states. For pure states this cohomology is a measure of entanglement. For more information see https://arxiv.org/abs/1901.02011.