CSS product code  0.1
C++ library to estimate distance of CSS codes. Some particular construction of CSS codes are implemented.
CSSCode Class Reference

#include <product_lib.h>

+ Inheritance diagram for CSSCode:

Public Member Functions

 CSSCode ()
 
 CSSCode (int na, int Gax_row, int id_Gax, int Gaz_row, int id_Gaz)
 
int generate_by_id (int debug)
 
int getRandomCode ()
 
int getGoodCode (int debug)
 
bool is_valid ()
 
void dist ()
 
int min_weight_dist_x ()
 
int min_weight_dist_z ()
 
int rand_dist_x ()
 
int rand_dist_z ()
 
void get_713_code ()
 

Public Attributes

itpp::GF2mat Gx
 
itpp::GF2mat Gz
 
itpp::GF2mat Cx
 
itpp::GF2mat Cz
 
itpp::bvec min_weight_codeword
 
int n
 
int Gx_row
 
int Gz_row
 
int id_Gx
 
int id_Gz
 
int dx
 
int dz
 
int is_defined =0
 
int is_C_defined =0
 

Detailed Description

a wrapper of data for a CSS code

Definition at line 54 of file product_lib.h.

Constructor & Destructor Documentation

◆ CSSCode() [1/2]

CSSCode::CSSCode ( )

Definition at line 74 of file product_lib.cpp.

◆ CSSCode() [2/2]

CSSCode::CSSCode ( int  na,
int  Gax_row,
int  id_Gax,
int  Gaz_row,
int  id_Gaz 
)
Parameters
id_Gaxsee definition in generate_code()
id_Gazsee definition in generate_code()

Definition at line 75 of file product_lib.cpp.

Member Function Documentation

◆ dist()

void CSSCode::dist ( )

call rand_dist to estimate dx and dz

Definition at line 100 of file product_lib.cpp.

◆ generate_by_id()

int CSSCode::generate_by_id ( int  debug)

Definition at line 80 of file product_lib.cpp.

◆ get_713_code()

void CSSCode::get_713_code ( )

generate 7 qubit hamming code

Definition at line 120 of file product_lib.cpp.

◆ getGoodCode()

int CSSCode::getGoodCode ( int  debug)

Definition at line 89 of file product_lib.cpp.

◆ getRandomCode()

int CSSCode::getRandomCode ( )

the G matrices may not be full rank

Definition at line 85 of file product_lib.cpp.

◆ is_valid()

bool CSSCode::is_valid ( )

Definition at line 93 of file product_lib.cpp.

◆ min_weight_dist_x()

int CSSCode::min_weight_dist_x ( )

Definition at line 106 of file product_lib.cpp.

◆ min_weight_dist_z()

int CSSCode::min_weight_dist_z ( )

Definition at line 109 of file product_lib.cpp.

◆ rand_dist_x()

int CSSCode::rand_dist_x ( )

Definition at line 113 of file product_lib.cpp.

◆ rand_dist_z()

int CSSCode::rand_dist_z ( )

Definition at line 116 of file product_lib.cpp.

Member Data Documentation

◆ Cx

itpp::GF2mat CSSCode::Cx

Definition at line 58 of file product_lib.h.

◆ Cz

itpp::GF2mat CSSCode::Cz

Definition at line 59 of file product_lib.h.

◆ dx

int CSSCode::dx

id used when enumerating all cases

Definition at line 65 of file product_lib.h.

◆ dz

int CSSCode::dz

Definition at line 65 of file product_lib.h.

◆ Gx

itpp::GF2mat CSSCode::Gx

Definition at line 56 of file product_lib.h.

◆ Gx_row

int CSSCode::Gx_row

Definition at line 62 of file product_lib.h.

◆ Gz

itpp::GF2mat CSSCode::Gz

Definition at line 57 of file product_lib.h.

◆ Gz_row

int CSSCode::Gz_row

Definition at line 62 of file product_lib.h.

◆ id_Gx

int CSSCode::id_Gx

Definition at line 63 of file product_lib.h.

◆ id_Gz

int CSSCode::id_Gz

Definition at line 63 of file product_lib.h.

◆ is_C_defined

int CSSCode::is_C_defined =0

Definition at line 66 of file product_lib.h.

◆ is_defined

int CSSCode::is_defined =0

Definition at line 66 of file product_lib.h.

◆ min_weight_codeword

itpp::bvec CSSCode::min_weight_codeword

Definition at line 60 of file product_lib.h.

◆ n

int CSSCode::n

Definition at line 61 of file product_lib.h.


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