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
69a1063c
Commit
69a1063c
authored
Apr 20, 2020
by
Mccaskey, Alex
Browse files
updates to set buffer name on measure all call
Signed-off-by:
Alex McCaskey
<
mccaskeyaj@ornl.gov
>
parent
e5594bc2
Pipeline
#97970
failed with stage
in 8 minutes and 24 seconds
Changes
4
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
quantum/plugins/xasm/xasm_listener.cpp
View file @
69a1063c
...
...
@@ -619,6 +619,7 @@ void XASMListener::exitComposite_generator(
for
(
std
::
size_t
i
=
0
;
i
<
size
;
i
++
)
{
auto
inst
=
irProvider
->
createInstruction
(
currentCompositeName
,
std
::
vector
<
std
::
size_t
>
{
i
});
inst
->
setBufferNames
({
buffer
->
name
()});
function
->
addInstruction
(
inst
);
}
...
...
xacc/accelerator/AcceleratorBuffer.cpp
View file @
69a1063c
...
...
@@ -510,7 +510,7 @@ void AcceleratorBuffer::print(std::ostream &stream) {
// end root object
writer
.
EndObject
();
stream
<<
buffer
.
GetString
();
stream
<<
buffer
.
GetString
()
<<
"
\n
"
;
}
const
std
::
string
AcceleratorBuffer
::
toString
()
{
...
...
xacc/compiler/xacc_internal_compiler.cpp
View file @
69a1063c
...
...
@@ -27,7 +27,7 @@ void compiler_InitializeXACC(const char *qpu_backend) {
setAccelerator
(
qpu_backend
);
}
void
compiler_InitializeXACC
(
const
char
*
qpu_backend
,
const
int
shots
)
{
void
compiler_InitializeXACC
(
const
char
*
qpu_backend
,
int
shots
)
{
if
(
!
xacc
::
isInitialized
())
{
xacc
::
Initialize
();
xacc
::
external
::
load_external_language_plugins
();
...
...
@@ -50,7 +50,7 @@ void setAccelerator(const char *qpu_backend) {
}
}
void
setAccelerator
(
const
char
*
qpu_backend
,
const
int
shots
)
{
void
setAccelerator
(
const
char
*
qpu_backend
,
int
shots
)
{
if
(
qpu
)
{
if
(
qpu_backend
!=
qpu
->
name
())
{
qpu
=
xacc
::
getAccelerator
(
qpu_backend
,
{
std
::
make_pair
(
"shots"
,
shots
)})
...
...
xacc/compiler/xacc_internal_compiler.hpp
View file @
69a1063c
...
...
@@ -28,10 +28,10 @@ extern bool __execute;
enum
OptLevel
{
DEFAULT
,
LEVEL1
,
LEVEL2
,
LEVEL3
};
void
compiler_InitializeXACC
(
const
char
*
qpu_backend
=
"local-ibm"
);
void
compiler_InitializeXACC
(
const
char
*
qpu_backend
,
const
int
shots
);
void
compiler_InitializeXACC
(
const
char
*
qpu_backend
,
int
shots
);
void
setAccelerator
(
const
char
*
qpu_backend
);
void
setAccelerator
(
const
char
*
qpu_backend
,
const
int
shots
);
void
setAccelerator
(
const
char
*
qpu_backend
,
int
shots
);
Accelerator
*
get_qpu
();
void
__set_verbose
(
bool
verbose
);
...
...
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