Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
ORNL Quantum Computing Institute
xacc
Commits
f820332d
Commit
f820332d
authored
Aug 06, 2021
by
Mccaskey, Alex
Browse files
fix for bug #470
Signed-off-by:
Alex McCaskey
<
mccaskeyaj@ornl.gov
>
parent
4bc6b413
Pipeline
#158238
passed with stage
in 21 minutes and 18 seconds
Changes
4
Pipelines
4
Hide whitespace changes
Inline
Side-by-side
README.md
View file @
f820332d
...
...
@@ -30,7 +30,7 @@ $ build/quantum/examples/qasm/deuteron_from_qasm
$
python3 python/examples/deuteronH2.py
[
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
turning on file auto-save by clicking
``File > Auto Save ``
.
...
...
python/benchmark/chemistry/benchmarks/nah_ucc1.ini
0 → 100644
View file @
f820332d
[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
python/benchmark/chemistry/benchmarks/tnqvm_nah_ucc1.ini
View file @
f820332d
...
...
@@ -12,15 +12,13 @@ source = .compiler xasm
.qbit
q
X(q
[0]
)
;
X(q
[2]
)
;
ucc1(q,
x
[0]
)
;
ucc1(q,
x)
;
[Observable]
name
=
p
si4
name
=
p
yscf
basis
=
sto-3g
geometry
=
0 1
Na
0.000000
0.0
0.0
geometry
=
Na 0.000000 0.0 0.0
H
0.0
0.0
1.914388
symmetry
c1
fo
=
[0, 1, 2, 3, 4, 10, 11, 12, 13, 14]
ao
=
[5, 9, 15, 19]
...
...
python/xacc.py
View file @
f820332d
...
...
@@ -34,7 +34,6 @@ try:
except
:
pass
class
Benchmark
(
ABC
):
# Override this execute method to implement the algorithm
...
...
@@ -500,10 +499,14 @@ def _finalize():
if
not
loaded_from_cpp_dont_finalize
:
# Stop the Pelix framework:
# cleaning up all Python threads that it has started.
serviceRegistry
.
framework
.
stop
()
# Wait for the framework to stop
serviceRegistry
.
framework
.
wait_for_stop
()
Finalize
()
# don't tear down if already torn down
try
:
serviceRegistry
.
framework
.
stop
()
# Wait for the framework to stop
serviceRegistry
.
framework
.
wait_for_stop
()
Finalize
()
except
NameError
:
pass
atexit
.
register
(
_finalize
)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment