How to prove quantum circuit identity in Qiskit? I am working on a simple quantum circuit identity. I proved it on paper with the tensor product, but i'm having trouble showing that with qiskit. I know I need to measure them somehow but i don't know how.
Can someone help? :)
You can check whether the unitary matrices are equivalent.

def circuits_equivalent(a, b):
    au = Operator(a)
    bu = Operator(b)
    return au.dim == bu.dim and np.allclose(au.data, bu.data)