Open jlapeyre opened 2 years ago
@jlapeyre I have basic knowledge pf python, but no knowledge of Julia. I am interested in learning and contributing to this project.
Hi @gunchamalik, thanks for reaching out! We will contact you very soon.
Here is one possible topic:
There are two separate ways for Julia and Python to communicate dynamically. One is via PyCall.jl / pyjulia. The other (more recent) is via PythonCall.jl / juliacall. It would be great if a single candidate were the clear winner. It's not clear that one way is better than the other; they do have different features.
We need to find out whether to support one way or the other, or both, and if so how. A good bit of infrastructure for investigating this is in place. (I need to push some changes today or tomorrow to make this visible)
I'll refer to the communication methods as PyCall.jl
and PythonCall.jl
which are the Julia modules, but the corresponding Python modules are implied.
Some possibilities are
PyCall.jl
and PythonCall.jl
as backends to a single user-facing API. This is probably not a good idea. The semantics of the two systems are sufficiently different to require a fair amount of complexity to handle this. All future additions to the Julia code in qiskit_alt would have to support this.PyCall.jl
and PythonCall.jl
, but in parallel. That is, some code would use one backend and some the other. This might be confusing because the semantics and coding styles might be different and cause lack of clarity in the code base. The user need not see this because it shouldn't be difficult to provide a uniform pure-python interface.
However, more importantly, the two systems handle wrapping and converting data differently. So they can't always interact transparently without yet more conversion.PyCall.jl
or PythonCall.jl
. This requires some implementation and benchmarking (and thinking!) to inform the decision for one system or the other.I will follow up here with a link to the latest version of qiskit_alt, which is set up for investigating the topics above.
This is my checkpoint-1's small presentation: #16 Issues in qiskit-alt: a Julia backend for Qiskit.pdf
The work on Julia-powered quantum library QuantumCircuits (https://github.com/Adgnitio/QuantumCircuits.jl) is going very well.
There is now 5 Contributor in the library who created and merged 24 pull requests and by that closed 21 issues (https://github.com/Adgnitio/QuantumCircuits.jl/issues?q=is%3Aissue+is%3Aclosed).
During these works, we focused on fixing the performance issue and did some code cleaning:
Four issues were marked as "good first issues" so anyone who would like to help us is more than welcome.
But there is a lot of the work to do. We have to move from Qiskit-style circuit creation to a more Julia idiomatic way that uses the macro to create domain-specific language dedicated to quantum operation. The other thing we should do is avoid converting the circuit to a Qiskit object during the draw procedure. So there is a lot of task before us :)
The modue qiskit-alt can be used to compute the fermionic operator of a molecule and convert it to a Pauli operator using the Jordan-Wigner transformation. This would later serve as an input to run molecular simulation algorithms from Qiskit Nature module.
We are adding tutorials to demonstrate the use of the qiskit-alt module for users to run molecular simulation tasks.
For the first tutorial, we are running the Variational Quantum Eigensolver to simulate the ground state energy of the Hygrogen molecule. In the first part, instead of using qiskit-nature, we use qiskit-alt features to describe the Fermionic operator and convert it to a Pauli operator with the Jordan-Wigner transform. The operator is then mapped to a quantum circuit and will be the input to the VQE method from Qiskit.
We compute the ground state energy of the Hydrogen molecule
However, the output result is not precise.
Our main goal for the next stage of this project is to improve the computation accuracy. We are still investigating at which level the error is caused. We will continue fixing issues and creating more tutorials for the simulation of more complex molecule models (if possible) and other chemistry simulation algorithms such as computing higher state energies.
After Checkpoint 1 I focused on the issue: https://github.com/Qiskit-Extensions/qiskit-alt/issues/27
In qiskit-alt/docker_tests, there is a shell file ./run_dockerfiles.sh Basically, this is a shell script that has purposes like building a docker image, running a docker container, and then running different tests for qiskit-alt package, other functionality includes like logging into the shell, etc in all these most of the variables like image name of the docker container its tag and other information was hardcoded along with this the functionality/job/behavior of the script depends on the command line argument. Implementing this group of functionality with this set of variables was good enough for a small scale but these were not easy to use, and, were not scalable to more number of other functionality.
I implemented a Python Command Line Tool which would use its command-line argument to take different variables like names of the docker images, its tag name, etc along with the behavior/functionality to execute. The good thing about this was the scalable numbers of variables and functionalities/behavior that can be implemented with the neatness of Python. The CLI Tool is named ./run_dockerfile.py and it exists in the same directory as its shell counterpart.
./run_dockerfile.py –help
gets us this output:
As an example
./run_dockerfile.py –action=run
gets us this output:
Here is the Pull Request: https://github.com/Qiskit-Extensions/qiskit-alt/pull/30
Just during the checkpoint 1, I was working on this issue: https://github.com/Qiskit-Extensions/qiskit-alt/issues/21
After,
pip install qiskit-alt
The Python Code:
import qiskit_alt
qiskit_alt.project.ensure_init()
should provide us with julia installed and qiskit_alt ready to accept commands but this terminated with this error:
The issue was in a python package called find_julia: https://github.com/jlapeyre/find_julia It’s purpose is to make sure julia is present if not then install it.
After the issue was fixed, the output looked like this:
This was the Pull Request: https://github.com/jlapeyre/find_julia/pull/3
Final Presentation: https://youtu.be/bjz3FKpm744
Description
qiskit-alt is a high-performance Julia backend for Qiskit with a Python frontend. It is quite new and experimental. It is not distributed as part of Qiskit. The main application is computing a qubit Hamiltonian from the specification of an electronic structure problem.
There are a number of projects available, small and large. The appropriate project depends on the experience of the mentee. There are a number of issues in the qiskit-alt repo. But, the project is divided into several other repos, most of which are hosted here. These repos have their own issues. A major part of the effort is improving deployment options of Julia with the Python project. These issues are in
julia_project
Note that much of the work happens on the Python side. So, if you know some Python, but don't yet know Julia, you can still contribute.
Deliverables
Open a pull request that closes an issue and work through getting it merged. Alternatively, start by opening a new issue; for instance as a sub-issue of a more open ended one.
Mentors details
Number of mentees
2
Type of mentees