Program Listing for File exception.hpp

Return to documentation for file (/home/docs/checkouts/readthedocs.org/user_builds/qulacs-rtd/checkouts/latest/src/cppsim/exception.hpp)

#pragma once

#include <stdexcept>

class NotImplementedException : public std::logic_error {
public:
    NotImplementedException(const std::string& message)
        : std::logic_error(message) {}
};

class QuantumStateProcessorException : public std::logic_error {
public:
    QuantumStateProcessorException(const std::string& message)
        : std::logic_error(message) {}
};

class InvalidQubitCountException : public std::logic_error {
public:
    InvalidQubitCountException(const std::string& message)
        : std::logic_error(message) {}
};

class DuplicatedQubitIndexException : public std::logic_error {
public:
    DuplicatedQubitIndexException(const std::string& message)
        : std::logic_error(message) {}
};

class InvalidControlQubitException : public std::logic_error {
public:
    InvalidControlQubitException(const std::string& message)
        : std::logic_error(message) {}
};

class InvalidQuantumOperatorException : public std::logic_error {
public:
    InvalidQuantumOperatorException(const std::string& message)
        : std::logic_error(message) {}
};

class InvalidObservableException : public std::logic_error {
public:
    InvalidObservableException(const std::string& message)
        : std::logic_error(message) {}
};

class NonHermitianException : public std::logic_error {
public:
    NonHermitianException(const std::string& message)
        : std::logic_error(message) {}
};

class InvalidMatrixGateSizeException : public std::logic_error {
public:
    InvalidMatrixGateSizeException(const std::string& message)
        : std::logic_error(message) {}
};

class InvalidStateVectorSizeException : public std::logic_error {
public:
    InvalidStateVectorSizeException(const std::string& message)
        : std::logic_error(message) {}
};

class InvalidOpenfermionFormatException : public std::logic_error {
public:
    InvalidOpenfermionFormatException(const std::string& message)
        : std::logic_error(message) {}
};

class InvalidProbabilityDistributionException : public std::logic_error {
public:
    InvalidProbabilityDistributionException(const std::string& message)
        : std::logic_error(message) {}
};

class UndefinedUpdateFuncException : public std::logic_error {
public:
    UndefinedUpdateFuncException(const std::string& message)
        : std::logic_error(message) {}
};

class UnknownPTreePropertyValueException : public std::logic_error {
public:
    UnknownPTreePropertyValueException(const std::string& message)
        : std::logic_error(message) {}
};

class OperatorIndexOutOfRangeException : public std::out_of_range {
public:
    OperatorIndexOutOfRangeException(const std::string& message)
        : std::out_of_range(message) {}
};

class QubitIndexOutOfRangeException : public std::out_of_range {
public:
    QubitIndexOutOfRangeException(const std::string& message)
        : std::out_of_range(message) {}
};

class MatrixIndexOutOfRangeException : public std::out_of_range {
public:
    MatrixIndexOutOfRangeException(const std::string& message)
        : std::out_of_range(message) {}
};

class GateIndexOutOfRangeException : public std::out_of_range {
public:
    GateIndexOutOfRangeException(const std::string& message)
        : std::out_of_range(message) {}
};

class ParameterIndexOutOfRangeException : public std::out_of_range {
public:
    ParameterIndexOutOfRangeException(const std::string& message)
        : std::out_of_range(message) {}
};

class InvalidPauliIdentifierException : public std::domain_error {
public:
    InvalidPauliIdentifierException(const std::string& message)
        : std::domain_error(message) {}
};

class InvalidNoiseTypeIdentifierException : public std::domain_error {
public:
    InvalidNoiseTypeIdentifierException(const std::string& message)
        : std::domain_error(message) {}
};

class IOException : public std::runtime_error {
public:
    IOException(const std::string& message) : std::runtime_error(message) {}
};