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
xacc
Commits
51612a66
Commit
51612a66
authored
Feb 21, 2018
by
Mccaskey, Alex
Browse files
fixing bug in readout ir preprocessor
Signed-off-by:
Alex McCaskey
<
mccaskeyaj@ornl.gov
>
parent
a677316c
Changes
3
Hide whitespace changes
Inline
Side-by-side
python/xacc-py.cpp
View file @
51612a66
...
...
@@ -107,6 +107,7 @@ PYBIND11_MODULE(pyxacc, m) {
py
::
class_
<
xacc
::
Instruction
,
std
::
shared_ptr
<
xacc
::
Instruction
>>
inst
(
m
,
"Instruction"
,
"Instruction wraps the XACC C++ Instruction class -"
" the base for all XACC intermediate representation instructions. Instructions, for example, can be common gates like Hadamard or CNOT."
);
inst
.
def
(
"getName"
,
&
xacc
::
Instruction
::
getName
,
"Return the name of this Instruction."
);
inst
.
def
(
"nParameters"
,
&
xacc
::
Instruction
::
nParameters
,
"Return the number of parameters this Instruction has."
);
// Expose the Function interface
py
::
class_
<
xacc
::
Function
,
xacc
::
Instruction
,
std
::
shared_ptr
<
xacc
::
Function
>>
f
(
m
,
"Function"
,
"Functions are composed of Instructions."
);
...
...
quantum/gate/ir/ReadoutErrorIRPreprocessor.cpp
View file @
51612a66
...
...
@@ -101,7 +101,7 @@ std::shared_ptr<AcceleratorBufferPostprocessor> ReadoutErrorIRPreprocessor::proc
if
(
!
boost
::
contains
(
pauliStr
,
"X"
+
std
::
to_string
(
bit
))
&&
!
boost
::
contains
(
pauliStr
,
"Y"
+
std
::
to_string
(
bit
)))
{
pauliStr
=
"Z"
+
std
::
to_string
(
bit
)
+
pauliStr
;
pauliStr
=
pauliStr
+
"Z"
+
std
::
to_string
(
bit
);
pauliTerm
[
bit
]
=
"Z"
;
}
continue
;
...
...
xacc/program/Program.cpp
View file @
51612a66
...
...
@@ -12,6 +12,7 @@
*******************************************************************************/
#include "Program.hpp"
#include "XACC.hpp"
namespace
xacc
{
...
...
@@ -47,7 +48,7 @@ void Program::build() {
// Make sure we got a valid
if
(
!
compiler
)
{
XACCLogger
::
instance
()
->
error
(
"Invalid Compiler
.
\n
"
);
xacc
::
error
(
"Invalid Compiler requested in Program.build()
.
\n
"
);
}
// Before compiling, run preprocessors
...
...
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