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
30bc0b10
Commit
30bc0b10
authored
Jul 25, 2017
by
Mccaskey, Alex
Browse files
Making getParameter const on Instruction
parent
8895b758
Changes
5
Hide whitespace changes
Inline
Side-by-side
quantum/aqc/ir/DWKernel.hpp
View file @
30bc0b10
...
...
@@ -160,7 +160,7 @@ public:
return
weights
;
}
virtual
InstructionParameter
getParameter
(
const
int
idx
)
{
virtual
InstructionParameter
getParameter
(
const
int
idx
)
const
{
XACCError
(
"DWKernel does not contain runtime parameters."
);
}
...
...
quantum/aqc/ir/DWQMI.hpp
View file @
30bc0b10
...
...
@@ -142,7 +142,7 @@ public:
* @param idx The index of the parameter.
* @return param The InstructionParameter at the given index.
*/
virtual
InstructionParameter
getParameter
(
const
int
idx
)
{
virtual
InstructionParameter
getParameter
(
const
int
idx
)
const
{
return
parameter
;
}
...
...
quantum/gate/ir/GateFunction.hpp
View file @
30bc0b10
...
...
@@ -154,7 +154,7 @@ public:
return
retStr
;
}
virtual
InstructionParameter
getParameter
(
const
int
idx
)
{
virtual
InstructionParameter
getParameter
(
const
int
idx
)
const
{
if
(
idx
+
1
>
parameters
.
size
())
{
XACCError
(
"Invalid Parameter requested."
);
}
...
...
quantum/gate/ir/GateInstruction.hpp
View file @
30bc0b10
...
...
@@ -141,7 +141,7 @@ public:
enabled
=
true
;
}
virtual
InstructionParameter
getParameter
(
const
int
idx
)
{
virtual
InstructionParameter
getParameter
(
const
int
idx
)
const
{
if
(
idx
+
1
>
parameters
.
size
())
{
XACCError
(
"Invalid Parameter requested from Parameterized Gate Instruction."
);
}
...
...
xacc/ir/Instruction.hpp
View file @
30bc0b10
...
...
@@ -95,7 +95,7 @@ public:
* @param idx The index of the parameter.
* @return param The InstructionParameter at the given index.
*/
virtual
InstructionParameter
getParameter
(
const
int
idx
)
=
0
;
virtual
InstructionParameter
getParameter
(
const
int
idx
)
const
=
0
;
/**
* Return all of this Instruction's parameters.
...
...
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