Pretty print qml.state() output in Latex

Hi,

Is there a simple function in PennyLane to nicely print a state in Latex?
I am basically looking for the equivalent of Qiskit’s “Statevector().draw(‘latex’)” as below.

import pennylane as qml
from qiskit.quantum_info import Statevector
dev = qml.device('default.qubit', wires = 2)
@qml.qnode(dev)
def circuit():
  qml.Hadamard(wires=0)
  qml.CNOT(wires=[0, 1])

  return qml.state()

Statevector(circuit()).draw('latex')
#Equivalent pennylane function?

Thanks!

Hi @Juliette, welcome to the Forum!

We currently don’t have a function to do this in PennyLane. However this is very valuable feedback and we’ve noted it down to consider adding it to PennyLane for future releases.

Let us know if there’s anything else that you’d like to see in PennyLane!