vdasu / lighter-r

LIGHTER-R is a tool to optimally implement a given 4 × 4 SBox using logic gates from a reversible logic library
Eclipse Public License 2.0
10 stars 5 forks source link

How to know the quantum circuit of the S-box from the results? #3

Closed luoqingbin9999 closed 1 year ago

luoqingbin9999 commented 1 year ago

I ran lighter-r on some examples and got the following results:

Example 1 . /non-lin-search -o "0123456789abcdfe"

From : 00FF 0F0F 3333 5555 To : 00FF 0F0F 3333 5556

Example 2 . /non-lin-search -v -o "c56b90ad3ef84712"

From : 00FF 0F0F 3333 5555 To : 9B70 E16C 32E5 59A6 0 100 200 300 400 500 600 700 800 900 1000 1100 1200

f1_succ : 0 (1) Total = 1 f2_succ : 0 (1) Total = 1

Now my question is: how to interpret these results and derive quantum circuits from them? Or what else do I need to do to get the quantum circuits?

luoqingbin9999 commented 1 year ago

When I ran "make check", and got the following results:

gcc test.c -o test && ./test test.c: In function ‘main’: test.c:101:12: fatal error: implementation_0.c: 没有那个文件或目录 101 | #include "implementation_0.c" | ^~~~~~~~ compilation terminated. make: *** [Makefile:37:check] 错误 1

The file "implementation_0.c" does not exist. What should I do?

msylovexxtforever commented 1 year ago

I ran lighter-r on some examples and got the following results:

Example 1 . /non-lin-search -o "0123456789abcdfe"

From : 00FF 0F0F 3333 5555 To : 00FF 0F0F 3333 5556

Example 2 . /non-lin-search -v -o "c56b90ad3ef84712"

From : 00FF 0F0F 3333 5555 To : 9B70 E16C 32E5 59A6 0 100 200 300 400 500 600 700 800 900 1000 1100 1200

f1_succ : 0 (1) Total = 1 f2_succ : 0 (1) Total = 1

Now my question is: how to interpret these results and derive quantum circuits from them? Or what else do I need to do to get the quantum circuits?

hello,do you understand how to know it?

anubhab001 commented 1 year ago

Hello @luoqingbin9999 @msylovexxtforever In case you are still looking for a solution, you need to check the generate C files for the first question.

hongmerly commented 1 year ago

@luoqingbin9999 @anubhab001 @msylovexxtforever I also want to know: how to interpret these results and derive quantum circuits from them? Or what else do I need to do to get the quantum circuits?

anubhab001 commented 1 year ago

@hongmerly After you run successfully, you should see some C files. Those files contain the implementation.

By the way, @luoqingbin9999 @msylovexxtforever @hongmerly You may be interested in our follow-up work.

hongmerly commented 1 year ago

这是来自QQ邮箱的假期自动回复邮件。你好,我最近正在休假中,无法亲自回复你的邮件。我将在假期结束后,尽快给你回复。

anubhab001 commented 1 year ago

@msylovexxtforever For your question (. /non-lin-search -o "0123456789abcdfe"), I think you should use -a (for LIGHTER) or -q (for LIGHTER-R).

hongmerly commented 1 year ago

@anubhab001 excuse me, when I run:

./non-lin-search -a -o "0123456789abcdef" it show rom : 00FF 0F0F 3333 5555
To : 00FF 0F0F 3333 5555
已杀死 dose this mean run fail? How can I solve it? Or can you send a useful executable file,the non-lin-search file?

anubhab001 commented 1 year ago

@hongmerly You need to specify the logic library, try this: ./non-lin-search -av -o "0123456789ABCDEF" -f "libraries/TSMC65nm.conf".

You may want try with this repository also.

hongmerly commented 1 year ago

thank you! But however, I also have a question in your new work Depth Optimized Quantum Implementation of Substitution Boxes, the Figure 5c, S-box (1A4C6F392DB7508E), if I input 0000, the output is 0010. But theoretically the output should be 0001. And the output of Figure 5a and Figure 5b are both 0001.

anubhab001 commented 1 year ago

@hongmerly If you have question about DORCIS, I recommend to write us (the authors of DORCIS) an email.

anubhab001 commented 1 year ago

Apparently the problem can be solved by using a logic library in the command line option, so I am closing this issue. @luoqingbin9999 @msylovexxtforever If you have further doubts, feel free to reach out to us (or open another issue).

hongmerly commented 1 year ago

OK, thank you very much. My question have been solved.