32 #ifndef CLASSES_EXCEPTION1_H_ 33 #define CLASSES_EXCEPTION1_H_ 81 Exception(
const std::string& where) : where_{where} {}
88 virtual const char*
what() const noexcept
override {
107 return "qpp::exception::Exception";
120 return "UNKNOWN EXCEPTION";
135 return "Object has zero size";
150 return "Matrix is not square";
165 return "Matrix is not a column vector";
180 return "Matrix is not a row vector";
195 return "Matrix is not a vector";
210 return "Matrix is not square nor column vector";
225 return "Matrix is not square nor row vector";
240 return "Matrix is not square nor vector";
255 return "Matrix mismatch subsystems";
270 return "Invalid dimension(s)";
285 return "Dimensions not equal";
301 return "Dimension(s) mismatch matrix size";
317 return "Dimension(s) mismatch column vector size";
333 return "Dimension(s) mismatch row vector size";
350 return "Dimension(s) mismatch vector size";
366 return "Subsystems mismatch dimensions";
381 return "Invalid permutation";
397 return "Permutation mismatch dimensions";
412 return "Matrix is not 2 x 2";
427 return "Column vector is not 2 x 1";
442 return "Row vector is not 1 x 2";
457 return "Vector is not 2 x 1 nor 1 x 2";
472 return "Subsystems are not qubits";
501 return "Codeword does not exist";
516 return "Parameter out of range";
557 return "Not defined for this type";
573 return "CUSTOM EXCEPTION " + what_;
Dimensions not equal exception.
Definition: exception.h:282
Dimension(s) mismatch matrix size exception.
Definition: exception.h:298
std::string type_description() const override
Exception type description.
Definition: exception.h:134
Matrix is not a vector exception.
Definition: exception.h:192
Matrix is not square nor vector exception.
Definition: exception.h:237
Not defined for this type exception.
Definition: exception.h:554
Custom exception.
Definition: exception.h:569
std::string type_description() const override
Exception type description.
Definition: exception.h:441
std::string type_description() const override
Exception type description.
Definition: exception.h:316
std::string type_description() const override
Exception type description.
Definition: exception.h:500
std::string type_description() const override
Exception type description.
Definition: exception.h:515
Subsystems mismatch dimensions exception.
Definition: exception.h:363
std::string type_description() const override
Exception type description.
Definition: exception.h:543
std::string type_description() const override
Exception type description.
Definition: exception.h:179
Matrix is not a column vector exception.
Definition: exception.h:162
Quantum++ main namespace.
Definition: codes.h:35
std::string type_description() const override
Exception type description.
Definition: exception.h:365
std::string type_description() const override
Exception type description.
Definition: exception.h:194
std::string where_
Definition: exception.h:73
Matrix is not square nor column vector exception.
Definition: exception.h:207
std::string type_description() const override
Exception type description.
Definition: exception.h:209
Invalid dimension(s) exception.
Definition: exception.h:267
Subsystems are not qubits exception.
Definition: exception.h:469
Not bi-partite exception.
Definition: exception.h:484
Dimension(s) mismatch row vector size exception.
Definition: exception.h:330
std::string type_description() const override
Exception type description.
Definition: exception.h:556
Column vector is not 2 x 1 exception.
Definition: exception.h:424
std::string type_description() const override
Exception type description.
Definition: exception.h:486
Invalid permutation exception.
Definition: exception.h:378
std::string type_description() const override
Exception type description.
Definition: exception.h:284
Exception(const std::string &where)
Constructs an exception.
Definition: exception.h:81
Matrix mismatch subsystems exception.
Definition: exception.h:252
Codeword does not exist exception.
Definition: exception.h:498
Vector is not 2 x 1 nor 1 x 2 exception.
Definition: exception.h:454
std::string type_description() const override
Exception type description.
Definition: exception.h:239
std::string type_description() const override
Exception type description.
Definition: exception.h:456
std::string type_description() const override
Exception type description.
Definition: exception.h:254
std::string type_description() const override
Exception type description.
Definition: exception.h:332
Dimension(s) mismatch column vector size exception.
Definition: exception.h:314
std::string type_description() const override
Exception type description.
Definition: exception.h:471
std::string type_description() const override
Exception type description.
Definition: exception.h:426
Type mismatch exception.
Definition: exception.h:528
std::string type_description() const override
Exception type description.
Definition: exception.h:119
std::string type_description() const override
Exception type description.
Definition: exception.h:411
Matrix is not a row vector exception.
Definition: exception.h:177
Row vector is not 1 x 2 exception.
Definition: exception.h:439
Parameter out of range exception.
Definition: exception.h:513
std::string type_description() const override
Exception type description.
Definition: exception.h:224
CustomException(const std::string &where, const std::string &what)
Definition: exception.h:577
Matrix is not 2 x 2 exception.
Definition: exception.h:409
std::string type_description() const override
Exception type description.
Definition: exception.h:349
Unknown exception.
Definition: exception.h:117
std::string type_description() const override
Exception type description.
Definition: exception.h:530
std::string type_description() const override
Exception type description.
Definition: exception.h:269
Dimension(s) mismatch vector size exception.
Definition: exception.h:347
std::string type_description() const override
Exception type description.
Definition: exception.h:300
Permutation mismatch dimensions exception.
Definition: exception.h:394
virtual const char * what() const noexcept override
Overrides std::exception::what()
Definition: exception.h:88
Size mismatch exception.
Definition: exception.h:541
std::string type_description() const override
Exception type description.
Definition: exception.h:572
Matrix is not square exception.
Definition: exception.h:147
std::string type_description() const override
Exception type description.
Definition: exception.h:164
std::string type_description() const override
Exception type description.
Definition: exception.h:149
std::string type_description() const override
Exception type description.
Definition: exception.h:380
Base class for generating Quantum++ custom exceptions.
Definition: exception.h:71
Matrix is not square nor row vector exception.
Definition: exception.h:222
std::string type_description() const override
Exception type description.
Definition: exception.h:396
virtual std::string type_description() const =0
Exception type description.
Definition: exception.h:106
Object has zero size exception.
Definition: exception.h:132