quil-lang / quilc

The optimizing Quil compiler.
Apache License 2.0
454 stars 73 forks source link

Some questions about Quilc #715

Open weucode opened 3 years ago

weucode commented 3 years ago

I am a student who want to know more details about the process of the Quilc. My question is whether there are any files except the optimized instructions that I can see after run "cat test.quil|quilc",which means that after I compile a quil program?

here is test.quil

CPHASE (pi/2) 2 3
RZ (pi/2) 0

after run "cat test.quil|quilc" we can see

RZ(-pi/2) 3                             # Entering rewiring: #(0 1 2 3 4 5 6 7)
RX(pi/2) 3
RZ(pi/2) 3
CZ 3 2
RZ(pi) 2
RZ(-pi/2) 3
RX(pi/2) 3
RZ(pi/4) 3
RX(-pi/2) 3
RZ(pi/2) 3
CZ 3 2
RZ(pi/2) 0
RZ(5*pi/4) 2
RZ(-3*pi/2) 3
RX(pi/2) 3
RZ(-pi/4) 3
HALT                                    # Exiting rewiring: #(0 1 2 3 4 5 6 7)

after run 'cat test6.quil|quilc -c -b quil -o test.txt' I will find the above instructions in test.txt,will some other files be generated after compilation,like a intermediate file? And where can I see these?Looking forward to your reply,thanks!

QuXing9 commented 3 years ago

I wonder about that, too. Are there some intermediate files generated by quilc compiler such as QIR generated by qsharp-compiler to help us understand quilc's compilation process?

stylewarning commented 3 years ago

You can use the option quilc --verbose to look at what quilc is thinking about during compilation.

(Sorry for the late response!)