Menu

1 / 2

We accidentally built an LLVM compiler for JAX | josh iza.ac

Hacker News·3 months ago
#5rmfkFkP
#iza#quantum#classical#mlir#python
Reading 0:00
15s threshold

Sometimes when you build software, you shave a yak so deeply that you end up with a surprisingly nice sweater (while the yak, presumably, wonders why it is suddenly rather drafty).

For the past while, my team and I have been building a quantum compiler called Catalyst for the quantum software library PennyLane . Our goal was relatively straightforward: optimize large, hybrid quantum-classical workflows in a scalable manner using MLIR . To do this, we needed a fast, robust way to capture classical Python processing (including NumPy and associated scientific libraries) and represent it in our intermediate representation.

We chose JAX , for a couple of reasons: its ability to trace through Python functions and capture the computational graph 1 , its support of the NumPy and SciPy APIs with relatively good coverage, and the fact that it already lowers down to MLIR .…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.