Skip to content

Commit 206105f

Browse files
committed
Joseph's suggestions
1 parent 8af4303 commit 206105f

File tree

2 files changed

+5
-7
lines changed

2 files changed

+5
-7
lines changed

pennylane_lightning/core/src/simulators/lightning_tensor/tncuda/TNCuda.hpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -485,8 +485,8 @@ class TNCuda : public TNCudaBase<PrecisionT, Derived> {
485485

486486
protected:
487487
// Note both maxBondDim_ and bondDims_ are used for both MPS and Exact
488-
// Tensor Network. Per Exact Tensor Network, maxBondDim_ is 1 and bondDims_
489-
// is {1}. Per Exact Tensor Network, setting bondDims_ allows call to
488+
// Tensor Network. For Exact Tensor Network, maxBondDim_ is 1 and bondDims_
489+
// is {1}. For Exact Tensor Network, setting bondDims_ allows call to
490490
// appendInitialMPSState_() to append the initial state to the Exact Tensor
491491
// Network state.
492492
const std::size_t

pennylane_lightning/core/src/simulators/lightning_tensor/utils/tncuda_utils/tncuda_helpers.hpp

+3-5
Original file line numberDiff line numberDiff line change
@@ -204,11 +204,9 @@ inline auto create_swap_wire_pair_queue(const std::vector<std::size_t> &wires)
204204
inline void
205205
MPSShapeCheck(const std::vector<std::vector<std::size_t>> &MPS_shape_dest,
206206
const std::vector<std::vector<std::size_t>> &MPS_shape_source) {
207-
if (MPS_shape_dest != MPS_shape_source) {
208-
PL_ABORT_IF_NOT(MPS_shape_dest == MPS_shape_source,
209-
"The incoming MPS does not have the correct layout for "
210-
"lightning.tensor.")
211-
}
207+
PL_ABORT_IF_NOT(MPS_shape_dest == MPS_shape_source,
208+
"The incoming MPS does not have the correct layout for "
209+
"lightning.tensor.")
212210
}
213211

214212
} // namespace Pennylane::LightningTensor::TNCuda::Util

0 commit comments

Comments
 (0)