# Selecting size of big Q

**URL:** <https://openfhe.discourse.group/t/selecting-size-of-big-q/972>\
**Category:** Library Questions\
**Created:** [December 15, 2023, 5:32pm UTC](https://openfhe.discourse.group/t/selecting-size-of-big-q/972 "2023-12-15T17:32:22Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![sergirovira](https://avatars.discourse-cdn.com/v4/letter/s/58f4c7/32.png) [@sergirovira](https://openfhe.discourse.group/u/sergirovira)\
**Post date:** [December 15, 2023, 5:32pm UTC](https://openfhe.discourse.group/t/selecting-size-of-big-q/972/1 "2023-12-15T17:32:22Z")

</div>

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!

---

<div class="post-metadata">

**Author:** ![Caesar](https://yyz1.discourse-cdn.com/flex031/user_avatar/openfhe.discourse.group/caesar/32/63_2.png) [@Caesar](https://openfhe.discourse.group/u/Caesar)\
**Post date:** [December 19, 2023, 8:15pm UTC](https://openfhe.discourse.group/t/selecting-size-of-big-q/972/2 "2023-12-19T20:15:54Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![ypolyakov](https://yyz1.discourse-cdn.com/flex031/user_avatar/openfhe.discourse.group/ypolyakov/32/47_2.png) [@ypolyakov](https://openfhe.discourse.group/u/ypolyakov)\
**Post date:** [December 19, 2023, 8:58pm UTC](https://openfhe.discourse.group/t/selecting-size-of-big-q/972/3 "2023-12-19T20:58:28Z")

</div>

The selection of Q depends on the scheme and scaling technique used. I suggest reviewing the [this](https://eprint.iacr.org/2021/204) paper to learn how individual moduli make up Q in BFV and BGV, and the [following](https://eprint.iacr.org/2020/1118) 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.
