quantum-compiler / quartz

The Quartz Quantum Compiler
Apache License 2.0
77 stars 19 forks source link

[Simulation] Use pybind11 to integrate ILP into the simulator #69

Closed xumingkuan closed 1 year ago

xumingkuan commented 1 year ago

This PR adds pybind11 (which is already a dependency of qiskit) and uses it to integrate ILP into the simulator.

Our codebase also uses Cython, and I think they will not cause conflicts.

Result of test_simulation on my laptop: running time=332s, costs=295.8+319 (previously when heuristics is used: running time=273s, costs=979+394.8)


Note about CMake: I'm using parameters -G "Visual Studio 16 2019" -DPython_ROOT_DIR=D:/Anaconda3 -A x64 on my Windows laptop.

xumingkuan commented 1 year ago

@Co1lin Do we have pybind11 on the CI machine? If not, how to add it as a dependency?

Co1lin commented 1 year ago

@xumingkuan Hi! In ci.yml, I used miniconda to manage the python environment and used env.yml as the dependency file. Let me try to add pybind11 into this file.

Co1lin commented 1 year ago

It seems that you are working on your own fork, so I cannot add it for you. I think you can just add pybind11 after openmp on line 10 in emv.yml.

xumingkuan commented 1 year ago

On Linux, if there is an error message saying ModuleNotFoundError: No module named 'pulp', we can type pip show pulp or pip3 show pulp in terminal to see where the package is located and add it to PYTHONPATH.