Hi, I implemented the circuit in qiskit and it seems to be correct if I draw it using circuit.draw('mpl'). I computed |0⟩⟨0|⊗I +|1⟩⟨1|⊗U as one matrix in numpy and then converted it into a UnitaryGate, which I then applied to the right qubits. However, I'm getting seemingly random trace estimation results. Does anyone have an idea where I could be going wrong by any chance? This is my result for circuit.draw('mpl'):
![Circuit](https://moodlearchive.epfl.ch/2023-2024/pluginfile.php/2843911/mod_forum/post/188016/Screenshot.png?time=1703068468958)
Thanks in advance for any responses.