quantumlib / Cirq

A Python framework for creating, editing, and invoking Noisy Intermediate Scale Quantum (NISQ) circuits.
Apache License 2.0
4.29k stars 1.02k forks source link

Investigate Possible Numerical Instability in 2q and 3q analytical decompositions #6770

Open NoureldinYosri opened 1 month ago

NoureldinYosri commented 1 month ago

After adding two_qubit_matrix_to_cz_operations and three_qubit_matrix_to_operations as base cases for quantum_shannon_decomposition, some tests started to become flaky #6765. The tests pass with new versions of numpy and fail with older versions. For now I marked those tests with xfail until we are in state where we run tests with only newer numpy versions. however there might be some numerical instabilities in those methods that we may be able to fix.

RahilJain1366 commented 1 month ago

Hi, I would like to take this up.

NoureldinYosri commented 1 month ago

@RahilJain1366 thanks for offering to help. I assigned the task to you

RahilJain1366 commented 1 month ago

Thank you @NoureldinYosri for assigning it me. I wanted to confirm my understanding. I need to replicate the two_qubit_matrix_to_cz_operations and three_qubit_matrix_to_operations on quantum_shannon_decomposition in an older version of numpy? Am I right?

NoureldinYosri commented 1 month ago

this is a start ... see if you can use an old version of numpy to make the tests marked in #6767 fail ... then if you can propose a fix

dv8081 commented 1 month ago

@NoureldinYosri Could you please assign me to this issue as well?