Observables

About the Observables class

The WaveBlocks Project

@author: R. Bourquin @copyright: Copyright (C) 2010, 2011, 2012, 2013, 2014, 2015, 2016 R. Bourquin @license: Modified BSD License

Inheritance diagram

Inheritance diagram of Observables

Class documentation

class WaveBlocksND.Observables[source]

This class is the interface definition for general observable computation procedures.

kinetic_energy(ket, T)[source]

Compute the kinetic energy E_{\text{kin}} := \langle\psi|T|\psi\rangle.

Parameters:
  • ket – The object denoted by \psi.
  • T – The kinetic energy operator T.
Raise:

NotImplementedError Abstract interface.

norm(ket)[source]

Compute the L^2 norm \sqrt{\langle\psi|\psi\rangle}.

Parameters:ket – The object denoted by \psi.
Raise:NotImplementedError Abstract interface.
potential_energy(ket, potential)[source]

Compute the potential energy E_{\text{pot}} := \langle\psi|V|\psi\rangle.

Parameters:
  • ket – The object denoted by \psi.
  • potential – The potential V(x).
Raise:

NotImplementedError Abstract interface.