I am trying to build two qudit CX (d-dim) gate.
There is no issue in the unitary matrix. Please suggest to resolve the error.
Quantum Computing Stack Exchange is a question and answer site for engineers, scientists, programmers, and computing professionals interested in quantum computing. It only takes a minute to sign up.
Sign up to join this community_qid_shape_
should return (self.d, self.d)
instead of (self.d * self.d,)
. You're currently asking or one $d^2$-level object instead of two $d$-level objects.
If you specify qid shape, you don't have to specify num qubits.