Linopt
Linear optics circuit calculator
Classes | Typedefs | Functions
States

Linear optics states. More...

Classes

class  linopt::Fock
 The class representing a Fock state. More...
 
class  linopt::Basis
 The class representing a collection of Fock states. More...
 
class  linopt::State
 The class representing a linear optical state. More...
 

Typedefs

using linopt::FockAmpFunction = std::function< Complex(const Fock &)>
 A typedef of a function taking a Fock state as an argument and returning a corresponding complex_type amplitude.
 

Functions

bool linopt::operator== (const Fock &f, const Fock &g)
 Tests whether two Fock states are equal.
 
bool linopt::operator< (const Fock &f, const Fock &g)
 Compares two Fock states in lexicographic order. More...
 
bool linopt::operator!= (const Fock &f, const Fock &g)
 Tests whether two Fock states differ.
 
bool linopt::operator> (const Fock &f, const Fock &g)
 Compares two Fock states in lexicographic order. More...
 
bool linopt::operator<= (const Fock &f, const Fock &g)
 Compares two Fock states in lexicographic order. More...
 
bool linopt::operator>= (const Fock &f, const Fock &g)
 Compares two Fock states in lexicographic order. More...
 
State linopt::operator* (Complex x, const State &s)
 Multiplies a state by a complex number.
 
Complex linopt::dot (const State &a, const State &b)
 Calculates a dot (scalar) product.
 

Detailed Description

Linear optics states.

Function Documentation

◆ operator<()

bool linopt::operator< ( const Fock f,
const Fock g 
)
inline

Compares two Fock states in lexicographic order.

Returns
true if f is less than g.

◆ operator<=()

bool linopt::operator<= ( const Fock f,
const Fock g 
)
inline

Compares two Fock states in lexicographic order.

Returns
true if f is less or equal than g.

◆ operator>()

bool linopt::operator> ( const Fock f,
const Fock g 
)
inline

Compares two Fock states in lexicographic order.

Returns
true if f is greater than g.

◆ operator>=()

bool linopt::operator>= ( const Fock f,
const Fock g 
)
inline

Compares two Fock states in lexicographic order.

Returns
true if f is greater or equal than g.