Quantum++  v1.0-rc3
A modern C++11 quantum computing library
qpp::Codes Class Referencefinal

const Singleton class that defines quantum error correcting codes More...

#include <classes/codes.h>

Inheritance diagram for qpp::Codes:
Collaboration diagram for qpp::Codes:

Public Types

enum  Type { Type::FIVE_QUBIT = 1, Type::SEVEN_QUBIT_STEANE, Type::NINE_QUBIT_SHOR }
 Code types, add more codes here if needed. More...
 

Public Member Functions

ket codeword (Type type, idx i) const
 Returns the codeword of the specified code type. More...
 

Private Member Functions

 Codes ()
 Default constructor. More...
 
 ~Codes ()=default
 Default destructor. More...
 

Friends

class internal::Singleton< const Codes >
 

Additional Inherited Members

- Static Public Member Functions inherited from qpp::internal::Singleton< const Codes >
static const Codesget_instance () noexcept(std::is_nothrow_constructible< const Codes >::value)
 
static const Codesget_thread_local_instance () noexcept(std::is_nothrow_constructible< const Codes >::value)
 
- Protected Member Functions inherited from qpp::internal::Singleton< const Codes >
 Singleton () noexcept=default
 
 Singleton (const Singleton &)=delete
 
Singletonoperator= (const Singleton &)=delete
 
virtual ~Singleton ()=default
 

Detailed Description

const Singleton class that defines quantum error correcting codes

Member Enumeration Documentation

◆ Type

enum qpp::Codes::Type
strong

Code types, add more codes here if needed.

See also
qpp::Codes::codeword()
Enumerator
FIVE_QUBIT 

[[5,1,3]] qubit code

SEVEN_QUBIT_STEANE 

[[7,1,3]] Steane qubit code

NINE_QUBIT_SHOR 

[[9,1,3]] Shor qubit code

Constructor & Destructor Documentation

◆ Codes()

qpp::Codes::Codes ( )
inlineprivate

Default constructor.

◆ ~Codes()

qpp::Codes::~Codes ( )
privatedefault

Default destructor.

Member Function Documentation

◆ codeword()

ket qpp::Codes::codeword ( Type  type,
idx  i 
) const
inline

Returns the codeword of the specified code type.

See also
qpp::Codes::Type
Parameters
typeCode type
iCodeword index
Returns
i-th codeword of the code type

Friends And Related Function Documentation

◆ internal::Singleton< const Codes >

friend class internal::Singleton< const Codes >
friend

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