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
7bf76b63
Commit
7bf76b63
authored
Oct 18, 2017
by
Mccaskey, Alex
Browse files
Adding addParameter to Function
Signed-off-by:
Alex McCaskey
<
mccaskeyaj@ornl.gov
>
parent
ecb5a189
Changes
4
Hide whitespace changes
Inline
Side-by-side
quantum/aqc/ir/DWKernel.hpp
View file @
7bf76b63
...
...
@@ -153,6 +153,10 @@ public:
XACCError
(
"DWKernel does not contain runtime parameters."
);
}
virtual
void
addParameter
(
InstructionParameter
instParam
)
{
XACCError
(
"DWKernel does not contain runtime parameters."
);
}
virtual
bool
isParameterized
()
{
return
false
;
}
...
...
quantum/gate/ir/GateFunction.hpp
View file @
7bf76b63
...
...
@@ -156,6 +156,10 @@ public:
parameters
[
idx
]
=
p
;
}
virtual
void
addParameter
(
InstructionParameter
instParam
)
{
parameters
.
push_back
(
instParam
);
}
virtual
std
::
vector
<
InstructionParameter
>
getParameters
()
{
return
parameters
;
}
...
...
xacc/accelerator/Accelerator.hpp
View file @
7bf76b63
...
...
@@ -146,7 +146,10 @@ public:
if
(
isValidBuffer
(
varid
))
{
return
allocatedBuffers
[
varid
];
}
else
{
XACCError
(
"Could not find AcceleratorBuffer with id "
+
varid
);
auto
tmpBuffer
=
createBuffer
(
varid
,
100
);
XACCInfo
(
"Could not find AcceleratorBuffer with id "
+
varid
+
", creating one with 100 bits."
);
storeBuffer
(
varid
,
tmpBuffer
);
return
tmpBuffer
;
}
}
...
...
xacc/ir/Function.hpp
View file @
7bf76b63
...
...
@@ -83,6 +83,8 @@ public:
*/
virtual
void
addInstruction
(
InstPtr
instruction
)
=
0
;
virtual
void
addParameter
(
InstructionParameter
instParam
)
=
0
;
/**
* Return true always to indicate that the
* Function is composite.
...
...
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