Closed stavros11 closed 1 month ago
Attention: Patch coverage is 98.20359%
with 3 lines
in your changes are missing coverage. Please review.
Project coverage is 97.31%. Comparing base (
fe7757e
) to head (27584b2
). Report is 30 commits behind head on main.
I will mark this as ready for now, since it seems to be working, including the density matrix reconstruction. Here are some examples on qw5q_platinum: http://login.qrccluster.com:9000/JzsbXKB0T26IjrWFl2TNnQ== http://login.qrccluster.com:9000/OAqdcEbiTuK8707rI5zh1A==
One potential improvement is to attempt to merge this with the single qubit case, because currently a huge chuck of the code (and plotting) was copy-pasted, which I know is not ideal. However, I would wait for #813 to be merged before touching the single qubit tomography code. This could also be done later in another PR.
There is something wrong with the second. I am not sure if it is coming from a wrong phase in the CZ calibration, the tomography code, or the transpiler. Need to investigate more.
This is indeed a transpiler/compiler issue. If I use a circuit with Hadamard gates,
circuit = Circuit(2)
circuit.add(gates.H(0))
circuit.add(gates.H(1))
circuit.add(gates.CZ(0, 1))
circuit.add(gates.H(1))
I get the wrong Bell state: http://login.qrccluster.com:9000/s7AjawUQSZCPOLE0ONKhaQ==, while if I switch to GPI2 it works better:
circuit = Circuit(2)
circuit.add(gates.GPI2(0, phi=np.pi/2))
circuit.add(gates.GPI2(1, phi=np.pi/2))
circuit.add(gates.CZ(0, 1))
circuit.add(gates.X(0))
circuit.add(gates.GPI2(1, phi=np.pi/2))
This should now be ready for review.
The changes in single qubit state tomography routine are basically moving some code aroung (mainly from _plot
to a new function plot_reconstruction
) so that I can import and reuse in the two qubit routine, to avoid copy pasting. Most likely it is possible to reduce the code repetition between these two routines even further, but this requires changing a few more things on the way the single qubit case is done, which I didn't want to do here.
Here are some examples on qw5q_platinum with the new plots:
It looks good. Are we going to keep both plots ? If we do so, could we do something about the 1D plots with the color or bar transparency ?
State reconstruction is still TODO, for now I am plotting the probabilities (calculated from the shots) in the different measurement basis and comparing with theory.
Some examples from qw5q_platinum:
There is something wrong with the second. I am not sure if it is coming from a wrong phase in the CZ calibration, the tomography code, or the transpiler. Need to investigate more.
TODO:
Checklist:
master
main
main