Skip to content

Commit

Permalink
Member var zero-init
Browse files Browse the repository at this point in the history
Signed-off-by: Vlad Gheorghiu <[email protected]>
  • Loading branch information
vsoftco committed Jan 6, 2025
1 parent 6117efa commit 890113e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions include/qpp/classes/qcircuit.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ class QCircuit : public IDisplay, public IJSON {
internal::conditional_stack_t
conditional_stack_{}; ///< used to parse conditional statements
std::optional<idx>
outer_while_pos_; ///< location of outermost while statement
outer_while_pos_{}; ///< location of outermost while statement

/**
* \brief Adds matrix to the hash table
Expand Down Expand Up @@ -140,7 +140,7 @@ class QCircuit : public IDisplay, public IJSON {
using VarStep = std::variant<
internal::QCircuitConditionalStep, internal::QCircuitGateStep,
internal::QCircuitMeasurementStep, internal::QCircuitNOPStep>;
std::vector<VarStep> circuit_; ///<< quantum circuit representation
std::vector<VarStep> circuit_{}; ///<< quantum circuit representation

protected:
/**
Expand Down Expand Up @@ -251,7 +251,7 @@ class QCircuit : public IDisplay, public IJSON {
std::optional<std::string> name = std::nullopt)
: nq_{nq}, nc_{nc}, d_{d}, name_{std::move(name)},
measured_nd_(nq, false), clean_qudits_(nq_, true),
clean_dits_(nc_, true), measurement_dits_(nc_, false), circuit_{} {
clean_dits_(nc_, true), measurement_dits_(nc_, false) {
// EXCEPTION CHECKS
// if (nq == 0)
// throw exception::ZeroSize("qpp::QCircuit::QCircuit()", "nq");
Expand Down

0 comments on commit 890113e

Please sign in to comment.