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
bbff4bcf
Commit
bbff4bcf
authored
Jul 31, 2019
by
Mccaskey, Alex
Browse files
fixing memory bug in vqe
Signed-off-by:
Alex McCaskey
<
mccaskeyaj@ornl.gov
>
parent
98ce4318
Pipeline
#65277
passed with stage
in 6 minutes and 18 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
quantum/plugins/algorithms/vqe/vqe.cpp
View file @
bbff4bcf
...
...
@@ -23,7 +23,7 @@ bool VQE::initialize(const AlgorithmParameters ¶meters) {
try
{
observable
=
parameters
.
at
(
"observable"
).
as_no_error
<
std
::
shared_ptr
<
Observable
>>
();
}
catch
(
std
::
exception
&
e
)
{
observable
=
std
::
shared_ptr
<
Observable
>
(
parameters
.
at
(
"observable"
).
as
<
Observable
*>
());
observable
=
std
::
shared_ptr
<
Observable
>
(
parameters
.
at
(
"observable"
).
as
<
Observable
*>
()
,
[](
Observable
*
){}
);
}
optimizer
=
parameters
.
at
(
"optimizer"
).
as
<
std
::
shared_ptr
<
Optimizer
>>
();
kernel
=
parameters
.
at
(
"ansatz"
).
as
<
std
::
shared_ptr
<
Function
>>
();
...
...
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