There is a general implementation in Sage. However, the algorithm runtime grows exponentially in the size of $H$. If you have a particular small $H$ in mind, there may be more efficient implementations available.
Timothy Chow
- 82.7k
- 26
- 363
- 587