Bandit is a software tool to identify vulnerabilities in Python code.
Two type of vulnerabilities were identified (both low severity):
1. use of assert
2. import of pickle
Both issues have been removed.
In fact other methods like GetStateSize() or GetPoolSize()
access information from the on the useful ranks only,
neglecting the dummy processes. The new method access
directly MPI_Comm_size(MPI_COMM_WORLD, ...) and returns
its value.
In addition, a few classes that were outside the qhipster namespace
(for example QubitRegister, Permutation, NoisyQureg)
are now part of iqs namespace.
* Add badge for Python build in README
* Create the python build with MPI: Action
* Update python MPI action
* Added the installation of MPICH in the Action
* deleted the file for the action
* Update CONTRIBUTING.md
* Update CONTRIBUTING.md
* Update CMakeLists.txt
For g++ compiler, use option "-O3" to optimize the binary.
* Update example grover_4qubit.cpp
* fixes to Dockerfile, get_started_examples
* Update python_build_mpi.yml
* Update python_build_no_mpi.yml
* Update Dockerfile
* Update import_iqs.py
Updated syntax for init and finalize functions for the MPI environment
Co-authored-by: giangiac <30329377+giangiac@users.noreply.github.com>
Co-authored-by: Fabio Baruffa <fbaru.dev@gmail.com>
Co-authored-by: giangiac <gian.giacomo.guerreschi@intel.com>
* Added markdown with Sphinx
Added .md and .rst into the markdown parser
Signed-off-by: Stanley Phoong <stanley.cheong.kwan.phoong@intel.com>
* Added CONTRIBUTING.md
Signed-off-by: Stanley Phoong <stanley.cheong.kwan.phoong@intel.com>
* Restructuring the project
Signed-off-by: Stanley Phoong <stanley.cheong.kwan.phoong@intel.com>
* Added ipynb source
Signed-off-by: Stanley Phoong <stanley.cheong.kwan.phoong@intel.com>
* Pushing requirements.txt
Signed-off-by: Stanley Phoong <stanley.cheong.kwan.phoong@intel.com>
* Remove the pkg-resources: bug
Signed-off-by: Stanley Phoong <stanley.cheong.kwan.phoong@intel.com>
* Added one more example and fixed the title for GST
Signed-off-by: Stanley Phoong <stanley.cheong.kwan.phoong@intel.com>
* Fixed title again
Signed-off-by: Stanley Phoong <stanley.cheong.kwan.phoong@intel.com>
* Fixing titles for getting started
Signed-off-by: Stanley Phoong <stanley.cheong.kwan.phoong@intel.com>
* Fixing ipynb title
Signed-off-by: Stanley Phoong <stanley.cheong.kwan.phoong@intel.com>
* Added Exhale, Breathe for Doxygen support
Signed-off-by: Stanley Phoong <stanley.cheong.kwan.phoong@intel.com>
* Remove the bug again
Signed-off-by: Stanley Phoong <stanley.cheong.kwan.phoong@intel.com>
* Fixed the relative path for doxygen
Signed-off-by: Stanley Phoong <stanley.cheong.kwan.phoong@intel.com>
* Updated the gitignore to ignore output from doxygen
Signed-off-by: Stanley Phoong <stanley.cheong.kwan.phoong@intel.com>
* Fixed section title and ipynb title
Signed-off-by: Stanley Phoong <stanley.cheong.kwan.phoong@intel.com>
* Finally fixed Example 1 and Example 2 markdown to show up
Signed-off-by: Stanley Phoong <stanley.cheong.kwan.phoong@intel.com>
* Update import_iqs.py
update the syntax of init and finalize functions for the MPI environment
* Update python_build_no_mpi.yml
test of new workflow to setup Miniconda
* Update python_build_mpi.yml
Co-authored-by: giangiac <30329377+giangiac@users.noreply.github.com>
In the example 'communication_reduction_via_qubit_reordering.cpp',
we simulate a simple circuit (with gates on the last 10 qubits only)
using the trivial qubit ordering and the inverse one.
With increasing number of MPI processes, the relative cost of the
simulation with inverse qubit order (w.r.t. the simulation with
trivial qubit order) decreases.
This is expected since no MPI communication is needed for the inverse order.
For naming consistency, the MPI environment is initialized via:
iqs.EnvInit()
and the finalization via:
iqs.EnvFinalize()
when the number of ranks is not a power of 2 or, in general, when some
of the ranks are dummy, we need to finalize them and terminate their execution
before proceding with the actual program.
The Python examples '/notebooks/python_mpi.py' and '/notebooks/python_script.py'
include appropriate code.
Add the possibility of reordering the qubits at the level of the data storage.
Consider that we have N qubits distributed among 2^P processes.
Previously:
* the first M=N-P qubits were local
* the last P qubits were global
Now we can choose the qubit order for storage and therefore select any M qubits to be local.
This possibility helps reducing the simulation time by avoiding MPI communication overhead.
Implementation:
* Add distributed implementation of (symmetric) SWAP-like gates.
* Extend class Permutation.
* Add documentation inside qureg.hpp about storage conventions.
* 'qubit' indicates program qubits, 'position' indicates data qubits
* GetGlobalAmplitude(index) returns the amplitude corresponding to the global index in input, considering that such index is expressed in terms of program qubits while the actual state is stored according to the data qubit order.
* Add QubitRegister functions to permute qubits. For example PermuteQubits(), PermuteLocalQubits(), ...
* Add unit tests covering the class Permutation class and novel QubitRegister methods.