Skip to content

Commit

Permalink
SU(n) decomposition (#665)
Browse files Browse the repository at this point in the history
* impl [decompositions] - compact_sun

* test [decompositions] - test_sun_reconstruction

* refactor [test_decompositions] - compact_sun: asarray instead of asmatrix

* refactor [compact_sun] - use `int` instead of `str` for params

* impl [decomposition] - compact_sun: decompose U(n) as well as SU(n)

* test [decompositions] - compact_sun: add and refactor tests

* fix [ops] - Interferometer._decompose: do not decompose identity

ensure there is no decomposition when the unitary is the identity

* refactor [ops] - _sun_compact_cmds: add global phase into commands

* format - black

* fix [ops] - Interferometer._decompose: do not decompose identity

ensure there is no decomposition when the unitary is the identity

* test [ops_decompositions] - Interferomenter: test all available decompositions

* typo [decompositions]

* rename [test_decomposition] - test class

* refactor [sun_compact] - use copy of array

* refactor [decomposition] - commands: use mode numeration starting from 0

* fix [ops] - _sun_compact_cmds: phases and cmds

* test [integration/decompositions/gaussian] - test_interferometer_sun_compact

* test [frontend/ops_decompositions] - parametrize test for different number of modes

* remove [notebook]

* test [ops_decompositions] - test_identity: bump `num_modes` to 6

* format [black]

* fix [ops/Interferometer] - _decompose:  `not self.identity or not drop_identity`

* fix [test_ops_decompositions] - test_identity: remove meshes from parametrization

* docs [ops] - sun_compact and private funcs

* fix [decomposition] - code factor

* fix [decompositions] - string r prefix

* refactor/fix [decompositions] - codefactor

* test [decompositions] - test_su2_embeded

* format - black

* refactor [decompositions] - _build_staircase: use asarray intead of asmatrix

* test [decomposition] - test_u3_embeded

* impl [test_decompositions] - test_u4_embeded

* impl [test_decompositions] - test_u4_embeded

* refactor [decompositions] - _build_staircase

- use `@` for matrix multiplication
- add tolerances to checks
- refactor creation of numpy arrays

* test [SUnFactorization] - test_u4_embeded

* test [SUnDecomposition] - test_embeded_unitary: rename, add missing test case

* format - black

* refactor [decompositions] - SUn related: clean up docs and code

* Apply suggestions from code review

Co-authored-by: Theodor <theodor@xanadu.ai>

Co-authored-by: Theodor <theodor@xanadu.ai>
Co-authored-by: Nicolas Quesada <991946+nquesada@users.noreply.github.com>
  • Loading branch information
3 people committed Feb 24, 2022
1 parent 9e6eff1 commit de3bdf4
Show file tree
Hide file tree
Showing 6 changed files with 634 additions and 8 deletions.
30 changes: 29 additions & 1 deletion doc/references.bib
Original file line number Diff line number Diff line change
Expand Up @@ -1066,8 +1066,36 @@ @article{schmidt1993general
}

@article{jahangiri2020quantum,
title={Quantum Algorithm for Simulating Molecular Vibrational Excitations},
title={Quantum Algorithm for Simulating Molecular Vibrational Excitations},
author={Soran Jahangiri and Juan Miguel Arrazola and Nicolás Quesada and Alain Delgado},
journal={arXiv:2006.13339},
year={2020}
}

@article{deguise2018simple,
title = {Simple factorization of unitary transformations},
author = {de Guise, Hubert and Di Matteo, Olivia and S\'anchez-Soto, Luis L.},
journal = {Phys. Rev. A},
volume = {97},
issue = {2},
pages = {022328},
numpages = {7},
year = {2018},
month = {Feb},
publisher = {American Physical Society},
doi = {10.1103/PhysRevA.97.022328},
url = {https://link.aps.org/doi/10.1103/PhysRevA.97.022328}
}

@article{rowe1999representations,
title = {Representations of the Weyl group and Wigner functions for SU(3)},
author = {Rowe,D. J. and Sanders,B. C. and de Guise,H.},
year = 1999,
journal = {Journal of Mathematical Physics},
volume = 40,
number = 7,
pages = {3604--3615},
doi = {10.1063/1.532911},
url = {https://doi.org/10.1063/1.532911},
eprint = {https://doi.org/10.1063/1.532911}
}

0 comments on commit de3bdf4

Please sign in to comment.