Skip to main content

Python interface for quick_cppkh, racing direct cppkh against pd_simplify plus cppkh.

Project description

quick-cppkh-interface

quick-cppkh-interface is a Python package for computing integer Khovanov homology through quick_cppkh.

It keeps the familiar cppkh-interface style API:

import quick_cppkh_interface

pd_code = [[1, 5, 2, 4], [3, 1, 4, 6], [5, 3, 6, 2]]

print(quick_cppkh_interface.solve_khovanov(pd_code))
print(quick_cppkh_interface.solve_many_khovanov([pd_code, pd_code]))

The package ships C++ source code in built distributions and compiles local executables on first use through cpp-simple-interface. The compiled executables are cached for later calls:

  • quick_cppkh
  • cppkh
  • pd_simplify

The default homology path races direct cppkh against pd_simplify followed by cppkh --no-simplify-pd, returning whichever successful route finishes first.

Install

pip install quick-cppkh-interface

A g++ compatible compiler must be available at runtime. To select a compiler, set CXX before importing or calling the package:

CXX=clang++ python your_script.py

Windows PowerShell:

$env:CXX = "C:\path\to\g++.exe"
python your_script.py

Build And Publish

From this directory:

poetry build
poetry publish

For local testing:

poetry run python -m quick_cppkh_interface "[[1,5,2,4], [3,1,4,6], [5,3,6,2]]"

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

quick_cppkh_interface-0.1.0.tar.gz (87.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

quick_cppkh_interface-0.1.0-py3-none-any.whl (90.2 kB view details)

Uploaded Python 3

File details

Details for the file quick_cppkh_interface-0.1.0.tar.gz.

File metadata

  • Download URL: quick_cppkh_interface-0.1.0.tar.gz
  • Upload date:
  • Size: 87.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.2.1 CPython/3.13.5 Windows/11

File hashes

Hashes for quick_cppkh_interface-0.1.0.tar.gz
Algorithm Hash digest
SHA256 e013ed88e28c8ac6e77399c02b24717618ba9bfa9419e6d41dca84fc532f8194
MD5 735b84cba7eb66d2de3d64a3c4dda964
BLAKE2b-256 b5c26cb9382056ad82941bbb8609ca1d8a44a1e211c24d6a2d86db791778b460

See more details on using hashes here.

File details

Details for the file quick_cppkh_interface-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for quick_cppkh_interface-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 d98b2bca0358b60b82d01e43c8e1b85e780764ac8632f7c10431ace6b46b496b
MD5 68f6874b3d7161fef427e9dc38c62b90
BLAKE2b-256 f1c8dc29919e1ebe3252124b19cee6dfd9822d40610c7c88cc71a0066b7f4c23

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page