openfermion.transforms.weyl_polynomial_quantization

Apply the Weyl quantization to a phase space polynomial.

Main aliases

openfermion.transforms.repconversions.weyl_ordering.weyl_polynomial_quantization, openfermion.transforms.repconversions.weyl_polynomial_quantization, openfermion.weyl_polynomial_quantization

Used in the notebooks

The Weyl quantization is performed by applying McCoy's formula directly to a polynomial term of the form q^m p^n:

qmpn>(1/2n)sumnr=0Binomial(n,r)ˆqrˆpmqnr

where q and p are phase space variables, and \hat{q} and \hat{p} are quadrature operators.

The input is provided in the form of a string, for example

.. code-block:: python

weyl_polynomial_quantization('q0^2 p0^3 q1^3')

where 'q' or 'p' is the phase space quadrature variable, the integer directly following is the mode it is with respect to, and '^2' is the polynomial power.

polynomial str

polynomial function of q and p of the form 'qi^m pj^n ...' where i,j are the modes, and m, n the powers.

QuadOperator the Weyl quantization of the phase space function.

The runtime of this method is exponential in the maximum locality of the original operator.