Qutrit measurements in pennylane model

Assistance regarding implementing qutrit measurements into pennylane model.

Expectation values in the Z basis
exp_vals = [qml.expval(qml.PauliZ(position)) for position in range(n_qubits)]
return tuple(exp_vals)


Thank you.

Hey @kevinkawchak! Welcome to the forum :rocket:

You can see a complete list of qutrit operations that are available here:


You might also find this demo useful:

Let me know if that helps!

Thank you @isaacdevlugt,
I was able to run @Guillermo_Alonso’s demo modifying Tshift gates to obtain predictable sets of ternary outputs. What steps would I need to take to implement a user dataset for a classification task, coming from a deep learning port perspective?

Nice! The steps you’d need to take to train a qutrit circuit for a classification task will be extremely similar to what’s in our variational classifier demo. Let me know if that helps!