From 62a3e56d3ebc32ab3c175dcb58550b83cd0e33b6 Mon Sep 17 00:00:00 2001 From: Adrian Roman Date: Wed, 15 Jan 2025 12:05:47 +0200 Subject: [PATCH] Fix for https://github.com/Qiskit/qiskit-aer/issues/2286 --- .../matrix_product_state/matrix_product_state_tensor.hpp | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/simulators/matrix_product_state/matrix_product_state_tensor.hpp b/src/simulators/matrix_product_state/matrix_product_state_tensor.hpp index cc090deb64..3802c0722e 100644 --- a/src/simulators/matrix_product_state/matrix_product_state_tensor.hpp +++ b/src/simulators/matrix_product_state/matrix_product_state_tensor.hpp @@ -179,17 +179,14 @@ class MPS_Tensor { std::vector data_; static double chop_threshold_; - static uint_t max_bond_dimension_; - static double truncation_threshold_; + uint_t max_bond_dimension_ = UINT64_MAX; + double truncation_threshold_ = 1e-16; }; //========================================================================= // Implementation //========================================================================= double MPS_Tensor::chop_threshold_ = CHOP_THRESHOLD; -uint_t MPS_Tensor::max_bond_dimension_ = UINT64_MAX; -double MPS_Tensor::truncation_threshold_ = 1e-16; - const double MPS_Tensor::SQR_HALF = sqrt(0.5); //---------------------------------------------------------------