ngnrsaa / qflex

Flexible Quantum Circuit Simulator (qFlex) implements an efficient tensor network, CPU-based simulator of large quantum circuits.
Apache License 2.0
96 stars 24 forks source link

Support "pip install qflex" #133

Closed 95-martin-orion closed 4 years ago

95-martin-orion commented 4 years ago

This would simplify the installation process for those using qFlex as a Cirq plugin. Requires adding qFlex to the Python Package Index.

95-martin-orion commented 4 years ago

Recommended by @karlunho.

95-martin-orion commented 4 years ago

We should time this to line up with our next release (v0.2), making this the final item for the "Post-release fixes" milestone.

alexandrupaler commented 4 years ago

Should the config folder be shipped with the package? Should we copy it in the cirq interface?

alexandrupaler commented 4 years ago

Is it OK if I rename python/cirq_interface to qflexcirq/interface and place an __init__.py in qflexcirq?

95-martin-orion commented 4 years ago

Should the config folder be shipped with the package? Should we copy it in the cirq interface?

This sounds reasonable. If it's possible to do this programmatically (e.g. in setup.py) that would be preferred.

Is it OK if I rename python/cirq_interface to qflexcirq/interface and place an __init__.py in qflexcirq?

I'm in support of both items here, since qflexcirq conforms to previous Cirq interface names (e.g. openfermioncirq). @s-mandra, will this require changes to the autoconf process?

alexandrupaler commented 4 years ago

I hope it is possible to do it programmatically. I will look into this.

alexandrupaler commented 4 years ago

The circuits/generator.py includes classes which are very similar to Cirq, e.g. Device. Should this file be refactored?

alexandrupaler commented 4 years ago

This sounds reasonable. If it's possible to do this programmatically (e.g. in setup.py) that would be preferred.

There may be an issue with example.py where the configs are used by relative paths

95-martin-orion commented 4 years ago

The circuits/generator.py includes classes which are very similar to Cirq, e.g. Device. Should this file be refactored?

The namespace distinction (qflex.Device vs. cirq.Device) is sufficient in theory, but if you see a risk of confusion then e.g. RQCDevice might be appropriate.

There may be an issue with example.py where the configs are used by relative paths

Hmm... if there's not a simple solution for this case, I think directly copying a small config for the example shouldn't be a problem.

95-martin-orion commented 4 years ago

Once #249 is in, we should add some kind of continuous tests for the install process.

95-martin-orion commented 4 years ago

The intersection of PyPI build requirements and the qFlex directory structure made this a complicated piece of engineering - @alexandrupaler, thanks for all of your hard work dedicated to supporting this!

s-mandra commented 4 years ago

The intersection of PyPI build requirements and the qFlex directory structure made this a complicated piece of engineering - @alexandrupaler, thanks for all of your hard work dedicated to supporting this!

Thanks @alexandrupaler!