Closed mlazzarin closed 2 years ago
Thanks for the fix, it works for me. Do you get any other issues with the random state tests on GPU? For me all libraries we currently have on this branch (qibo, qiskit-gpu, qulacs-gpu and qcgpu) are working fine now. Of course we have the low tolerance in CU3 but this will be addressed in #21.
I haven't tested qulacs-gpu, but the others work fine.
One last thing we could do for QCGPU is to implement the RZZ gate and check if QAOA is passing. This should be easy, we can just copy the matrix from qulacs. Would you like to give a try here?
Ok, I'm on it.
One last thing we could do for QCGPU is to implement the RZZ gate and check if QAOA is passing. This should be easy, we can just copy the matrix from qulacs. Would you like to give a try here?
Unfortunately, it looks like QCGPU supports only 2x2 matrices.
ValueError: Gate is not a 2x2 matrix. For larger gates, please decompose into 2x2 matrices and/or use the controlled gate functionality.
Unfortunately, it looks like QCGPU supports only 2x2 matrices.
ValueError: Gate is not a 2x2 matrix. For larger gates, please decompose into 2x2 matrices and/or use the controlled gate functionality.
That's right, this is probably also why if you notice QCGPU.from_qasm
I implemented the SWAP as three CNOTs. QCGPU is a very lightweight library without many features. I guess we can merge this as it is.
Ok, I'll merge this PR.
The tests for
qcgpu
were failing due to a different definition of CU1 gates w.r.t. Qibo. I defined a custom CU1 gate and now the tests are ok.