Commit f820332d authored by Mccaskey, Alex's avatar Mccaskey, Alex
Browse files

fix for bug #470


Signed-off-by: Mccaskey, Alex's avatarAlex McCaskey <mccaskeyaj@ornl.gov>
parent 4bc6b413
Pipeline #158238 passed with stage
in 21 minutes and 18 seconds
...@@ -30,7 +30,7 @@ $ build/quantum/examples/qasm/deuteron_from_qasm ...@@ -30,7 +30,7 @@ $ build/quantum/examples/qasm/deuteron_from_qasm
$ python3 python/examples/deuteronH2.py $ python3 python/examples/deuteronH2.py
[run some XACC benchmarks] [run some XACC benchmarks]
$ python3 -m xacc --benchmark python/benchmark/chemistry/benchmarks/tnqvm_nah_ucc1.ini $ python3 -m xacc --benchmark python/benchmark/chemistry/benchmarks/nah_ucc1.ini
``` ```
All code is here and you can quickly start developing. We recommend All code is here and you can quickly start developing. We recommend
turning on file auto-save by clicking ``File > Auto Save ``. turning on file auto-save by clicking ``File > Auto Save ``.
......
[XACC]
accelerator = qpp
[Benchmark]
name = chemistry
algorithm = vqe
[Ansatz]
source = .compiler xasm
.circuit ansatz2
.parameters x
.qbit q
X(q[0]);
X(q[2]);
ucc1(q, x);
[Observable]
name = pyscf
basis = sto-3g
geometry = Na 0.000000 0.0 0.0
H 0.0 0.0 1.914388
fo = [0, 1, 2, 3, 4, 10, 11, 12, 13, 14]
ao = [5, 9, 15, 19]
[Optimizer]
name = nlopt
\ No newline at end of file
...@@ -12,15 +12,13 @@ source = .compiler xasm ...@@ -12,15 +12,13 @@ source = .compiler xasm
.qbit q .qbit q
X(q[0]); X(q[0]);
X(q[2]); X(q[2]);
ucc1(q, x[0]); ucc1(q, x);
[Observable] [Observable]
name = psi4 name = pyscf
basis = sto-3g basis = sto-3g
geometry = 0 1 geometry = Na 0.000000 0.0 0.0
Na 0.000000 0.0 0.0
H 0.0 0.0 1.914388 H 0.0 0.0 1.914388
symmetry c1
fo = [0, 1, 2, 3, 4, 10, 11, 12, 13, 14] fo = [0, 1, 2, 3, 4, 10, 11, 12, 13, 14]
ao = [5, 9, 15, 19] ao = [5, 9, 15, 19]
......
...@@ -34,7 +34,6 @@ try: ...@@ -34,7 +34,6 @@ try:
except: except:
pass pass
class Benchmark(ABC): class Benchmark(ABC):
# Override this execute method to implement the algorithm # Override this execute method to implement the algorithm
...@@ -500,10 +499,14 @@ def _finalize(): ...@@ -500,10 +499,14 @@ def _finalize():
if not loaded_from_cpp_dont_finalize: if not loaded_from_cpp_dont_finalize:
# Stop the Pelix framework: # Stop the Pelix framework:
# cleaning up all Python threads that it has started. # cleaning up all Python threads that it has started.
serviceRegistry.framework.stop() # don't tear down if already torn down
# Wait for the framework to stop try:
serviceRegistry.framework.wait_for_stop() serviceRegistry.framework.stop()
Finalize() # Wait for the framework to stop
serviceRegistry.framework.wait_for_stop()
Finalize()
except NameError:
pass
atexit.register(_finalize) atexit.register(_finalize)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment