You're reading the documentation of the v0.6. For the latest released version, please have a look at v0.11.

Polarization Object

class perceval.utils.polarization.Polarization(v)

Polarization class

This class is defined values used by polarization annotations P

Parameters:

v (Union[str, Any, Tuple[Any, Any]]) – a string ([HVADLR]), a single angle or a pair of angle definition either symbolic or numeric. Angles should be in \([0,\pi]\) range.

Raise:

ValueError if the parameters are out of range, or invalid

static parse(s)

Parse a polarization value string

Parameters:

s (str) – should match regex: ^([HVADLR]|\(theta,phi\)|theta$

Return type:

Polarization

Returns:

a Polarization instance

Raise:

ValueError if the value cannot be parsed, or if parameters are invalid

project_eh_ev(use_symbolic=False)

Build Jones vector corresponding to the current instance

Return type:

Tuple[Any, Any]

Returns:

a pair of numeric or symbolic expressions

perceval.utils.polarization.convert_polarized_state(state, use_symbolic=False, inverse=False)

Convert a polarized BasicState into an expanded BasicState vector

Parameters:
  • inverse (bool) –

  • use_symbolic (bool) –

  • state (FockState) –

Return type:

Tuple[FockState, Matrix]

Returns: