From c2b61426dc101d9587bebd767644a9a5d89b5ed0 Mon Sep 17 00:00:00 2001 From: cjwood Date: Thu, 12 Apr 2018 12:39:05 -0400 Subject: [PATCH] use os.path.join for combining default simulator exe paths --- qiskit/backends/_qasm_simulator_cpp.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/qiskit/backends/_qasm_simulator_cpp.py b/qiskit/backends/_qasm_simulator_cpp.py index 901b62d6ad..6e8cce3397 100644 --- a/qiskit/backends/_qasm_simulator_cpp.py +++ b/qiskit/backends/_qasm_simulator_cpp.py @@ -38,10 +38,11 @@ EXTENSION = '.exe' if platform.system() == 'Windows' else '' # Add path to compiled qiskit simulator DEFAULT_SIMULATOR_PATHS = [ # This is the path where Makefile creates the simulator by default - os.path.abspath(os.path.dirname(__file__) + \ - '../../../out/src/qasm-simulator-cpp/qasm_simulator_cpp' + EXTENSION), + os.path.abspath(os.path.join(os.path.dirname(__file__), + '../../out/src/qasm-simulator-cpp/qasm_simulator_cpp' + EXTENSION)), # This is the path where PIP installs the simulator - os.path.abspath(os.path.dirname(__file__) + '/qasm_simulator_cpp' + EXTENSION), + os.path.abspath(os.path.join(os.path.dirname(__file__), + 'qasm_simulator_cpp' + EXTENSION)), ]