tequila.hamiltonian.paulis.Projector

tequila.hamiltonian.paulis.Projector(wfn, threshold=0.0, n_qubits=None) → tequila.hamiltonian.qubit_hamiltonian.QubitHamiltonian[source]

Initialize a projector

Notes

Initialize a projector given by

\[H = \lvert \Psi \rangle \langle \Psi \rvert\]
Parameters
  • wfn (QubitWaveFunction or int, or string, or array) – The wavefunction onto which the projector projects Needs to be passed down as tequilas QubitWaveFunction type See the documentation on how to initialize a QubitWaveFunction from integer, string or array (can also be passed down diretly as one of those types)

  • threshold (float (Default value = 0.0)) – neglect small parts of the operator

  • n_qubits (only needed when an integer is given as wavefunction) –