eclipse / xacc

XACC - eXtreme-scale Accelerator programming framework
https://xacc.readthedocs.io
BSD 3-Clause "New" or "Revised" License
167 stars 86 forks source link

Invalid Accelerator #307

Closed joehellmers closed 4 years ago

joehellmers commented 4 years ago

I'm trying to run the examples

bell_quil_ibm_local
bell_qasm_ibm_local

but I get the message

Invalid Accelerator. Could not find local-ibm in Accelerator Registry.
Framework Exiting

Do I need to do something to get the Aer simulator installed? When building xacc I saw what looked like Qiskit software being downloaded so I thought that was taken care of.

Thanks.

amccaskey commented 4 years ago

Those examples still need to be updated. We got rid of the local-ibm Accelerator. You can switch it to qpp and re-build and they should work.

joehellmers commented 4 years ago

Thanks! That did the trick.

I would love to become a contributor on this project. Would you like me to fix this issue, i.e. the simulator used in these two examples, as my first assignment?

amccaskey commented 4 years ago

Yea I think that would be a great start, and get you familiar with the contributing process. Make sure to check out https://github.com/eclipse/xacc/blob/master/CONTRIBUTING.md. You'll need to create an Eclipse account, sign the Ecipse CLA, associate your Github username with that account, and on your fork make sure to sign your commits with the same email (using the git -s flag).

Then if you are interested in contributing further, there are plenty of other opportunities / things that need to get done. What is your background and what are you most interested in working on?

joehellmers commented 4 years ago

Thanks Alex. I took care of the Eclipse stuff, forked to the eclipse/xacc repo (joehellmers/xacc), made a new branch (joehellmers/local-ibm-fix) and pushed some changes.

I have a couple of questions.

Firstly, when switching from local-ibm to qpp in

python/compiler/tests/teleport.py
python/compiler/tests/test.py

I get the error when trying to run them ERROR! (AttributeError: '_pyxacc.Accelerator' object has no attribute 'createBuffer') So perhaps there is an issue for the qpp accelerator in Python?

Secondly, some of the tests/examples seem to want the AER simulator installed.

quantum/plugins/ibm/accelerator/LocalIBMAccelerator.hpp
quantum/plugins/ibm/accelerator/LocalIBMAccelerator.cpp
python/examples/readout_error_correction_aer.py

What is the best way to install AER? Usually I install Anaconda or Miniconda and then pip install qiskit, but I'm afraid if I try to do that I will interfere with the qiskit XACC uses.

I have a B.S. in Physics and an M.Sc. in Computational Sciences from SDSU.

Currently I am a "volunteer researcher" at SDSU, which basically means I can use their VPN to download published research papers. My primary research areas are nuclear physics and astrophysics.

I also have a "day job" as a Software Engineer at Dassault Systemes - BIOVIA. I've been working in the IT/Software development field 28+ years.

I've been working on quantum computing as a side activity since 2017, primarily using the IBM environments. I also have used Rigetti's systems, as well as DWave's.

I have a rough knowledge of some of the NISQ algorithms (VQE, QAOA) but I really want to learn more and get down in the weeds to understand in detail how they work, and to implement other algorithms as well.

joehellmers commented 4 years ago

In order to generate a pull request for my changes I need to add tests, according to the Contribution guide lines.

Does this mean I add it to the automatic tests that get executed using ctest? I'm assuming the changes to Python scripts can be tested this way as well?

Also, do I need to update documentation as well?

In regards to documentation, these files have "local-ibm" in them

docs/source/basics.rst
docs/source/obsolete/tutorials.rst
docs/source/obsolete/em.rst

Presumably the items under obsolete don't need to be updated For the files

docs/build/html/_sources/basics.rst.txt
docs/build/html/_sources/obsolete/tutorials.rst.txt
docs/build/html/_sources/obsolete/em.rst.txt
docs/build/html/basics.html
docs/build/html/obsolete/em.html
docs/build/html/obsolete/tutorials.html

These are probably generated by the documentation build so perhaps I don't have to worry about these at all.

amccaskey commented 4 years ago

Sorry I forgot to respond to this yesterday. Feel free to just remove the python files in python/compiler/tests/, they are old and aren't used anymore. As for the Aer simulator, we now have that integrated directly in C++. See quantum/plugins/ibm/aer/. If any test needs it, it is just getAccelerator('aer').

As for the docs, yes anything in source can / and needs to be updated. We should just update local-ibm -> qpp. Anything in build is generated and used by ReadTheDocs, so we don't need to update that.

And as for tests, I think that for the changes you have described, most are examples only, so no need to do anything with ctest. Just udpates to the examples will be fine.

joehellmers commented 4 years ago

I created pull request #310. I didn't see away to squash my commits, so perhaps I did something wrong.

joehellmers commented 4 years ago

This has been merged to master with pull request #310 .