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

Improving integration of quantum_info module and qibojit #1136

Open
3 tasks done
renatomello opened this issue Dec 13, 2023 · 6 comments
Open
3 tasks done

Improving integration of quantum_info module and qibojit #1136

renatomello opened this issue Dec 13, 2023 · 6 comments
Assignees
Labels
enhancement New feature or request quantum_info module PRs and issues related to the quantum information module
Milestone

Comments

@renatomello
Copy link
Contributor

renatomello commented Dec 13, 2023

Right now, even though the quantum_info module is compatible to all backends, it is not making use of any of the jit properties from numba. Therefore, numpy and numba performances are the same across the board. It would be good to profile the module and see where it is worth to invest time to code custom operations in qibojit.

Tasks

Preview Give feedback
  1. enhancement
    BrunoLiegiBastonLiegi
  2. enhancement quantum_info module
    BrunoLiegiBastonLiegi
  3. documentation enhancement quantum_info module
    BrunoLiegiBastonLiegi
@renatomello renatomello changed the title Improving integration of quantum_info module and numba Improving integration of quantum_info module and qibojit Jan 12, 2024
@renatomello renatomello added enhancement New feature or request quantum_info module PRs and issues related to the quantum information module labels Jan 27, 2024
@renatomello renatomello added this to the Qibo 0.2.6 milestone Feb 4, 2024
@renatomello
Copy link
Contributor Author

renatomello commented Feb 4, 2024

@AlejandroSopena @BrunoLiegiBastonLiegi

This is list of the functions that have priority in being optimized in qibojit:

Basis:

  • comp_basis_to_pauli
  • pauli_to_comp_basis

Random ensembles:

  • random_statevector
  • random_density_matrix
  • random_unitary
  • random_quantum_channel
  • random_clifford

Superoperator transformations:

  • vectorization
  • unvectorization
  • _reshuffliing
  • to_pauli_liouville
  • choi_to_kraus
  • kraus_to_choi
  • kraus_to_stinespring
  • stinespring_to_kraus

@BrunoLiegiBastonLiegi
Copy link
Contributor

BrunoLiegiBastonLiegi commented Feb 14, 2024

@renatomello should we create a separate module in quantum_info, something like _utils.py and create the relative modules in qibojit for numba and cupy for this?
Then I thought we could delegate to the backend the loading of this utils through a method. For example in NumbaBackend:

@staticmethod
def _load_quantum_info_utils():
    from qibojit.quantum_info import _utils_cpu
    
    return _utils_cpu

and then the functions inside the quantum_info module will use the provided backend to load the utils and call them.

@renatomello
Copy link
Contributor Author

@renatomello should we create a separate module in quantum_info, something like _utils.py and create the relative modules in qibojit for numba and cupy for this? Then I thought we could delegate to the backend the loading of this utils through a method. For example in NumbaBackend:

@staticmethod
def _load_quantum_info_utils():
    from qibojit.quantum_info import _utils_cpu
    
    return _utils_cpu

and then the functions inside the quantum_info module will use the provided backend to load the utils and call them.

Which routines would be there?

@BrunoLiegiBastonLiegi
Copy link
Contributor

Which routines would be there?

All the ones we want to improve with numba and cupy

@renatomello
Copy link
Contributor Author

Which routines would be there?

All the ones we want to improve with numba and cupy

Then they'd have to be subroutines of the functions we have, because the functions we want to improve are all user-facing and part of specific submodules

@scarrazza scarrazza modified the milestones: Qibo 0.2.6, Qibo 0.2.7 Mar 13, 2024
@scarrazza scarrazza modified the milestones: Qibo 0.2.7, Qibo 0.2.8 Apr 5, 2024
@scarrazza scarrazza modified the milestones: Qibo 0.2.8, Qibo 0.2.9 May 23, 2024
@scarrazza scarrazza modified the milestones: Qibo 0.2.9, Qibo 0.2.10 Jun 25, 2024
@scarrazza scarrazza removed this from the Qibo 0.2.10 milestone Jul 24, 2024
@BrunoLiegiBastonLiegi
Copy link
Contributor

@AlejandroSopena @BrunoLiegiBastonLiegi

This is list of the functions that have priority in being optimized in qibojit:

Basis:

* [ ]  `comp_basis_to_pauli`

* [ ]  `pauli_to_comp_basis`

Random ensembles:

* [ ]  `random_statevector`

* [ ]  `random_density_matrix`

* [ ]  `random_unitary`

* [ ]  `random_quantum_channel`

* [ ]  `random_clifford`

Superoperator transformations:

* [ ]  `vectorization`

* [ ]  `unvectorization`

* [ ]  `_reshuffliing`

* [ ]  `to_pauli_liouville`

* [ ]  `choi_to_kraus`

* [ ]  `kraus_to_choi`

* [ ]  `kraus_to_stinespring`

* [ ]  `stinespring_to_kraus`

#1459 is trying to address the first two boxes (basis section)

@renatomello renatomello added this to the Qibo 0.2.13 milestone Sep 23, 2024
@scarrazza scarrazza modified the milestones: Qibo 0.2.14, Qibo 0.2.15 Nov 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request quantum_info module PRs and issues related to the quantum information module
Projects
None yet
Development

No branches or pull requests

5 participants