How do I generate gates for qudits with $d=4$?

So I was working on a project with qudits (specifically d = 4) and came across a problem. How do I generate gates for these? I can construct Hadamard and X gates for these, but how does one approach other gates, like S and P?

• That depends what you want to do. Do you simply want to construct a universal gate set, or are you somewhat interested in an intrinsic stabilizer formalism for $d=4$? For the first goal: You can simply embed $d=2$ gates into $\mathbb C^4$ and tensor copies thereof. What I'm saying is that $n$ ququarts have a Hilbert space which is isomorphic to the one of $2n$ qubits. Hence, you can just use normal gate sets and you'll be universal for $U(4^n)\simeq U(2^{2n})$. May 4 at 6:57
• WHat do you mean by "generate"? Areyou talking about some sort of physical action, or merely "define"? May 4 at 10:34
• Yes I meant define, really sorry about being unclear, however MarkusHeinrich figured out what I was trying to achieve, however can you expand on embedding matrixes? I assume you dont mean expanding a to [a,a,a,a]. Thanks! May 4 at 16:31