Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
ORNL Quantum Computing Institute
exatn
Commits
0d43cb54
Commit
0d43cb54
authored
Nov 21, 2021
by
Dmitry I. Lyakh
Browse files
Added iteration timer to Optimizer and Reconstructor
Signed-off-by:
Dmitry I. Lyakh
<
quant4me@gmail.com
>
parent
4709054d
Changes
3
Hide whitespace changes
Inline
Side-by-side
src/exatn/optimizer.cpp
View file @
0d43cb54
/** ExaTN:: Variational optimizer of a closed symmetric tensor network expansion functional
REVISION: 2021/11/1
9
REVISION: 2021/11/
2
1
Copyright (C) 2018-2021 Dmitry I. Lyakh (Liakh)
Copyright (C) 2018-2021 Oak Ridge National Laboratory (UT-Battelle) **/
...
...
@@ -296,7 +296,9 @@ bool TensorNetworkOptimizer::optimize_sd(const ProcessGroup & process_group)
unsigned
int
iteration
=
0
;
while
((
!
converged
)
&&
(
iteration
<
max_iterations_
)){
if
(
TensorNetworkOptimizer
::
debug
>
0
)
std
::
cout
<<
"#DEBUG(exatn::TensorNetworkOptimizer): Iteration "
<<
iteration
<<
std
::
endl
;
std
::
cout
<<
"#DEBUG(exatn::TensorNetworkOptimizer)["
<<
std
::
fixed
<<
std
::
setprecision
(
6
)
<<
exatn
::
Timer
::
timeInSecHR
(
numericalServer
->
getTimeStampStart
())
<<
"]: Iteration "
<<
iteration
<<
std
::
endl
;
converged
=
true
;
double
max_convergence
=
0.0
;
average_expect_val_
=
std
::
complex
<
double
>
{
0.0
,
0.0
};
...
...
src/exatn/reconstructor.cpp
View file @
0d43cb54
/** ExaTN:: Reconstructs an approximate tensor network expansion for a given tensor network expansion
REVISION: 2021/11/1
9
REVISION: 2021/11/
2
1
Copyright (C) 2018-2021 Dmitry I. Lyakh (Liakh)
Copyright (C) 2018-2021 Oak Ridge National Laboratory (UT-Battelle) **/
...
...
@@ -282,7 +282,9 @@ bool TensorNetworkReconstructor::reconstruct_sd(const ProcessGroup & process_gro
unsigned
int
iteration
=
0
;
while
((
!
converged
)
&&
(
iteration
<
max_iterations_
)){
if
(
TensorNetworkReconstructor
::
debug
>
0
)
std
::
cout
<<
"#DEBUG(exatn::TensorNetworkReconstructor): Iteration "
<<
iteration
<<
std
::
endl
;
std
::
cout
<<
"#DEBUG(exatn::TensorNetworkReconstructor)["
<<
std
::
fixed
<<
std
::
setprecision
(
6
)
<<
exatn
::
Timer
::
timeInSecHR
(
numericalServer
->
getTimeStampStart
())
<<
"]: Iteration "
<<
iteration
<<
std
::
endl
;
double
max_grad_norm
=
0.0
;
for
(
auto
&
environment
:
environments_
){
//Nesterov extrapolation:
...
...
src/exatn/tests/NumServerTester.cpp
View file @
0d43cb54
...
...
@@ -3607,7 +3607,7 @@ TEST(NumServerTester, ExcitedMCVQE) {
const
std
::
string
tn_type
=
"TTN"
;
//MPS or TTN
const
double
accuracy
=
1e-4
;
exatn
::
resetLoggingLevel
(
1
,
2
);
//debug
//
exatn::resetLoggingLevel(1,2); //debug
bool
success
=
true
;
bool
root
=
(
exatn
::
getProcessRank
()
==
0
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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