{"id":23940,"library":"knot-floer-homology","title":"Knot Floer Homology","description":"Python wrapper for Zoltán Szabó's HFK (Heegaard Floer Knot homology) Calculator. Computes knot Floer homology invariants including the tau invariant, epsilon invariant, and the full HFK chain complex. Current version 1.2.2, with periodic releases.","status":"active","version":"1.2.2","language":"python","source_language":"en","source_url":"https://github.com/3-manifolds/knot_floer_homology","tags":["knot theory","Heegaard Floer homology","low-dimensional topology","snappy"],"install":[{"cmd":"pip install knot-floer-homology","lang":"bash","label":"PyPI install"}],"dependencies":[{"reason":"Required for creating links (manifold objects) from knot diagrams","package":"snappy","optional":false},{"reason":"Was a dependency in older versions, removed in v1.2.1 to break circular dependency","package":"sphereogram","optional":true}],"imports":[{"note":"Standard import; no common wrong pattern.","symbol":"knot_floer_homology","correct":"import knot_floer_homology"}],"quickstart":{"code":"import knot_floer_homology as kfh\nimport snappy\n\n# Create a knot (trefoil)\nK = snappy.Manifold('3_1')\n\n# Compute knot Floer homology (mod 2)\nresult = kfh.compute(K, prime=2)\nprint(\"Tau:\", result.tau)\nprint(\"Epsilon:\", result.epsilon)\nprint(\"Rank of HFK:\", result.hfk_rank)\n","lang":"python","description":"Basic usage: compute knot Floer homology for the trefoil knot over Z/2Z using snappy's Manifold."},"warnings":[{"fix":"No fix needed; just aware that performance may differ from earlier versions.","message":"The fast algorithm for alternating knots was removed in v1.2 due to bug #17. All knots now use the same algorithm, which may be slower for large alternating knots.","severity":"breaking","affected_versions":">=1.2"},{"fix":"Install sphereogram independently if needed: pip install sphereogram","message":"Dependency on sphereogram package was removed in v1.2.1. If you relied on sphereogram for other purposes, you need to install it separately.","severity":"deprecated","affected_versions":">=1.2.1"},{"fix":"Upgrade to v1.1 or later.","message":"Interrupting long computations with Control-C was only added in v1.1. In older versions, interrupting could leave the C++ backend in an inconsistent state.","severity":"gotcha","affected_versions":"<1.1"},{"fix":"Use import knot_floer_homology","message":"The module name uses underscores (knot_floer_homology) but the PyPI package name uses hyphens (knot-floer-homology). Import with underscores.","severity":"gotcha","affected_versions":"all"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Update to >=1.0.0 and use kfh.compute(manifold, prime=...).","cause":"Incorrect import or outdated version (older API).","error":"knot_floer_homology has no attribute 'compute'"},{"fix":"Upgrade to v1.1 or later.","cause":"Bug in version <1.1 when using large primes.","error":"OverflowError: integer overflow for prime >= 1297"},{"fix":"Install with pip install knot-floer-homology, then import knot_floer_homology (underscores).","cause":"Trying to import with hyphens or not installed.","error":"ModuleNotFoundError: No module named 'knot_floer_homology'"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}