Loading python/examples/qsim_example.py +0 −3 Original line number Diff line number Diff line Loading @@ -6,9 +6,6 @@ from qcor import * import numpy as np import matplotlib.pyplot as plt # Set up QCOR runtime Initialize(qpu="qpp") # Time-dependent Hamiltonian: # Returns the Pauli operators at a time point. def td_hamiltonian(t): Loading python/py-qcor.cpp +2 −1 Original line number Diff line number Diff line #include "base/qcor_qsim.hpp" #include "py_costFunctionEvaluator.hpp" #include "py_qsimWorkflow.hpp" #include "qrt.hpp" #include "xacc.hpp" #include <pybind11/functional.h> #include <pybind11/pybind11.h> Loading Loading @@ -65,7 +66,7 @@ PYBIND11_MODULE(_pyqcor, m) { const auto value = std::string(py::str(arg.second)); // Handle "qpu" key if (key == "qpu") { xacc::internal_compiler::qpu = xacc::getAccelerator(value); quantum::initialize(value, "empty"); } /// TODO: handle other CLI parameters. } Loading python/qcor.py +5 −0 Original line number Diff line number Diff line Loading @@ -11,3 +11,8 @@ def Y(idx): def Z(idx): return xacc.quantum.PauliOperator({idx: 'Z'}, 1.0) # Implements internal_startup initialization: # i.e. set up qrt, backends, shots, etc. # TODO: only set Accelerator for now. default_qpu = 'qpp' Initialize(qpu=default_qpu) No newline at end of file python/tests/test_qsim.py +0 −2 Original line number Diff line number Diff line Loading @@ -28,6 +28,4 @@ class TestWorkflows(unittest.TestCase): self.assertAlmostEqual(result["exp-vals"][nbSteps], 0.5, places=1) if __name__ == '__main__': # Set up QCOR runtime Initialize(qpu="qpp") unittest.main() No newline at end of file Loading
python/examples/qsim_example.py +0 −3 Original line number Diff line number Diff line Loading @@ -6,9 +6,6 @@ from qcor import * import numpy as np import matplotlib.pyplot as plt # Set up QCOR runtime Initialize(qpu="qpp") # Time-dependent Hamiltonian: # Returns the Pauli operators at a time point. def td_hamiltonian(t): Loading
python/py-qcor.cpp +2 −1 Original line number Diff line number Diff line #include "base/qcor_qsim.hpp" #include "py_costFunctionEvaluator.hpp" #include "py_qsimWorkflow.hpp" #include "qrt.hpp" #include "xacc.hpp" #include <pybind11/functional.h> #include <pybind11/pybind11.h> Loading Loading @@ -65,7 +66,7 @@ PYBIND11_MODULE(_pyqcor, m) { const auto value = std::string(py::str(arg.second)); // Handle "qpu" key if (key == "qpu") { xacc::internal_compiler::qpu = xacc::getAccelerator(value); quantum::initialize(value, "empty"); } /// TODO: handle other CLI parameters. } Loading
python/qcor.py +5 −0 Original line number Diff line number Diff line Loading @@ -11,3 +11,8 @@ def Y(idx): def Z(idx): return xacc.quantum.PauliOperator({idx: 'Z'}, 1.0) # Implements internal_startup initialization: # i.e. set up qrt, backends, shots, etc. # TODO: only set Accelerator for now. default_qpu = 'qpp' Initialize(qpu=default_qpu) No newline at end of file
python/tests/test_qsim.py +0 −2 Original line number Diff line number Diff line Loading @@ -28,6 +28,4 @@ class TestWorkflows(unittest.TestCase): self.assertAlmostEqual(result["exp-vals"][nbSteps], 0.5, places=1) if __name__ == '__main__': # Set up QCOR runtime Initialize(qpu="qpp") unittest.main() No newline at end of file