Tensor network method for reversible classical computation.