Skip to content

Solving a two variable modulo function using the algorithm for discrete lograithm

Notifications You must be signed in to change notification settings

DavidNadaly/Discrete-Logarithm

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 

Repository files navigation

Discrete-Logarithm-

Simulating a quantum circuit for solving, two variable modulo function using discrete logarithm problem.

Discrete log problem - Give a prime $p$, a primitive root $g$, and $h \not\equiv 0(modp)$ (which means $gcd(h,p)=1)$. Find $x$ so that $g^x \equiv h(modp)$ or $Dis\log_{g}h \equiv x$.

From Neilsen Chuang textbook we solve a two variable modulo function $f(x) \equiv a^{sx_{1} + x_{2}}(modN)$ where $a^{r} \equiv 1(modN)$, using discrete logarithm by taking $a^{s} = b$ and solving $s$ by $a^{r}(modN)$ and $b^{r}(modN)$ by modular exponentiation. The code is designed specifically for $a=4$, $b=13$ and $N=17$.

The cicuit is image

The result gave out $s=35$ and more qubit are required for efficiently finding the value of s. These kind of problem can be solved efficiently only if there is a mechanism or a set of steps to find oracle for any value of multiplication modulo N.

About

Solving a two variable modulo function using the algorithm for discrete lograithm

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages