Main Page | Namespace List | Class Hierarchy | Class List | Directories | File List | Namespace Members | Class Members | File Members | Examples

PyNet Class Reference

#include <PyNet.h>

Inheritance diagram for PyNet:

Net List of all members.

Public Types

typedef complex< double > cdouble

Public Member Functions

 PyNet (double d)
 Usual constructor via a desired tile 'width'.
 PyNet (string s)
 Accepts a filename and loads a pre-saved Net from it.
 ~PyNet ()
 DESTROY THEM ALL.
void save (std::string file)
 Save a generated Net into a file.
void generate (dict &d, int max_depth)
 Accepts a python dictionary mapping gate labels => matrices.
std::string approximate (boost::python::list &m)
 Return the closest approximating sequence to a matrix.
boost::python::list evaluate (std::string s)
 Evaluate a string and return the resulting matrix as a flat list.
boost::python::list solovay_kitaev (boost::python::list &m, int d)
 Wrap the Solovay-Kitaev function.

Member Typedef Documentation

typedef complex<double> PyNet::cdouble
 

Reimplemented from Net.


Constructor & Destructor Documentation

PyNet::PyNet double  d  )  [inline]
 

Usual constructor via a desired tile 'width'.

PyNet::PyNet string  s  )  [inline]
 

Accepts a filename and loads a pre-saved Net from it.

PyNet::~PyNet  )  [inline]
 

DESTROY THEM ALL.


Member Function Documentation

std::string PyNet::approximate boost::python::list &  m  )  [inline]
 

Return the closest approximating sequence to a matrix.

The matrix needs to be passed as a flat list of length 4

boost::python::list PyNet::evaluate std::string  s  )  [inline]
 

Evaluate a string and return the resulting matrix as a flat list.

void PyNet::generate dict &  d,
int  max_depth
[inline]
 

Accepts a python dictionary mapping gate labels => matrices.

Matrices should be passed as a flat list

void PyNet::save std::string  file  )  [inline]
 

Save a generated Net into a file.

boost::python::list PyNet::solovay_kitaev boost::python::list &  m,
int  d
[inline]
 

Wrap the Solovay-Kitaev function.

Python has no concept of the Net::knot, or of the Matrix<cdouble>, so we'll return everything as a flat list and deal with it in the sk module


The documentation for this class was generated from the following file:
Generated on Sun Jul 10 21:57:14 2005 by  doxygen 1.4.1