Quantum Fog  0.9.3
Public Member Functions | Public Attributes | List of all members
prefabricated_nodes.Polarizer.Polarizer Class Reference
Inheritance diagram for prefabricated_nodes.Polarizer.Polarizer:
Inheritance graph
[legend]
Collaboration diagram for prefabricated_nodes.Polarizer.Polarizer:
Collaboration graph
[legend]

Public Member Functions

def __init__ (self, id_num, name, in_nd, theta_degs, max_n_sum=10000)
 
def fill_trans_mat_and_st_names_of_nd (self, mx, my, dry_run=False)
 
def get_expected_degen (self, mx, my)
 
def get_pol_amp (self, nx, ny, nloss, mx, my)
 
- Public Member Functions inherited from nodes.BayesNode.BayesNode
def __init__ (self, id_num, name="blank", size=2)
 
def set_potential (self, pot)
 
def resize (self, size)
 
def set_state_name (self, position, name)
 
def st_name_index (self, st_name)
 
def forget_all_evidence (self)
 
def get_active_states (self)
 
def set_active_states (self, states)
 
def set_state_names_to_product (self, list_of_iters, repeat=1, trim=False)
 
- Public Member Functions inherited from nodes.DirectedNode.DirectedNode
def __init__ (self, id_num, name="blank")
 
def add_parent (self, node)
 
def add_parents (self, node_list)
 
def remove_parent (self, node)
 
def has_parent (self, node)
 
def add_child (self, node)
 
def add_children (self, node_list)
 
def remove_child (self, node)
 
def has_child (self, node)
 
def undirect (self)
 
def get_markov_blanket (self)
 
- Public Member Functions inherited from nodes.Node.Node
def __init__ (self, id_num, name="blank")
 
def __lt__ (self, other)
 
def add_neighbor (self, node)
 
def remove_neighbor (self, node)
 
def has_neighbor (self, node)
 

Public Attributes

 theta_degs
 
 true_max_n_sum
 
 max_n_sum
 
 potential
 
- Public Attributes inherited from nodes.BayesNode.BayesNode
 size
 
 state_names
 
 clique
 
 potential
 
- Public Attributes inherited from nodes.DirectedNode.DirectedNode
 parents
 
 children
 
 neighbors
 
- Public Attributes inherited from nodes.Node.Node
 id_num
 
 topo_index
 
 name
 
 neighbors
 
 visited
 

Additional Inherited Members

- Properties inherited from nodes.BayesNode.BayesNode
 active_states = property(get_active_states, set_active_states)
 

Detailed Description

The Constructor of this class builds a BayesNode that has a transition
matrix appropriate for a polarizer that projects an electric field E to
to an electric field E'. 'theta_degs' is the angle in degrees between
the X axis and the direction of the polarization axis, which is the same
as the direction of E'.

The following is expected:

* the focus node has exactly one parent node,

* the parent node is a vector-field node, meaning it has states labelled
(Nx, Ny), where Nx and Ny are integers.

Quantum Fog gives names of the form (Nx, Ny)Nloss to the states of the
Polarizer. Nx, Ny and Nloss are non-negative integers. Nx refers to the
number of outgoing photons polarized in the X direction, Ny to the number of
outgoing photons polarized in the Y direction, and Nloss to the number of
photons absorbed by the polarizer.

See BeamSplitter class for explanation of parameter 'max_n_sum'

More information about polarizer nodes can be found in the
documents entitled "Quantum Fog Manual", and "Quantum Fog Library Of
Essays" that are included with the legacy QFog.

Attributes
----------
theta_degs : float
max_n_sum : int
true_max_n_sum : bool

potential : Potential
active_states : list[int]
clique : Clique
size : int
state_names : list[str]
children : set[BayesNode]
neighbors : set[BayesNode]
parents : set[BayesNode]
id_num : int
topo_index : int
name : str
visited : bool

Constructor & Destructor Documentation

def prefabricated_nodes.Polarizer.Polarizer.__init__ (   self,
  id_num,
  name,
  in_nd,
  theta_degs,
  max_n_sum = 10000 
)
Constructor

Parameters
----------
id_num : int
    id number of self (focus node)
name : str
    name of self (focus node)
in_nd : BayesNode
    input node
theta_degs : float
max_n_sum : float

Returns
-------

Member Function Documentation

def prefabricated_nodes.Polarizer.Polarizer.fill_trans_mat_and_st_names_of_nd (   self,
  mx,
  my,
  dry_run = False 
)
When dry_run=False, this method fills the transition matrix and
state names of the focus node. For dry_run=True, this method doesn't
change any of the attributes of the self object; it just calculates
the expected size=degeneracy of the focus node.

Parameters
----------
mx : list[int]
my : list[int]
dry_run : bool

Returns
-------
None | int
def prefabricated_nodes.Polarizer.Polarizer.get_expected_degen (   self,
  mx,
  my 
)
Get expected degeneracy=size of focus node.

Parameters
----------
mx : list[int]
my : list[int]

Returns
-------
int
def prefabricated_nodes.Polarizer.Polarizer.get_pol_amp (   self,
  nx,
  ny,
  nloss,
  mx,
  my 
)
Calculate the polarizer amplitude.

notation <nx, ny, nloss | operator | mx, my>

Parameters
----------
nx : int
ny : int
nloss : int
mx : int
my : int

Returns
-------
complex

The documentation for this class was generated from the following file: