latticesurgery-com / liblsqecc

A C++ Library implementing some tools for the Lattice Surgery Compiler
GNU General Public License v3.0
13 stars 10 forks source link

[Enhancement request] Handling angles not of the form (n*pi/m) #109

Open satvikmaurya opened 10 months ago

satvikmaurya commented 10 months ago

Could arbitrary angles be supported within the compiler when using QASM circuits?

Some QASM workloads and benchmark generators (like QASMBench, MQTBench) produce QASM circuits that have arbitrary rotations (e.g. - rz(1.0232324) q[0];). To use the compiler with such arbitrary rotations, I had to modify my QASM circuits to approximate the arbitrary rotations with angles of the form (n*pi/m). An example of such an approximation can be - rz(1.5812683023068625) q0[7]; -> rz(7121399337041963*pi/14148475504056880) q0[7];

Can such a transformation be supported within the compiler (until arbitrary rotations can be natively supported)?

alexandrupaler commented 7 months ago

fixed by #112