Hi,
I would like to ask how to implement Double Hoisting in OpenFHE. This paper discusses how rotations are composed of Decompose, MultSum, ModDown, and Permute in that order (Algorithm 4). The paper later discusses how they are able to introduce Double Hoisting by reducing the number of ModDown operations (Algorithm 6). What confuses me is that in Algorithm 6, rotations are now ordered as Decompose, MultSum, Permute, and then ModDown (enabling them to hoist out the ModDown operation).
I am wondering how to do this double hoisting in OpenFHE. In OpenFHE, I can see rotations are indeed ordered as ModDown first then Permute, but my initial tests showed that if I simply changed the order to Permute first then ModDown, it results in decryption failures.