microsoft / qsharp-compiler

Q# compiler, command line tool, and Q# language server
https://docs.microsoft.com/quantum
MIT License
682 stars 171 forks source link

Constant Folding #45

Closed bettinaheim closed 5 years ago

bettinaheim commented 5 years ago

We gradually want to incorporate some of the compilation steps and optimizations usually done for classical programming languages (opposed to quantum programming languages) into the Q# compiler. While our focus is naturally on different aspects of a program when compiling and optimizing for execution on a quantum processor, we still need some of the classical infrastructure as well. In particular, we want some infrastructure for constant folding.

bettinaheim commented 5 years ago

Since this task is part of a larger piece containing the first steps to set up some infrastructure for a full compilation process, I set up a feature branch to PR again here: https://github.com/microsoft/qsharp-compiler/tree/features/classicalCompilerOptimizations Such a feature branch may contain parts of a task and/or experimental implementations with the intent to eventually merge it back to master once it is in a reasonably good state.

bettinaheim commented 5 years ago

Merged to master with https://github.com/microsoft/qsharp-compiler/pull/177