Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Testing of Terra Upgrade Branch #10

Open
SamarthH opened this issue Jun 6, 2022 · 13 comments
Open

Testing of Terra Upgrade Branch #10

SamarthH opened this issue Jun 6, 2022 · 13 comments

Comments

@SamarthH
Copy link

SamarthH commented Jun 6, 2022

Hi all. At this point, the terra_upgrade branch is functional and runs all examples with the expected output and passes all tests. I would like to know if you have any other tests that you would like to perform before we can merge this into the main repository.

@SamarthH
Copy link
Author

SamarthH commented Jun 6, 2022

@biplab37
Copy link
Member

biplab37 commented Jun 6, 2022

Installation Issues

  • During a fresh installation I got the following error in my computer (linux).
>>> import qiskit
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/biplab/Desktop/Code/python/qiskit-aakash/qiskit/__init__.py", line 21, in <module>
    import qiskit._accelerate
ModuleNotFoundError: No module named 'qiskit._accelerate'

To avoid this error following file qiskit/_accelerate.cpython-310-x86_64-linux-gnu.so is required but the file is not generated by default.

  • Installation does not work in Google Colab or other online server(e.g. deepnote, nextjournal)
Processing ./qiskit-aakash
  Installing build dependencies ... done
  Getting requirements to build wheel ... error
  ERROR: Command errored out with exit status 1:
   command: /root/venv/bin/python /root/venv/lib/python3.7/site-packages/pip/_vendor/pep517/_in_process.py get_requires_for_build_wheel /tmp/tmpw8nu9rkm
       cwd: /tmp/pip-req-build-uz_5nflc
  Complete output (32 lines):
  Traceback (most recent call last):
    File "/root/venv/lib/python3.7/site-packages/pip/_vendor/pep517/_in_process.py", line 280, in <module>
      main()
    File "/root/venv/lib/python3.7/site-packages/pip/_vendor/pep517/_in_process.py", line 263, in main
      json_out['return_val'] = hook(**hook_input['kwargs'])
    File "/root/venv/lib/python3.7/site-packages/pip/_vendor/pep517/_in_process.py", line 114, in get_requires_for_build_wheel
      return hook(config_settings)
    File "/usr/local/lib/python3.7/site-packages/setuptools/build_meta.py", line 155, in get_requires_for_build_wheel
      config_settings, requirements=['wheel'])
    File "/usr/local/lib/python3.7/site-packages/setuptools/build_meta.py", line 135, in _get_build_requires
      self.run_setup()
    File "/usr/local/lib/python3.7/site-packages/setuptools/build_meta.py", line 150, in run_setup
      exec(compile(code, __file__, 'exec'), locals())
    File "setup.py", line 103, in <module>
      "aqc = qiskit.transpiler.synthesis.aqc.aqc_plugin:AQCSynthesisPlugin",
    File "/usr/local/lib/python3.7/site-packages/setuptools/__init__.py", line 153, in setup
      return distutils.core.setup(**attrs)
    File "/usr/local/lib/python3.7/site-packages/setuptools/_distutils/core.py", line 108, in setup
      _setup_distribution = dist = klass(attrs)
    File "/usr/local/lib/python3.7/site-packages/setuptools/dist.py", line 456, in __init__
      k: v for k, v in attrs.items()
    File "/usr/local/lib/python3.7/site-packages/setuptools/_distutils/dist.py", line 293, in __init__
      self.finalize_options()
    File "/usr/local/lib/python3.7/site-packages/setuptools/dist.py", line 807, in finalize_options
      ep(self)
    File "/usr/local/lib/python3.7/site-packages/setuptools/dist.py", line 813, in _finalize_setup_keywords
      ep.require(installer=self.fetch_build_egg)
    File "/usr/local/lib/python3.7/site-packages/pkg_resources/__init__.py", line 2472, in require
      items = working_set.resolve(reqs, env, installer, extras=self.extras)
    File "/usr/local/lib/python3.7/site-packages/pkg_resources/__init__.py", line 777, in resolve
      raise VersionConflict(dist, req).with_context(dependent_req)
  pkg_resources.VersionConflict: (setuptools 57.5.0 (/usr/local/lib/python3.7/site-packages), Requirement.parse('setuptools>=58.0'))
  ----------------------------------------
ERROR: Command errored out with exit status 1: /root/venv/bin/python /root/venv/lib/python3.7/site-packages/pip/_vendor/pep517/_in_process.py get_requires_for_build_wheel /tmp/tmpw8nu9rkm Check the logs for full command output.

@SamarthH
Copy link
Author

SamarthH commented Jun 6, 2022

That is possibly because either you have not installed Rust, or Rust is not in your PATH. Please check that.
Once you have updated your path, please try to reinstall. That will work.

@obliviateandsurrender
Copy link
Member

Is Rust a dependency for the updated Terra? I do remember Qiskit moving towards retworkx from networkx for better speedups.

@biplab37
Copy link
Member

biplab37 commented Jun 6, 2022

That is possibly because either you have not installed Rust, or Rust is not in your PATH. Please check that. Once you have updated your path, please try to reinstall. That will work.

My bad, I've installed rust but it was not in the path. It works in my desktop but not in Colab etc. (even after installing rustc).

@SamarthH
Copy link
Author

SamarthH commented Jun 6, 2022

Yes, Rust is a dependency for the updated Terra. I am unsure as to how one would make this work in Colab

@biplab37
Copy link
Member

biplab37 commented Jun 6, 2022

I did some basic test and the code works so far. I want to do a few more tests.

There should be a way to make this work in Colab or Binder. I will look for it meanwhile if someone find a way leave a comment here.

C-DAC uses the master branch in their supercomputer(at least that's what I am told). I will give them a heads up before going through the process of merging this to the master branch.

@SamarthH
Copy link
Author

SamarthH commented Jun 6, 2022

Please do. Thanks a lot!

@SamarthH
Copy link
Author

SamarthH commented Jun 7, 2022

@biplab37 While giving a heads-up to the people at CDAC, please do not forget to mention that the output format has changed ever so slightly. Now it is an object, not a dictionary

@obliviateandsurrender
Copy link
Member

I think the output has always been a Result object. We should be able to manually change it to a dictionary, just in case, something breaks.

@SamarthH
Copy link
Author

SamarthH commented Jun 7, 2022

Now the output is a Result object with the Result.results being an ExperimentalData object

@biplab37
Copy link
Member

If anyone else did not find any obvious mistake then we can merge the terra-upgrade branch with the master branch. This will also fix the installation issue (#8).

@SamarthH
Copy link
Author

So, there are some issues that we see which we are trying to fix right now. Once they are done we would let you know

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants