Name | Description | |
---|---|---|

ExpModulo(QuantumComputer, Register, Register, Int32, Int32) | Performs (a^x) modulo N, for given integers a and N. The x (one value or a superposition) is given in the input register x. After computation, the result (or results, when x stores superposition of multiple integers) is stored in register x1. This method is a simple variant of ExpModulo(QuantumComputer, Register, Register, Register, Register, Register, Register, Int32, Int32). It allocates additional registers and frees them at the end. This variant has also requirements for the width of each given register but if they are not fullfilled, the exception is thrown. | |

ExpModulo(QuantumComputer, Register, Register, Register, Register, Register, Register, Int32, Int32) | Performs (a^x) modulo N, for given integers a and N. The x (one value or a superposition) is given in the input register x. After computation, the result (or results, when x stores superposition of multiple integers) is stored in register x1. This method is a variant of ExpModulo function, which operates directly on quantum registers given as arguments. It neither allocates nor frees any additional registers. It is thus recommended, when there is a need for performing modular exponentiation repeatedly. However, this variant has strict requirements for the width of each given register and if they are not fullfilled, the method gives unexpected results. |