From 1819ffdb0ca70c447cd5635a052c7c3c14fa0bc8 Mon Sep 17 00:00:00 2001 From: Adrian Roman Date: Mon, 4 Sep 2023 05:20:30 +0300 Subject: [PATCH] =?UTF-8?q?For=20https://github.com/Qiskit/qiskit-aer/issu?= =?UTF-8?q?es/1905=20and=20https://gith=E2=80=A6=20(#1907)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * For https://github.com/Qiskit/qiskit-aer/issues/1905 and https://github.com/Qiskit/qiskit-aer/issues/1906 * formatting * Hopefully clang likes it now * Now with clang run on it, hopefully it's fine. * Removed prelude section in release note * Removed prelude section in release notes --- cmake/conan.cmake | 2 ++ ...atest-vc++-compilation-fixes-555601315e7e821b.yaml | 11 +++++++++++ src/transpile/cacheblocking.hpp | 7 ++++--- 3 files changed, 17 insertions(+), 3 deletions(-) create mode 100644 releasenotes/notes/latest-vc++-compilation-fixes-555601315e7e821b.yaml diff --git a/cmake/conan.cmake b/cmake/conan.cmake index b27dc33b4..e413c3f32 100644 --- a/cmake/conan.cmake +++ b/cmake/conan.cmake @@ -55,6 +55,8 @@ function(_get_msvc_ide_version result) set(${result} 15 PARENT_SCOPE) elseif(NOT MSVC_VERSION VERSION_LESS 1920 AND MSVC_VERSION VERSION_LESS 1930) set(${result} 16 PARENT_SCOPE) + elseif(NOT MSVC_VERSION VERSION_LESS 1930 AND MSVC_VERSION VERSION_LESS 1940) + set(${result} 17 PARENT_SCOPE) else() message(FATAL_ERROR "Conan: Unknown MSVC compiler version [${MSVC_VERSION}]") endif() diff --git a/releasenotes/notes/latest-vc++-compilation-fixes-555601315e7e821b.yaml b/releasenotes/notes/latest-vc++-compilation-fixes-555601315e7e821b.yaml new file mode 100644 index 000000000..10ca356b1 --- /dev/null +++ b/releasenotes/notes/latest-vc++-compilation-fixes-555601315e7e821b.yaml @@ -0,0 +1,11 @@ +--- +fixes: + - | + Adresses two opened issues, one about replacing a char* parameter to a + const char*, another one for adding support for the latest vc++ in + conan.cmake + Changes: + Passing const char* to a char* parameter in CacheBlocking::insert_sim_op call: #1905 + https://github.com/Qiskit/qiskit-aer/issues/1905 + Add support for the latest VC++ in conan.cmake #1906: + https://github.com/Qiskit/qiskit-aer/issues/1906 diff --git a/src/transpile/cacheblocking.hpp b/src/transpile/cacheblocking.hpp index f3aa7e234..35d72908c 100644 --- a/src/transpile/cacheblocking.hpp +++ b/src/transpile/cacheblocking.hpp @@ -98,8 +98,9 @@ protected: void insert_swap(std::vector &ops, uint_t bit0, uint_t bit1, bool chunk) const; - void insert_sim_op(std::vector &ops, char *name, + void insert_sim_op(std::vector &ops, const char *name, const reg_t &qubits) const; + void insert_pauli(std::vector &ops, reg_t &qubits, std::string &pauli) const; @@ -192,8 +193,8 @@ void CacheBlocking::insert_swap(std::vector &ops, uint_t bit0, ops.push_back(sgate); } -void CacheBlocking::insert_sim_op(std::vector &ops, char *name, - const reg_t &qubits) const { +void CacheBlocking::insert_sim_op(std::vector &ops, + const char *name, const reg_t &qubits) const { Operations::Op op; op.type = Operations::OpType::sim_op; op.name = name;