32 #ifndef CLASSES_EXCEPTION1_H_ 33 #define CLASSES_EXCEPTION1_H_ 82 Exception(
const std::string& where) : where_{where}, msg_{} {}
89 virtual const char*
what() const noexcept
override {
109 return "qpp::exception::Exception";
122 return "UNKNOWN EXCEPTION";
137 return "Object has zero size";
152 return "Matrix is not square";
167 return "Matrix is not a column vector";
182 return "Matrix is not a row vector";
197 return "Matrix is not a vector";
212 return "Matrix is not square nor column vector";
227 return "Matrix is not square nor row vector";
242 return "Matrix is not square nor vector";
257 return "Matrix mismatch subsystems";
272 return "Invalid dimension(s)";
287 return "Dimensions not equal";
303 return "Dimension(s) mismatch matrix size";
319 return "Dimension(s) mismatch column vector size";
335 return "Dimension(s) mismatch row vector size";
352 return "Dimension(s) mismatch vector size";
368 return "Subsystems mismatch dimensions";
383 return "Invalid permutation";
399 return "Permutation mismatch dimensions";
414 return "Matrix is not 2 x 2";
429 return "Column vector is not 2 x 1";
444 return "Row vector is not 1 x 2";
459 return "Vector is not 2 x 1 nor 1 x 2";
474 return "Subsystems are not qubits";
503 return "Codeword does not exist";
518 return "Parameter out of range";
559 return "Not defined for this type";
575 return "CUSTOM EXCEPTION " + what_;
Dimensions not equal exception.
Definition: exception.h:284
Dimension(s) mismatch matrix size exception.
Definition: exception.h:300
std::string type_description() const override
Exception type description.
Definition: exception.h:136
Matrix is not a vector exception.
Definition: exception.h:194
Matrix is not square nor vector exception.
Definition: exception.h:239
Not defined for this type exception.
Definition: exception.h:556
Custom exception.
Definition: exception.h:571
std::string type_description() const override
Exception type description.
Definition: exception.h:443
std::string type_description() const override
Exception type description.
Definition: exception.h:318
std::string type_description() const override
Exception type description.
Definition: exception.h:502
std::string type_description() const override
Exception type description.
Definition: exception.h:517
Subsystems mismatch dimensions exception.
Definition: exception.h:365
std::string type_description() const override
Exception type description.
Definition: exception.h:545
std::string type_description() const override
Exception type description.
Definition: exception.h:181
Matrix is not a column vector exception.
Definition: exception.h:164
Quantum++ main namespace.
Definition: codes.h:35
std::string type_description() const override
Exception type description.
Definition: exception.h:367
std::string type_description() const override
Exception type description.
Definition: exception.h:196
std::string where_
Definition: exception.h:73
Matrix is not square nor column vector exception.
Definition: exception.h:209
std::string type_description() const override
Exception type description.
Definition: exception.h:211
Invalid dimension(s) exception.
Definition: exception.h:269
Subsystems are not qubits exception.
Definition: exception.h:471
Not bi-partite exception.
Definition: exception.h:486
Dimension(s) mismatch row vector size exception.
Definition: exception.h:332
std::string type_description() const override
Exception type description.
Definition: exception.h:558
Column vector is not 2 x 1 exception.
Definition: exception.h:426
std::string type_description() const override
Exception type description.
Definition: exception.h:488
Invalid permutation exception.
Definition: exception.h:380
std::string type_description() const override
Exception type description.
Definition: exception.h:286
Exception(const std::string &where)
Constructs an exception.
Definition: exception.h:82
Matrix mismatch subsystems exception.
Definition: exception.h:254
Codeword does not exist exception.
Definition: exception.h:500
Vector is not 2 x 1 nor 1 x 2 exception.
Definition: exception.h:456
std::string type_description() const override
Exception type description.
Definition: exception.h:241
std::string type_description() const override
Exception type description.
Definition: exception.h:458
std::string type_description() const override
Exception type description.
Definition: exception.h:256
std::string type_description() const override
Exception type description.
Definition: exception.h:334
Dimension(s) mismatch column vector size exception.
Definition: exception.h:316
std::string type_description() const override
Exception type description.
Definition: exception.h:473
std::string type_description() const override
Exception type description.
Definition: exception.h:428
Type mismatch exception.
Definition: exception.h:530
std::string type_description() const override
Exception type description.
Definition: exception.h:121
std::string type_description() const override
Exception type description.
Definition: exception.h:413
Matrix is not a row vector exception.
Definition: exception.h:179
std::string msg_
Definition: exception.h:74
Row vector is not 1 x 2 exception.
Definition: exception.h:441
Parameter out of range exception.
Definition: exception.h:515
std::string type_description() const override
Exception type description.
Definition: exception.h:226
CustomException(const std::string &where, const std::string &what)
Definition: exception.h:579
Matrix is not 2 x 2 exception.
Definition: exception.h:411
std::string type_description() const override
Exception type description.
Definition: exception.h:351
Unknown exception.
Definition: exception.h:119
std::string type_description() const override
Exception type description.
Definition: exception.h:532
std::string type_description() const override
Exception type description.
Definition: exception.h:271
Dimension(s) mismatch vector size exception.
Definition: exception.h:349
std::string type_description() const override
Exception type description.
Definition: exception.h:302
Permutation mismatch dimensions exception.
Definition: exception.h:396
virtual const char * what() const noexcept override
Overrides std::exception::what()
Definition: exception.h:89
Size mismatch exception.
Definition: exception.h:543
std::string type_description() const override
Exception type description.
Definition: exception.h:574
Matrix is not square exception.
Definition: exception.h:149
std::string type_description() const override
Exception type description.
Definition: exception.h:166
std::string type_description() const override
Exception type description.
Definition: exception.h:151
std::string type_description() const override
Exception type description.
Definition: exception.h:382
Base class for generating Quantum++ custom exceptions.
Definition: exception.h:71
Matrix is not square nor row vector exception.
Definition: exception.h:224
std::string type_description() const override
Exception type description.
Definition: exception.h:398
virtual std::string type_description() const =0
Exception type description.
Definition: exception.h:108
Object has zero size exception.
Definition: exception.h:134