Selecting size of big Q

Hello,

I understand that OpenFHE uses the HE standards for parameter selection. However, I would like to specify my own parameters to conduct some experiments. I have found how to change all parameters but the size of Q. In particular, I want to specify the size of the Q that you get when running GetElementParams()->GetModulus(), not the size of the smaller moduli. I have looked extensively in the code and this forum but cannot find where this size is set.

Thank you!

You can fine-tune the multiplicative depth parameter until you get close to the size you are interested in.

The selection of Q depends on the scheme and scaling technique used. I suggest reviewing the this paper to learn how individual moduli make up Q in BFV and BGV, and the following paper for CKKS. All the parameters described in the paper, such as single-precision moduli and scaling technique, are exposed via the Cryptocontext generation mechanism.