Skip to content

Commit

Permalink
Typo
Browse files Browse the repository at this point in the history
Signed-off-by: Vlad Gheorghiu <vsoftco@gmail.com>
  • Loading branch information
vsoftco committed Jul 28, 2024
1 parent 921f1a0 commit a438a71
Showing 1 changed file with 10 additions and 9 deletions.
19 changes: 10 additions & 9 deletions include/qpp/classes/qcircuit.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@
#include "qpp/internal/util.hpp"

namespace qpp {
// forward declaration
namespace internal {
class QCircuitIterator;
}
Expand Down Expand Up @@ -4597,15 +4598,15 @@ class QCircuit : public IDisplay, public IJSON {

namespace internal {
/**
* \class qpp::QCircuitIterator
* \class qpp::internal::QCircuitIterator
* \brief Quantum circuit description bound-checking (safe) forward iterator
*
* \note The iterator is a const_iterator by default
*/
class QCircuitIterator {
/**
* \class qpp::QCircuitIterator::value_type_
* \brief Value type class for qpp::QCircuitIterator
* \class qpp::internal::QCircuitIterator::value_type_
* \brief Value type class for qpp::internal::QCircuitIterator
*/
class value_type_ : public IDisplay /*, IJSON*/ {
///< non-owning pointer to the grand-parent const quantum circuit
Expand Down Expand Up @@ -4816,22 +4817,22 @@ class QCircuitIterator {
// protects against incrementing invalid iterators
if (qc_ptr_ == nullptr) {
throw exception::InvalidIterator(
"qpp::QCircuitIterator::operator++()",
"qpp::internal::QCircuitIterator::operator++()",
"No qpp::QCircuit assigned");
}

idx num_steps = qc_ptr_->get_step_count();
// protects against incrementing an empty circuit iterator
if (num_steps == 0) {
throw exception::InvalidIterator(
"qpp::QCircuitIterator::operator++()",
"qpp::internal::QCircuitIterator::operator++()",
"Zero-sized qpp::QCircuit");
}

// protects against incrementing past the end
if (ip_ == num_steps) {
throw exception::InvalidIterator(
"qpp::QCircuitIterator::operator++()",
"qpp::internal::QCircuitIterator::operator++()",
"Incrementing past the end");
}
// END EXCEPTION CHECKS
Expand Down Expand Up @@ -4887,17 +4888,17 @@ class QCircuitIterator {
idx num_steps = qc_ptr_->get_step_count();
if (qc_ptr_ == nullptr) {
throw exception::InvalidIterator(
"qpp::QCircuitIterator::operator*()",
"qpp::internal::QCircuitIterator::operator*()",
"No qpp::QCircuit assigned");
}
if (num_steps == 0) {
throw exception::InvalidIterator(
"qpp::QCircuitIterator::operator*()",
"qpp::internal::QCircuitIterator::operator*()",
"Zero-sized qpp::QCircuit");
}
if (ip_ == num_steps) {
throw exception::InvalidIterator(
"qpp::QCircuitIterator::operator*()",
"qpp::internal::QCircuitIterator::operator*()",
"Dereferencing past the end");
}
// END EXCEPTION CHECKS
Expand Down

0 comments on commit a438a71

Please sign in to comment.