i am trying to verify qiskit's get_unitary() result. this is my code:
from qiskit.visualization import array_to_latex
qc6 = QuantumCircuit(2)
qc6.h(1)
qc6.x(0)
qc6.cx(1,0)
qc6.draw()
qc6.save_unitary()
resultqc6 = sim.run(assemble(qc6)).result()
stateqc6 = resultqc6.get_unitary()
array_to_latex(stateqc6)
and here is the output matrix that i get:
but when i am trying to calculate the unitary matrix, i get a different result! can anyOne point out what am i doint wrong? this is how i do it : (H ⊗ X)(CNOT):