Commit ab9110cc authored by Mccaskey, Alex's avatar Mccaskey, Alex
Browse files

updates to python xacc compiler to take in *args argument for parameters



Signed-off-by: Mccaskey, Alex's avatarAlex McCaskey <mccaskeyaj@ornl.gov>
parent 4ec569e9
......@@ -59,6 +59,7 @@ paramlist
/* A parameter */
param
: id
| '*' id
;
/* A unitary operation */
......
......@@ -60,10 +60,12 @@ void PyXACCListener::enterXacckernel(PyXACCIRParser::XacckernelContext *ctx) {
std::vector<InstructionParameter> params;
for (int i = 1; i < ctx->param().size(); i++) {
params.push_back(
InstructionParameter(ctx->param(static_cast<size_t>(i))->getText()));
functionVariableNames.push_back(
ctx->param(static_cast<size_t>(i))->getText());
if (!boost::contains(ctx->param(i)->getText(), "*")) {
params.push_back(
InstructionParameter(ctx->param(static_cast<size_t>(i))->getText()));
functionVariableNames.push_back(
ctx->param(static_cast<size_t>(i))->getText());
}
}
f = provider->createFunction(ctx->kernelname->getText(), {}, params);
}
......@@ -138,7 +140,8 @@ void PyXACCListener::enterUop(PyXACCIRParser::UopContext *ctx) {
}
for (auto i : genF->getInstructions()) {
f->addInstruction(i);
f->addInstruction(
i); // Thanks to Zach's code this will add the Parameters
}
} else if (gateName == "qmi") {
......@@ -214,7 +217,8 @@ void PyXACCListener::exitXacckernel(PyXACCIRParser::XacckernelContext *ctx) {
auto buff = acc->getBuffer(bufferName);
if (!buff->hasExtraInfoKey("embedding")) {
xacc::info("Embedding not found for this python kernel, computing embedding now.");
xacc::info("Embedding not found for this python kernel, computing "
"embedding now.");
auto dwcompiler = xacc::getCompiler("dwave-qmi");
auto xaccKernelSrcStr = dwcompiler->translate("", f);
auto embeddedCode = dwcompiler->compile(xaccKernelSrcStr, acc);
......
......@@ -6,6 +6,7 @@ null
')'
':'
'return'
'*'
'X'
'Rx'
'Rz'
......@@ -26,7 +27,6 @@ null
'pi'
'+'
'-'
'*'
'/'
'^'
'='
......@@ -120,4 +120,4 @@ string
atn:
[3, 24715, 42794, 33075, 47597, 16764, 15335, 30598, 22884, 3, 49, 171, 4, 2, 9, 2, 4, 3, 9, 3, 4, 4, 9, 4, 4, 5, 9, 5, 4, 6, 9, 6, 4, 7, 9, 7, 4, 8, 9, 8, 4, 9, 9, 9, 4, 10, 9, 10, 4, 11, 9, 11, 4, 12, 9, 12, 4, 13, 9, 13, 4, 14, 9, 14, 4, 15, 9, 15, 4, 16, 9, 16, 4, 17, 9, 17, 4, 18, 9, 18, 4, 19, 9, 19, 3, 2, 7, 2, 40, 10, 2, 12, 2, 14, 2, 43, 11, 2, 3, 3, 3, 3, 3, 3, 3, 3, 5, 3, 49, 10, 3, 3, 3, 7, 3, 52, 10, 3, 12, 3, 14, 3, 55, 11, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 4, 3, 4, 3, 5, 6, 5, 64, 10, 5, 13, 5, 14, 5, 65, 3, 6, 6, 6, 69, 10, 6, 13, 6, 14, 6, 70, 3, 6, 5, 6, 74, 10, 6, 3, 7, 3, 7, 5, 7, 78, 10, 7, 3, 8, 3, 8, 3, 9, 3, 9, 3, 9, 5, 9, 85, 10, 9, 3, 10, 3, 10, 3, 11, 3, 11, 3, 11, 3, 11, 3, 11, 3, 12, 3, 12, 3, 13, 3, 13, 3, 13, 7, 13, 99, 10, 13, 12, 13, 14, 13, 102, 11, 13, 3, 14, 3, 14, 3, 14, 3, 14, 3, 14, 3, 14, 3, 14, 3, 14, 3, 14, 3, 14, 3, 14, 3, 14, 3, 14, 3, 14, 3, 14, 3, 14, 3, 14, 3, 14, 3, 14, 3, 14, 3, 14, 3, 14, 5, 14, 126, 10, 14, 3, 14, 7, 14, 129, 10, 14, 12, 14, 14, 14, 132, 11, 14, 3, 14, 5, 14, 135, 10, 14, 3, 14, 3, 14, 3, 14, 3, 14, 3, 14, 3, 14, 3, 14, 3, 14, 3, 14, 3, 14, 3, 14, 3, 14, 3, 14, 3, 14, 3, 14, 7, 14, 152, 10, 14, 12, 14, 14, 14, 155, 11, 14, 3, 15, 3, 15, 3, 15, 3, 15, 3, 15, 3, 15, 3, 16, 3, 16, 3, 17, 3, 17, 3, 18, 3, 18, 3, 19, 3, 19, 3, 19, 2, 3, 26, 20, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 32, 34, 36, 2, 4, 3, 2, 9, 25, 3, 2, 37, 42, 2, 176, 2, 41, 3, 2, 2, 2, 4, 44, 3, 2, 2, 2, 6, 60, 3, 2, 2, 2, 8, 63, 3, 2, 2, 2, 10, 73, 3, 2, 2, 2, 12, 77, 3, 2, 2, 2, 14, 79, 3, 2, 2, 2, 16, 81, 3, 2, 2, 2, 18, 86, 3, 2, 2, 2, 20, 88, 3, 2, 2, 2, 22, 93, 3, 2, 2, 2, 24, 95, 3, 2, 2, 2, 26, 134, 3, 2, 2, 2, 28, 156, 3, 2, 2, 2, 30, 162, 3, 2, 2, 2, 32, 164, 3, 2, 2, 2, 34, 166, 3, 2, 2, 2, 36, 168, 3, 2, 2, 2, 38, 40, 5, 4, 3, 2, 39, 38, 3, 2, 2, 2, 40, 43, 3, 2, 2, 2, 41, 39, 3, 2, 2, 2, 41, 42, 3, 2, 2, 2, 42, 3, 3, 2, 2, 2, 43, 41, 3, 2, 2, 2, 44, 45, 7, 3, 2, 2, 45, 46, 5, 32, 17, 2, 46, 53, 7, 4, 2, 2, 47, 49, 7, 5, 2, 2, 48, 47, 3, 2, 2, 2, 48, 49, 3, 2, 2, 2, 49, 50, 3, 2, 2, 2, 50, 52, 5, 18, 10, 2, 51, 48, 3, 2, 2, 2, 52, 55, 3, 2, 2, 2, 53, 51, 3, 2, 2, 2, 53, 54, 3, 2, 2, 2, 54, 56, 3, 2, 2, 2, 55, 53, 3, 2, 2, 2, 56, 57, 7, 6, 2, 2, 57, 58, 7, 7, 2, 2, 58, 59, 5, 6, 4, 2, 59, 5, 3, 2, 2, 2, 60, 61, 5, 8, 5, 2, 61, 7, 3, 2, 2, 2, 62, 64, 5, 10, 6, 2, 63, 62, 3, 2, 2, 2, 64, 65, 3, 2, 2, 2, 65, 63, 3, 2, 2, 2, 65, 66, 3, 2, 2, 2, 66, 9, 3, 2, 2, 2, 67, 69, 5, 12, 7, 2, 68, 67, 3, 2, 2, 2, 69, 70, 3, 2, 2, 2, 70, 68, 3, 2, 2, 2, 70, 71, 3, 2, 2, 2, 71, 74, 3, 2, 2, 2, 72, 74, 5, 14, 8, 2, 73, 68, 3, 2, 2, 2, 73, 72, 3, 2, 2, 2, 74, 11, 3, 2, 2, 2, 75, 78, 5, 20, 11, 2, 76, 78, 7, 8, 2, 2, 77, 75, 3, 2, 2, 2, 77, 76, 3, 2, 2, 2, 78, 13, 3, 2, 2, 2, 79, 80, 7, 43, 2, 2, 80, 15, 3, 2, 2, 2, 81, 84, 5, 18, 10, 2, 82, 83, 7, 5, 2, 2, 83, 85, 5, 16, 9, 2, 84, 82, 3, 2, 2, 2, 84, 85, 3, 2, 2, 2, 85, 17, 3, 2, 2, 2, 86, 87, 5, 32, 17, 2, 87, 19, 3, 2, 2, 2, 88, 89, 5, 22, 12, 2, 89, 90, 7, 4, 2, 2, 90, 91, 5, 24, 13, 2, 91, 92, 7, 6, 2, 2, 92, 21, 3, 2, 2, 2, 93, 94, 9, 2, 2, 2, 94, 23, 3, 2, 2, 2, 95, 100, 5, 26, 14, 2, 96, 97, 7, 5, 2, 2, 97, 99, 5, 26, 14, 2, 98, 96, 3, 2, 2, 2, 99, 102, 3, 2, 2, 2, 100, 98, 3, 2, 2, 2, 100, 101, 3, 2, 2, 2, 101, 25, 3, 2, 2, 2, 102, 100, 3, 2, 2, 2, 103, 104, 8, 14, 1, 2, 104, 135, 5, 34, 18, 2, 105, 135, 7, 46, 2, 2, 106, 135, 7, 26, 2, 2, 107, 135, 5, 32, 17, 2, 108, 109, 7, 28, 2, 2, 109, 135, 5, 26, 14, 8, 110, 111, 7, 4, 2, 2, 111, 112, 5, 26, 14, 2, 112, 113, 7, 6, 2, 2, 113, 135, 3, 2, 2, 2, 114, 115, 5, 30, 16, 2, 115, 116, 7, 4, 2, 2, 116, 117, 5, 26, 14, 2, 117, 118, 7, 6, 2, 2, 118, 135, 3, 2, 2, 2, 119, 120, 5, 32, 17, 2, 120, 121, 7, 32, 2, 2, 121, 122, 5, 26, 14, 4, 122, 135, 3, 2, 2, 2, 123, 130, 7, 33, 2, 2, 124, 126, 7, 5, 2, 2, 125, 124, 3, 2, 2, 2, 125, 126, 3, 2, 2, 2, 126, 127, 3, 2, 2, 2, 127, 129, 5, 28, 15, 2, 128, 125, 3, 2, 2, 2, 129, 132, 3, 2, 2, 2, 130, 128, 3, 2, 2, 2, 130, 131, 3, 2, 2, 2, 131, 133, 3, 2, 2, 2, 132, 130, 3, 2, 2, 2, 133, 135, 7, 34, 2, 2, 134, 103, 3, 2, 2, 2, 134, 105, 3, 2, 2, 2, 134, 106, 3, 2, 2, 2, 134, 107, 3, 2, 2, 2, 134, 108, 3, 2, 2, 2, 134, 110, 3, 2, 2, 2, 134, 114, 3, 2, 2, 2, 134, 119, 3, 2, 2, 2, 134, 123, 3, 2, 2, 2, 135, 153, 3, 2, 2, 2, 136, 137, 12, 12, 2, 2, 137, 138, 7, 27, 2, 2, 138, 152, 5, 26, 14, 13, 139, 140, 12, 11, 2, 2, 140, 141, 7, 28, 2, 2, 141, 152, 5, 26, 14, 12, 142, 143, 12, 10, 2, 2, 143, 144, 7, 29, 2, 2, 144, 152, 5, 26, 14, 11, 145, 146, 12, 9, 2, 2, 146, 147, 7, 30, 2, 2, 147, 152, 5, 26, 14, 10, 148, 149, 12, 7, 2, 2, 149, 150, 7, 31, 2, 2, 150, 152, 5, 26, 14, 8, 151, 136, 3, 2, 2, 2, 151, 139, 3, 2, 2, 2, 151, 142, 3, 2, 2, 2, 151, 145, 3, 2, 2, 2, 151, 148, 3, 2, 2, 2, 152, 155, 3, 2, 2, 2, 153, 151, 3, 2, 2, 2, 153, 154, 3, 2, 2, 2, 154, 27, 3, 2, 2, 2, 155, 153, 3, 2, 2, 2, 156, 157, 7, 35, 2, 2, 157, 158, 7, 46, 2, 2, 158, 159, 7, 5, 2, 2, 159, 160, 7, 46, 2, 2, 160, 161, 7, 36, 2, 2, 161, 29, 3, 2, 2, 2, 162, 163, 9, 3, 2, 2, 163, 31, 3, 2, 2, 2, 164, 165, 7, 44, 2, 2, 165, 33, 3, 2, 2, 2, 166, 167, 7, 45, 2, 2, 167, 35, 3, 2, 2, 2, 168, 169, 7, 47, 2, 2, 169, 37, 3, 2, 2, 2, 16, 41, 48, 53, 65, 70, 73, 77, 84, 100, 125, 130, 134, 151, 153]
\ No newline at end of file
[3, 24715, 42794, 33075, 47597, 16764, 15335, 30598, 22884, 3, 49, 174, 4, 2, 9, 2, 4, 3, 9, 3, 4, 4, 9, 4, 4, 5, 9, 5, 4, 6, 9, 6, 4, 7, 9, 7, 4, 8, 9, 8, 4, 9, 9, 9, 4, 10, 9, 10, 4, 11, 9, 11, 4, 12, 9, 12, 4, 13, 9, 13, 4, 14, 9, 14, 4, 15, 9, 15, 4, 16, 9, 16, 4, 17, 9, 17, 4, 18, 9, 18, 4, 19, 9, 19, 3, 2, 7, 2, 40, 10, 2, 12, 2, 14, 2, 43, 11, 2, 3, 3, 3, 3, 3, 3, 3, 3, 5, 3, 49, 10, 3, 3, 3, 7, 3, 52, 10, 3, 12, 3, 14, 3, 55, 11, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 4, 3, 4, 3, 5, 6, 5, 64, 10, 5, 13, 5, 14, 5, 65, 3, 6, 6, 6, 69, 10, 6, 13, 6, 14, 6, 70, 3, 6, 5, 6, 74, 10, 6, 3, 7, 3, 7, 5, 7, 78, 10, 7, 3, 8, 3, 8, 3, 9, 3, 9, 3, 9, 5, 9, 85, 10, 9, 3, 10, 3, 10, 3, 10, 5, 10, 90, 10, 10, 3, 11, 3, 11, 3, 11, 3, 11, 3, 11, 3, 12, 3, 12, 3, 13, 3, 13, 3, 13, 7, 13, 102, 10, 13, 12, 13, 14, 13, 105, 11, 13, 3, 14, 3, 14, 3, 14, 3, 14, 3, 14, 3, 14, 3, 14, 3, 14, 3, 14, 3, 14, 3, 14, 3, 14, 3, 14, 3, 14, 3, 14, 3, 14, 3, 14, 3, 14, 3, 14, 3, 14, 3, 14, 3, 14, 5, 14, 129, 10, 14, 3, 14, 7, 14, 132, 10, 14, 12, 14, 14, 14, 135, 11, 14, 3, 14, 5, 14, 138, 10, 14, 3, 14, 3, 14, 3, 14, 3, 14, 3, 14, 3, 14, 3, 14, 3, 14, 3, 14, 3, 14, 3, 14, 3, 14, 3, 14, 3, 14, 3, 14, 7, 14, 155, 10, 14, 12, 14, 14, 14, 158, 11, 14, 3, 15, 3, 15, 3, 15, 3, 15, 3, 15, 3, 15, 3, 16, 3, 16, 3, 17, 3, 17, 3, 18, 3, 18, 3, 19, 3, 19, 3, 19, 2, 3, 26, 20, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 32, 34, 36, 2, 4, 3, 2, 10, 26, 3, 2, 37, 42, 2, 180, 2, 41, 3, 2, 2, 2, 4, 44, 3, 2, 2, 2, 6, 60, 3, 2, 2, 2, 8, 63, 3, 2, 2, 2, 10, 73, 3, 2, 2, 2, 12, 77, 3, 2, 2, 2, 14, 79, 3, 2, 2, 2, 16, 81, 3, 2, 2, 2, 18, 89, 3, 2, 2, 2, 20, 91, 3, 2, 2, 2, 22, 96, 3, 2, 2, 2, 24, 98, 3, 2, 2, 2, 26, 137, 3, 2, 2, 2, 28, 159, 3, 2, 2, 2, 30, 165, 3, 2, 2, 2, 32, 167, 3, 2, 2, 2, 34, 169, 3, 2, 2, 2, 36, 171, 3, 2, 2, 2, 38, 40, 5, 4, 3, 2, 39, 38, 3, 2, 2, 2, 40, 43, 3, 2, 2, 2, 41, 39, 3, 2, 2, 2, 41, 42, 3, 2, 2, 2, 42, 3, 3, 2, 2, 2, 43, 41, 3, 2, 2, 2, 44, 45, 7, 3, 2, 2, 45, 46, 5, 32, 17, 2, 46, 53, 7, 4, 2, 2, 47, 49, 7, 5, 2, 2, 48, 47, 3, 2, 2, 2, 48, 49, 3, 2, 2, 2, 49, 50, 3, 2, 2, 2, 50, 52, 5, 18, 10, 2, 51, 48, 3, 2, 2, 2, 52, 55, 3, 2, 2, 2, 53, 51, 3, 2, 2, 2, 53, 54, 3, 2, 2, 2, 54, 56, 3, 2, 2, 2, 55, 53, 3, 2, 2, 2, 56, 57, 7, 6, 2, 2, 57, 58, 7, 7, 2, 2, 58, 59, 5, 6, 4, 2, 59, 5, 3, 2, 2, 2, 60, 61, 5, 8, 5, 2, 61, 7, 3, 2, 2, 2, 62, 64, 5, 10, 6, 2, 63, 62, 3, 2, 2, 2, 64, 65, 3, 2, 2, 2, 65, 63, 3, 2, 2, 2, 65, 66, 3, 2, 2, 2, 66, 9, 3, 2, 2, 2, 67, 69, 5, 12, 7, 2, 68, 67, 3, 2, 2, 2, 69, 70, 3, 2, 2, 2, 70, 68, 3, 2, 2, 2, 70, 71, 3, 2, 2, 2, 71, 74, 3, 2, 2, 2, 72, 74, 5, 14, 8, 2, 73, 68, 3, 2, 2, 2, 73, 72, 3, 2, 2, 2, 74, 11, 3, 2, 2, 2, 75, 78, 5, 20, 11, 2, 76, 78, 7, 8, 2, 2, 77, 75, 3, 2, 2, 2, 77, 76, 3, 2, 2, 2, 78, 13, 3, 2, 2, 2, 79, 80, 7, 43, 2, 2, 80, 15, 3, 2, 2, 2, 81, 84, 5, 18, 10, 2, 82, 83, 7, 5, 2, 2, 83, 85, 5, 16, 9, 2, 84, 82, 3, 2, 2, 2, 84, 85, 3, 2, 2, 2, 85, 17, 3, 2, 2, 2, 86, 90, 5, 32, 17, 2, 87, 88, 7, 9, 2, 2, 88, 90, 5, 32, 17, 2, 89, 86, 3, 2, 2, 2, 89, 87, 3, 2, 2, 2, 90, 19, 3, 2, 2, 2, 91, 92, 5, 22, 12, 2, 92, 93, 7, 4, 2, 2, 93, 94, 5, 24, 13, 2, 94, 95, 7, 6, 2, 2, 95, 21, 3, 2, 2, 2, 96, 97, 9, 2, 2, 2, 97, 23, 3, 2, 2, 2, 98, 103, 5, 26, 14, 2, 99, 100, 7, 5, 2, 2, 100, 102, 5, 26, 14, 2, 101, 99, 3, 2, 2, 2, 102, 105, 3, 2, 2, 2, 103, 101, 3, 2, 2, 2, 103, 104, 3, 2, 2, 2, 104, 25, 3, 2, 2, 2, 105, 103, 3, 2, 2, 2, 106, 107, 8, 14, 1, 2, 107, 138, 5, 34, 18, 2, 108, 138, 7, 46, 2, 2, 109, 138, 7, 27, 2, 2, 110, 138, 5, 32, 17, 2, 111, 112, 7, 29, 2, 2, 112, 138, 5, 26, 14, 8, 113, 114, 7, 4, 2, 2, 114, 115, 5, 26, 14, 2, 115, 116, 7, 6, 2, 2, 116, 138, 3, 2, 2, 2, 117, 118, 5, 30, 16, 2, 118, 119, 7, 4, 2, 2, 119, 120, 5, 26, 14, 2, 120, 121, 7, 6, 2, 2, 121, 138, 3, 2, 2, 2, 122, 123, 5, 32, 17, 2, 123, 124, 7, 32, 2, 2, 124, 125, 5, 26, 14, 4, 125, 138, 3, 2, 2, 2, 126, 133, 7, 33, 2, 2, 127, 129, 7, 5, 2, 2, 128, 127, 3, 2, 2, 2, 128, 129, 3, 2, 2, 2, 129, 130, 3, 2, 2, 2, 130, 132, 5, 28, 15, 2, 131, 128, 3, 2, 2, 2, 132, 135, 3, 2, 2, 2, 133, 131, 3, 2, 2, 2, 133, 134, 3, 2, 2, 2, 134, 136, 3, 2, 2, 2, 135, 133, 3, 2, 2, 2, 136, 138, 7, 34, 2, 2, 137, 106, 3, 2, 2, 2, 137, 108, 3, 2, 2, 2, 137, 109, 3, 2, 2, 2, 137, 110, 3, 2, 2, 2, 137, 111, 3, 2, 2, 2, 137, 113, 3, 2, 2, 2, 137, 117, 3, 2, 2, 2, 137, 122, 3, 2, 2, 2, 137, 126, 3, 2, 2, 2, 138, 156, 3, 2, 2, 2, 139, 140, 12, 12, 2, 2, 140, 141, 7, 28, 2, 2, 141, 155, 5, 26, 14, 13, 142, 143, 12, 11, 2, 2, 143, 144, 7, 29, 2, 2, 144, 155, 5, 26, 14, 12, 145, 146, 12, 10, 2, 2, 146, 147, 7, 9, 2, 2, 147, 155, 5, 26, 14, 11, 148, 149, 12, 9, 2, 2, 149, 150, 7, 30, 2, 2, 150, 155, 5, 26, 14, 10, 151, 152, 12, 7, 2, 2, 152, 153, 7, 31, 2, 2, 153, 155, 5, 26, 14, 8, 154, 139, 3, 2, 2, 2, 154, 142, 3, 2, 2, 2, 154, 145, 3, 2, 2, 2, 154, 148, 3, 2, 2, 2, 154, 151, 3, 2, 2, 2, 155, 158, 3, 2, 2, 2, 156, 154, 3, 2, 2, 2, 156, 157, 3, 2, 2, 2, 157, 27, 3, 2, 2, 2, 158, 156, 3, 2, 2, 2, 159, 160, 7, 35, 2, 2, 160, 161, 7, 46, 2, 2, 161, 162, 7, 5, 2, 2, 162, 163, 7, 46, 2, 2, 163, 164, 7, 36, 2, 2, 164, 29, 3, 2, 2, 2, 165, 166, 9, 3, 2, 2, 166, 31, 3, 2, 2, 2, 167, 168, 7, 44, 2, 2, 168, 33, 3, 2, 2, 2, 169, 170, 7, 45, 2, 2, 170, 35, 3, 2, 2, 2, 171, 172, 7, 47, 2, 2, 172, 37, 3, 2, 2, 2, 17, 41, 48, 53, 65, 70, 73, 77, 84, 89, 103, 128, 133, 137, 154, 156]
\ No newline at end of file
......@@ -51,27 +51,27 @@ EOL=47
')'=4
':'=5
'return'=6
'X'=7
'Rx'=8
'Rz'=9
'Ry'=10
'Y'=11
'Z'=12
'CNOT'=13
'CZ'=14
'CX'=15
'H'=16
'Swap'=17
'Identity'=18
'CPhase'=19
'Measure'=20
'MEASURE'=21
'xacc'=22
'qmi'=23
'pi'=24
'+'=25
'-'=26
'*'=27
'*'=7
'X'=8
'Rx'=9
'Rz'=10
'Ry'=11
'Y'=12
'Z'=13
'CNOT'=14
'CZ'=15
'CX'=16
'H'=17
'Swap'=18
'Identity'=19
'CPhase'=20
'Measure'=21
'MEASURE'=22
'xacc'=23
'qmi'=24
'pi'=25
'+'=26
'-'=27
'/'=28
'^'=29
'='=30
......
......@@ -79,12 +79,12 @@ std::vector<std::string> PyXACCIRLexer::_modeNames = {
};
std::vector<std::string> PyXACCIRLexer::_literalNames = {
"", u8"'def'", u8"'('", u8"','", u8"')'", u8"':'", u8"'return'", u8"'X'",
u8"'Rx'", u8"'Rz'", u8"'Ry'", u8"'Y'", u8"'Z'", u8"'CNOT'", u8"'CZ'",
"", u8"'def'", u8"'('", u8"','", u8"')'", u8"':'", u8"'return'", u8"'*'",
u8"'X'", u8"'Rx'", u8"'Rz'", u8"'Ry'", u8"'Y'", u8"'Z'", u8"'CNOT'", u8"'CZ'",
u8"'CX'", u8"'H'", u8"'Swap'", u8"'Identity'", u8"'CPhase'", u8"'Measure'",
u8"'MEASURE'", u8"'xacc'", u8"'qmi'", u8"'pi'", u8"'+'", u8"'-'", u8"'*'",
u8"'/'", u8"'^'", u8"'='", u8"''['", u8"']''", u8"'['", u8"']'", u8"'sin'",
u8"'cos'", u8"'tan'", u8"'exp'", u8"'ln'", u8"'sqrt'"
u8"'MEASURE'", u8"'xacc'", u8"'qmi'", u8"'pi'", u8"'+'", u8"'-'", u8"'/'",
u8"'^'", u8"'='", u8"''['", u8"']''", u8"'['", u8"']'", u8"'sin'", u8"'cos'",
u8"'tan'", u8"'exp'", u8"'ln'", u8"'sqrt'"
};
std::vector<std::string> PyXACCIRLexer::_symbolicNames = {
......@@ -133,28 +133,28 @@ PyXACCIRLexer::Initializer::Initializer() {
0x2, 0x3, 0x2, 0x3, 0x3, 0x3, 0x3, 0x3, 0x4, 0x3, 0x4, 0x3, 0x5, 0x3,
0x5, 0x3, 0x6, 0x3, 0x6, 0x3, 0x7, 0x3, 0x7, 0x3, 0x7, 0x3, 0x7, 0x3,
0x7, 0x3, 0x7, 0x3, 0x7, 0x3, 0x8, 0x3, 0x8, 0x3, 0x9, 0x3, 0x9, 0x3,
0x9, 0x3, 0xa, 0x3, 0xa, 0x3, 0xa, 0x3, 0xb, 0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4 +155,4 @@ mode names:
DEFAULT_MODE
atn:
[3, 24715, 42794, 33075, 47597, 16764, 15335, 30598, 22884, 2, 49, 283, 8, 1, 4, 2, 9, 2, 4, 3, 9, 3, 4, 4, 9, 4, 4, 5, 9, 5, 4, 6, 9, 6, 4, 7, 9, 7, 4, 8, 9, 8, 4, 9, 9, 9, 4, 10, 9, 10, 4, 11, 9, 11, 4, 12, 9, 12, 4, 13, 9, 13, 4, 14, 9, 14, 4, 15, 9, 15, 4, 16, 9, 16, 4, 17, 9, 17, 4, 18, 9, 18, 4, 19, 9, 19, 4, 20, 9, 20, 4, 21, 9, 21, 4, 22, 9, 22, 4, 23, 9, 23, 4, 24, 9, 24, 4, 25, 9, 25, 4, 26, 9, 26, 4, 27, 9, 27, 4, 28, 9, 28, 4, 29, 9, 29, 4, 30, 9, 30, 4, 31, 9, 31, 4, 32, 9, 32, 4, 33, 9, 33, 4, 34, 9, 34, 4, 35, 9, 35, 4, 36, 9, 36, 4, 37, 9, 37, 4, 38, 9, 38, 4, 39, 9, 39, 4, 40, 9, 40, 4, 41, 9, 41, 4, 42, 9, 42, 4, 43, 9, 43, 4, 44, 9, 44, 4, 45, 9, 45, 4, 46, 9, 46, 4, 47, 9, 47, 4, 48, 9, 48, 3, 2, 3, 2, 3, 2, 3, 2, 3, 3, 3, 3, 3, 4, 3, 4, 3, 5, 3, 5, 3, 6, 3, 6, 3, 7, 3, 7, 3, 7, 3, 7, 3, 7, 3, 7, 3, 7, 3, 8, 3, 8, 3, 9, 3, 9, 3, 9, 3, 10, 3, 10, 3, 10, 3, 11, 3, 11, 3, 11, 3, 12, 3, 12, 3, 13, 3, 13, 3, 14, 3, 14, 3, 14, 3, 14, 3, 14, 3, 15, 3, 15, 3, 15, 3, 16, 3, 16, 3, 16, 3, 17, 3, 17, 3, 18, 3, 18, 3, 18, 3, 18, 3, 18, 3, 19, 3, 19, 3, 19, 3, 19, 3, 19, 3, 19, 3, 19, 3, 19, 3, 19, 3, 20, 3, 20, 3, 20, 3, 20, 3, 20, 3, 20, 3, 20, 3, 21, 3, 21, 3, 21, 3, 21, 3, 21, 3, 21, 3, 21, 3, 21, 3, 22, 3, 22, 3, 22, 3, 22, 3, 22, 3, 22, 3, 22, 3, 22, 3, 23, 3, 23, 3, 23, 3, 23, 3, 23, 3, 24, 3, 24, 3, 24, 3, 24, 3, 25, 3, 25, 3, 25, 3, 26, 3, 26, 3, 27, 3, 27, 3, 28, 3, 28, 3, 29, 3, 29, 3, 30, 3, 30, 3, 31, 3, 31, 3, 32, 3, 32, 3, 32, 3, 33, 3, 33, 3, 33, 3, 34, 3, 34, 3, 35, 3, 35, 3, 36, 3, 36, 3, 36, 3, 36, 3, 37, 3, 37, 3, 37, 3, 37, 3, 38, 3, 38, 3, 38, 3, 38, 3, 39, 3, 39, 3, 39, 3, 39, 3, 40, 3, 40, 3, 40, 3, 41, 3, 41, 3, 41, 3, 41, 3, 41, 3, 42, 3, 42, 7, 42, 242, 10, 42, 12, 42, 14, 42, 245, 11, 42, 3, 42, 3, 42, 3, 43, 3, 43, 7, 43, 251, 10, 43, 12, 43, 14, 43, 254, 11, 43, 3, 44, 3, 44, 3, 44, 5, 44, 259, 10, 44, 3, 45, 6, 45, 262, 10, 45, 13, 45, 14, 45, 263, 3, 46, 3, 46, 7, 46, 268, 10, 46, 12, 46, 14, 46, 271, 11, 46, 3, 46, 3, 46, 3, 47, 3, 47, 3, 47, 3, 47, 3, 48, 5, 48, 280, 10, 48, 3, 48, 3, 48, 2, 2, 49, 3, 3, 5, 4, 7, 5, 9, 6, 11, 7, 13, 8, 15, 9, 17, 10, 19, 11, 21, 12, 23, 13, 25, 14, 27, 15, 29, 16, 31, 17, 33, 18, 35, 19, 37, 20, 39, 21, 41, 22, 43, 23, 45, 24, 47, 25, 49, 26, 51, 27, 53, 28, 55, 29, 57, 30, 59, 31, 61, 32, 63, 33, 65, 34, 67, 35, 69, 36, 71, 37, 73, 38, 75, 39, 77, 40, 79, 41, 81, 42, 83, 43, 85,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2, 7, 103, 3, 2, 2, 2, 9, 105, 3, 2, 2, 2, 11, 107, 3, 2, 2, 2, 13, 109, 3, 2, 2, 2, 15, 116, 3, 2, 2, 2, 17, 118, 3, 2, 2, 2, 19, 121, 3, 2, 2, 2, 21, 124, 3, 2, 2, 2, 23, 127, 3, 2, 2, 2, 25, 129, 3, 2, 2, 2, 27, 131, 3, 2, 2, 2, 29, 136, 3, 2, 2, 2, 31, 139, 3, 2, 2, 2, 33, 142, 3, 2, 2, 2, 35, 144, 3, 2, 2, 2, 37, 149, 3, 2, 2, 2, 39, 158, 3, 2, 2, 2, 41, 165, 3, 2, 2, 2, 43, 173, 3, 2, 2, 2, 45, 181, 3, 2, 2, 2, 47, 186, 3, 2, 2, 2, 49, 190, 3, 2, 2, 2, 51, 193, 3, 2, 2, 2, 53, 195, 3, 2, 2, 2, 55, 197, 3, 2, 2, 2, 57, 199, 3, 2, 2, 2, 59, 201, 3, 2, 2, 2, 61, 203, 3, 2, 2, 2, 63, 205, 3, 2, 2, 2, 65, 208, 3, 2, 2, 2, 67, 211, 3, 2, 2, 2, 69, 213, 3, 2, 2, 2, 71, 215, 3, 2, 2, 2, 73, 219, 3, 2, 2, 2, 75, 223, 3, 2, 2, 2, 77, 227, 3, 2, 2, 2, 79, 231, 3, 2, 2, 2, 81, 234, 3, 2, 2, 2, 83, 239, 3, 2, 2, 2, 85, 248, 3, 2, 2, 2, 87, 255, 3, 2, 2, 2, 89, 261, 3, 2, 2, 2, 91, 265, 3, 2, 2, 2, 93, 274, 3, 2, 2, 2, 95, 279, 3, 2, 2, 2, 97, 98, 7, 102, 2, 2, 98, 99, 7, 103, 2, 2, 99, 100, 7, 104, 2, 2, 100, 4, 3, 2, 2, 2, 101, 102, 7, 42, 2, 2, 102, 6, 3, 2, 2, 2, 103, 104, 7, 46, 2, 2, 104, 8, 3, 2, 2, 2, 105, 106, 7, 43, 2, 2, 106, 10, 3, 2, 2, 2, 107, 108, 7, 60, 2, 2, 108, 12, 3, 2, 2, 2, 109, 110, 7, 116, 2, 2, 110, 111, 7, 103, 2, 2, 111, 112, 7, 118, 2, 2, 112, 113, 7, 119, 2, 2, 113, 114, 7, 116, 2, 2, 114, 115, 7, 112, 2, 2, 115, 14, 3, 2, 2, 2, 116, 117, 7, 90, 2, 2, 117, 16, 3, 2, 2, 2, 118, 119, 7, 84, 2, 2, 119, 120, 7, 122, 2, 2, 120, 18, 3, 2, 2, 2, 121, 122, 7, 84, 2, 2, 122, 123, 7, 124, 2, 2, 123, 20, 3, 2, 2, 2, 124, 125, 7, 84, 2, 2, 125, 126, 7, 123, 2, 2, 126, 22, 3, 2, 2, 2, 127, 128, 7, 91, 2, 2, 128, 24, 3, 2, 2, 2, 129, 130, 7, 92, 2, 2, 130, 26, 3, 2, 2, 2, 131, 132, 7, 69, 2, 2, 132, 133, 7, 80, 2, 2, 133, 134, 7, 81, 2, 2, 134, 135, 7, 86, 2, 2, 135, 28, 3, 2, 2, 2, 136, 137, 7, 69, 2, 2, 137, 138, 7, 92, 2, 2, 138, 30, 3, 2, 2, 2, 139, 140, 7, 69, 2, 2, 140, 141, 7, 90, 2, 2, 141, 32, 3, 2, 2, 2, 142, 143, 7, 74, 2, 2, 143, 34, 3, 2, 2, 2, 144, 145, 7, 85, 2, 2, 145, 146, 7, 121, 2, 2, 146, 147, 7, 99, 2, 2, 147, 148, 7, 114, 2, 2, 148, 36, 3, 2, 2, 2, 149, 150, 7, 75, 2, 2, 150, 151, 7, 102, 2, 2, 151, 152, 7, 103, 2, 2, 152, 153, 7, 112, 2, 2, 153, 154, 7, 118, 2, 2, 154, 155, 7, 107, 2, 2, 155, 156, 7, 118, 2, 2, 156, 157, 7, 123, 2, 2, 157, 38, 3, 2, 2, 2, 158, 159, 7, 69, 2, 2, 159, 160, 7, 82, 2, 2, 160, 161, 7, 106, 2, 2, 161, 162, 7, 99, 2, 2, 162, 163, 7, 117, 2, 2, 163, 164, 7, 103, 2, 2, 164, 40, 3, 2, 2, 2, 165, 166, 7, 79, 2, 2, 166, 167, 7, 103, 2, 2, 167, 168, 7, 99, 2, 2, 168, 169, 7, 117, 2, 2, 169, 170, 7, 119, 2, 2, 170, 171, 7, 116, 2, 2, 171, 172, 7, 103, 2, 2, 172, 42, 3, 2, 2, 2, 173, 174, 7, 79, 2, 2, 174, 175, 7, 71, 2, 2, 175, 176, 7, 67, 2, 2, 176, 177, 7, 85, 2, 2, 177, 178, 7, 87, 2, 2, 178, 179, 7, 84, 2, 2, 179, 180, 7, 71, 2, 2, 180, 44, 3, 2, 2, 2, 181, 182, 7, 122, 2, 2, 182, 183, 7, 99, 2, 2, 183, 184, 7, 101, 2, 2, 184, 185, 7, 101, 2, 2, 185, 46, 3, 2, 2, 2, 186, 187, 7, 115, 2, 2, 187, 188, 7, 111, 2, 2, 188, 189, 7, 107, 2, 2, 189, 48, 3, 2, 2, 2, 190, 191, 7, 114, 2, 2, 191, 192, 7, 107, 2, 2, 192, 50, 3, 2, 2, 2, 193, 194, 7, 45, 2, 2, 194, 52, 3, 2, 2, 2, 195, 196, 7, 47, 2, 2, 196, 54, 3, 2, 2, 2, 197, 198, 7, 44, 2, 2, 198, 56, 3, 2, 2, 2, 199, 200, 7, 49, 2, 2, 200, 58, 3, 2, 2, 2, 201, 202, 7, 96, 2, 2, 202, 60, 3, 2, 2, 2, 203, 204, 7, 63, 2, 2, 204, 62, 3, 2, 2, 2, 205, 206, 7, 41, 2, 2, 206, 207, 7, 93, 2, 2, 207, 64, 3, 2, 2, 2, 208, 209, 7, 95, 2, 2, 209, 210, 7, 41, 2, 2, 210, 66, 3, 2, 2, 2, 211, 212, 7, 93, 2, 2, 212, 68, 3, 2, 2, 2, 213, 214, 7, 95, 2, 2, 214, 70, 3, 2, 2, 2, 215, 216, 7, 117, 2, 2, 216, 217, 7, 107, 2, 2, 217, 218, 7, 112, 2, 2, 218, 72, 3, 2, 2, 2, 219, 220, 7, 101, 2, 2, 220, 221, 7, 113, 2, 2, 221, 222, 7, 117, 2, 2, 222, 74, 3, 2, 2, 2, 223, 224, 7, 118, 2, 2, 224, 225, 7, 99, 2, 2, 225, 226, 7, 112, 2, 2, 226, 76, 3, 2, 2, 2, 227, 228, 7, 103, 2, 2, 228, 229, 7, 122, 2, 2, 229, 230, 7, 114, 2, 2, 230, 78, 3, 2, 2, 2, 231, 232, 7, 110, 2, 2, 232, 233, 7, 112, 2, 2, 233, 80, 3, 2, 2, 2, 234, 235, 7, 117, 2, 2, 235, 236, 7, 115, 2, 2, 236, 237, 7, 116, 2, 2, 237, 238, 7, 118, 2, 2, 238, 82, 3, 2, 2, 2, 239, 243, 7, 37, 2, 2, 240, 242, 10, 2, 2, 2, 241, 240, 3, 2, 2, 2, 242, 245, 3, 2, 2, 2, 243, 241, 3, 2, 2, 2, 243, 244, 3, 2, 2, 2, 244, 246, 3, 2, 2, 2, 245, 243, 3, 2, 2, 2, 246, 247, 5, 95, 48, 2, 247, 84, 3, 2, 2, 2, 248, 252, 9, 3, 2, 2, 249, 251, 9, 4, 2, 2, 250, 249, 3, 2, 2, 2, 251, 254, 3, 2, 2, 2, 252, 250, 3, 2, 2, 2, 252, 253, 3, 2, 2, 2, 253, 86, 3, 2, 2, 2, 254, 252, 3, 2, 2, 2, 255, 256, 5, 89, 45, 2, 256, 258, 7, 48, 2, 2, 257, 259, 5, 89, 45, 2, 258, 257, 3, 2, 2, 2, 258, 259, 3, 2, 2, 2, 259, 88, 3, 2, 2, 2, 260, 262, 4, 50, 59, 2, 261, 260, 3, 2, 2, 2, 262, 263, 3, 2, 2, 2, 263, 261, 3, 2, 2, 2, 263, 264, 3, 2, 2, 2, 264, 90, 3, 2, 2, 2, 265, 269, 7, 36, 2, 2, 266, 268, 10, 5, 2, 2, 267, 266, 3, 2, 2, 2, 268, 271, 3, 2, 2, 2, 269, 267, 3, 2, 2, 2, 269, 270, 3, 2, 2, 2, 270, 272, 3, 2, 2, 2, 271, 269, 3, 2, 2, 2, 272, 273, 7, 36, 2, 2, 273, 92, 3, 2, 2, 2, 274, 275, 9, 6, 2, 2, 275, 276, 3, 2, 2, 2, 276, 277, 8, 47, 2, 2, 277, 94, 3, 2, 2, 2, 278, 280, 7, 15, 2, 2, 279, 278, 3, 2, 2, 2, 279, 280, 3, 2, 2, 2, 280, 281, 3, 2, 2, 2, 281, 282, 7, 12, 2, 2, 282, 96, 3, 2, 2, 2, 9, 2, 243, 252, 258, 263, 269, 279, 3, 8, 2, 2]
\ No newline at end of file
[3, 24715, 42794, 33075, 47597, 16764, 15335, 30598, 22884, 2, 49, 283, 8, 1, 4, 2, 9, 2, 4, 3, 9, 3, 4, 4, 9, 4, 4, 5, 9, 5, 4, 6, 9, 6, 4, 7, 9, 7, 4, 8, 9, 8, 4, 9, 9, 9, 4, 10, 9, 10, 4, 11, 9, 11, 4, 12, 9, 12, 4, 13, 9, 13, 4, 14, 9, 14, 4, 15, 9, 15, 4, 16, 9, 16, 4, 17, 9, 17, 4, 18, 9, 18, 4, 19, 9, 19, 4, 20, 9, 20, 4, 21, 9, 21, 4, 22, 9, 22, 4, 23, 9, 23, 4, 24, 9, 24, 4, 25, 9, 25, 4, 26, 9, 26, 4, 27, 9, 27, 4, 28, 9, 28, 4, 29, 9, 29, 4, 30, 9, 30, 4, 31, 9, 31, 4, 32, 9, 32, 4, 33, 9, 33, 4, 34, 9, 34, 4, 35, 9, 35, 4, 36, 9, 36, 4, 37, 9, 37, 4, 38, 9, 38, 4, 39, 9, 39, 4, 40, 9, 40, 4, 41, 9, 41, 4, 42, 9, 42, 4, 43, 9, 43, 4, 44, 9, 44, 4, 45, 9, 45, 4, 46, 9, 46, 4, 47, 9, 47, 4, 48, 9, 48, 3, 2, 3, 2, 3, 2, 3, 2, 3, 3, 3, 3, 3, 4, 3, 4, 3, 5, 3, 5, 3, 6, 3, 6, 3, 7, 3, 7, 3, 7, 3, 7, 3, 7, 3, 7, 3, 7, 3, 8, 3, 8, 3, 9, 3, 9, 3, 10, 3, 10, 3, 10, 3, 11, 3, 11, 3, 11, 3, 12, 3, 12, 3, 12, 3, 13, 3, 13, 3, 14, 3, 14, 3, 15, 3, 15, 3, 15, 3, 15, 3, 15, 3, 16, 3, 16, 3, 16, 3, 17, 3, 17, 3, 17, 3, 18, 3, 18, 3, 19, 3, 19, 3, 19, 3, 19, 3, 19, 3, 20, 3, 20, 3, 20, 3, 20, 3, 20, 3, 20, 3, 20, 3, 20, 3, 20, 3, 21, 3, 21, 3, 21, 3, 21, 3, 21, 3, 21, 3, 21, 3, 22, 3, 22, 3, 22, 3, 22, 3, 22, 3, 22, 3, 22, 3, 22, 3, 23, 3, 23, 3, 23, 3, 23, 3, 23, 3, 23, 3, 23, 3, 23, 3, 24, 3, 24, 3, 24, 3, 24, 3, 24, 3, 25, 3, 25, 3, 25, 3, 25, 3, 26, 3, 26, 3, 26, 3, 27, 3, 27, 3, 28, 3, 28, 3, 29, 3, 29, 3, 30, 3, 30, 3, 31, 3, 31, 3, 32, 3, 32, 3, 32, 3, 33, 3, 33, 3, 33, 3, 34, 3, 34, 3, 35, 3, 35, 3, 36, 3, 36, 3, 36, 3, 36, 3, 37, 3, 37, 3, 37, 3, 37, 3, 38, 3, 38, 3, 38, 3, 38, 3, 39, 3, 39, 3, 39, 3, 39, 3, 40, 3, 40, 3, 40, 3, 41, 3, 41, 3, 41, 3, 41, 3, 41, 3, 42, 3, 42, 7, 42, 242, 10, 42, 12, 42, 14, 42, 245, 11, 42, 3, 42, 3, 42, 3, 43, 3, 43, 7, 43, 251, 10, 43, 12, 43, 14, 43, 254, 11, 43, 3, 44, 3, 44, 3, 44, 5, 44, 259, 10, 44, 3, 45, 6, 45, 262, 10, 45, 13, 45, 14, 45, 263, 3, 46, 3, 46, 7, 46, 268, 10, 46, 12, 46, 14, 46, 271, 11, 46, 3, 46, 3, 46, 3, 47, 3, 47, 3, 47, 3, 47, 3, 48, 5, 48, 280, 10, 48, 3, 48, 3, 48, 2, 2, 49, 3, 3, 5, 4, 7, 5, 9, 6, 11, 7, 13, 8, 15, 9, 17, 10, 19, 11, 21, 12, 23, 13, 25, 14, 27, 15, 29, 16, 31, 17, 33, 18, 35, 19, 37, 20, 39, 21, 41, 22, 43, 23, 45, 24, 47, 25, 49, 26, 51, 27, 53, 28, 55, 29, 57, 30, 59, 31, 61, 32, 63, 33, 65, 34, 67, 35, 69, 36, 71, 37, 73, 38, 75, 39, 77, 40, 79, 41, 81, 42, 83, 43, 85, 44, 87, 45, 89, 46, 91, 47, 93, 48, 95, 49, 3, 2, 7, 4, 2, 12, 12, 15, 15, 3, 2, 99, 124, 6, 2, 50, 59, 67, 92, 97, 97, 99, 124, 3, 2, 36, 36, 5, 2, 11, 12, 15, 15, 34, 34, 2, 288, 2, 3, 3, 2, 2, 2, 2, 5, 3, 2, 2, 2, 2, 7, 3, 2, 2, 2, 2, 9, 3, 2, 2, 2, 2, 11, 3, 2, 2, 2, 2, 13, 3, 2, 2, 2, 2, 15, 3, 2, 2, 2, 2, 17, 3, 2, 2, 2, 2, 19, 3, 2, 2, 2, 2, 21, 3, 2, 2, 2, 2, 23, 3, 2, 2, 2, 2, 25, 3, 2, 2, 2, 2, 27, 3, 2, 2, 2, 2, 29, 3, 2, 2, 2, 2, 31, 3, 2, 2, 2, 2, 33, 3, 2, 2, 2, 2, 35, 3, 2, 2, 2, 2, 37, 3, 2, 2, 2, 2, 39, 3, 2, 2, 2, 2, 41, 3, 2, 2, 2, 2, 43, 3, 2, 2, 2, 2, 45, 3, 2, 2, 2, 2, 47, 3, 2, 2, 2, 2, 49, 3, 2, 2, 2, 2, 51, 3, 2, 2, 2, 2, 53, 3, 2, 2, 2, 2, 55, 3, 2, 2, 2, 2, 57, 3, 2, 2, 2, 2, 59, 3, 2, 2, 2, 2, 61, 3, 2, 2, 2, 2, 63, 3, 2, 2, 2, 2, 65, 3, 2, 2, 2, 2, 67, 3, 2, 2, 2, 2, 69, 3, 2, 2, 2, 2, 71, 3, 2, 2, 2, 2, 73, 3, 2, 2, 2, 2, 75, 3, 2, 2, 2, 2, 77, 3, 2, 2, 2, 2, 79, 3, 2, 2, 2, 2, 81, 3, 2, 2, 2, 2, 83, 3, 2, 2, 2, 2, 85, 3, 2, 2, 2, 2, 87, 3, 2, 2, 2, 2, 89, 3, 2, 2, 2, 2, 91, 3, 2, 2, 2, 2, 93, 3, 2, 2, 2, 2, 95, 3, 2, 2, 2, 3, 97, 3, 2, 2, 2, 5, 101, 3, 2, 2, 2, 7, 103, 3, 2, 2, 2, 9, 105, 3, 2, 2, 2, 11, 107, 3, 2, 2, 2, 13, 109, 3, 2, 2, 2, 15, 116, 3, 2, 2, 2, 17, 118, 3, 2, 2, 2, 19, 120, 3, 2, 2, 2, 21, 123, 3, 2, 2, 2, 23, 126, 3, 2, 2, 2, 25, 129, 3, 2, 2, 2, 27, 131, 3, 2, 2, 2, 29, 133, 3, 2, 2, 2, 31, 138, 3, 2, 2, 2, 33, 141, 3, 2, 2, 2, 35, 144, 3, 2, 2, 2, 37, 146, 3, 2, 2, 2, 39, 151, 3, 2, 2, 2, 41, 160, 3, 2, 2, 2, 43, 167, 3, 2, 2, 2, 45, 175, 3, 2, 2, 2, 47, 183, 3, 2, 2, 2, 49, 188, 3, 2, 2, 2, 51, 192, 3, 2, 2, 2, 53, 195, 3, 2, 2, 2, 55, 197, 3, 2, 2, 2, 57, 199, 3, 2, 2, 2, 59, 201, 3, 2, 2, 2, 61, 203, 3, 2, 2, 2, 63, 205, 3, 2, 2, 2, 65, 208, 3, 2, 2, 2, 67, 211, 3, 2, 2, 2, 69, 213, 3, 2, 2, 2, 71, 215, 3, 2, 2, 2, 73, 219, 3, 2, 2, 2, 75, 223, 3, 2, 2, 2, 77, 227, 3, 2, 2, 2, 79, 231, 3, 2, 2, 2, 81, 234, 3, 2, 2, 2, 83, 239, 3, 2, 2, 2, 85, 248, 3, 2, 2, 2, 87, 255, 3, 2, 2, 2, 89, 261, 3, 2, 2, 2, 91, 265, 3, 2, 2, 2, 93, 274, 3, 2, 2, 2, 95, 279, 3, 2, 2, 2, 97, 98, 7, 102, 2, 2, 98, 99, 7, 103, 2, 2, 99, 100, 7, 104, 2, 2, 100, 4, 3, 2, 2, 2, 101, 102, 7, 42, 2, 2, 102, 6, 3, 2, 2, 2, 103, 104, 7, 46, 2, 2, 104, 8, 3, 2, 2, 2, 105, 106, 7, 43, 2, 2, 106, 10, 3, 2, 2, 2, 107, 108, 7, 60, 2, 2, 108, 12, 3, 2, 2, 2, 109, 110, 7, 116, 2, 2, 110, 111, 7, 103, 2, 2, 111, 112, 7, 118, 2, 2, 112, 113, 7, 119, 2, 2, 113, 114, 7, 116, 2, 2, 114, 115, 7, 112, 2, 2, 115, 14, 3, 2, 2, 2, 116, 117, 7, 44, 2, 2, 117, 16, 3, 2, 2, 2, 118, 119, 7, 90, 2, 2, 119, 18, 3, 2, 2, 2, 120, 121, 7, 84, 2, 2, 121, 122, 7, 122, 2, 2, 122, 20, 3, 2, 2, 2, 123, 124, 7, 84, 2, 2, 124, 125, 7, 124, 2, 2, 125, 22, 3, 2, 2, 2, 126, 127, 7, 84, 2, 2, 127, 128, 7, 123, 2, 2, 128, 24, 3, 2, 2, 2, 129, 130, 7, 91, 2, 2, 130, 26, 3, 2, 2, 2, 131, 132, 7, 92, 2, 2, 132, 28, 3, 2, 2, 2, 133, 134, 7, 69, 2, 2, 134, 135, 7, 80, 2, 2, 135, 136, 7, 81, 2, 2, 136, 137, 7, 86, 2, 2, 137, 30, 3, 2, 2, 2, 138, 139, 7, 69, 2, 2, 139, 140, 7, 92, 2, 2, 140, 32, 3, 2, 2, 2, 141, 142, 7, 69, 2, 2, 142, 143, 7, 90, 2, 2, 143, 34, 3, 2, 2, 2, 144, 145, 7, 74, 2, 2, 145, 36, 3, 2, 2, 2, 146, 147, 7, 85, 2, 2, 147, 148, 7, 121, 2, 2, 148, 149, 7, 99, 2, 2, 149, 150, 7, 114, 2, 2, 150, 38, 3, 2, 2, 2, 151, 152, 7, 75, 2, 2, 152, 153, 7, 102, 2, 2, 153, 154, 7, 103, 2, 2, 154, 155, 7, 112, 2, 2, 155, 156, 7, 118, 2, 2, 156, 157, 7, 107, 2, 2, 157, 158, 7, 118, 2, 2, 158, 159, 7, 123, 2, 2, 159, 40, 3, 2, 2, 2, 160, 161, 7, 69, 2, 2, 161, 162, 7, 82, 2, 2, 162, 163, 7, 106, 2, 2, 163, 164, 7, 99, 2, 2, 164, 165, 7, 117, 2, 2, 165, 166, 7, 103, 2, 2, 166, 42, 3, 2, 2, 2, 167, 168, 7, 79, 2, 2, 168, 169, 7, 103, 2, 2, 169, 170, 7, 99, 2, 2, 170, 171, 7, 117, 2, 2, 171, 172, 7, 119, 2, 2, 172, 173, 7, 116, 2, 2, 173, 174, 7, 103, 2, 2, 174, 44, 3, 2, 2, 2, 175, 176, 7, 79, 2, 2, 176, 177, 7, 71, 2, 2, 177, 178, 7, 67, 2, 2, 178, 179, 7, 85, 2, 2, 179, 180, 7, 87, 2, 2, 180, 181, 7, 84, 2, 2, 181, 182, 7, 71, 2, 2, 182, 46, 3, 2, 2, 2, 183, 184, 7, 122, 2, 2, 184, 185, 7, 99, 2, 2, 185, 186, 7, 101, 2, 2, 186, 187, 7, 101, 2, 2, 187, 48, 3, 2, 2, 2, 188, 189, 7, 115, 2, 2, 189, 190, 7, 111, 2, 2, 190, 191, 7, 107, 2, 2, 191, 50, 3, 2, 2, 2, 192, 193, 7, 114, 2, 2, 193, 194, 7, 107, 2, 2, 194, 52, 3, 2, 2, 2, 195, 196, 7, 45, 2, 2, 196, 54, 3, 2, 2, 2, 197, 198, 7, 47, 2, 2, 198, 56, 3, 2, 2, 2, 199, 200, 7, 49, 2, 2, 200, 58, 3, 2, 2, 2, 201, 202, 7, 96, 2, 2, 202, 60, 3, 2, 2, 2, 203, 204, 7, 63, 2, 2, 204, 62, 3, 2, 2, 2, 205, 206, 7, 41, 2, 2, 206, 207, 7, 93, 2, 2, 207, 64, 3, 2, 2, 2, 208, 209, 7, 95, 2, 2, 209, 210, 7, 41, 2, 2, 210, 66, 3, 2, 2, 2, 211, 212, 7, 93, 2, 2, 212, 68, 3, 2, 2, 2, 213, 214, 7, 95, 2, 2, 214, 70, 3, 2, 2, 2, 215, 216, 7, 117, 2, 2, 216, 217, 7, 107, 2, 2, 217, 218, 7, 112, 2, 2, 218, 72, 3, 2, 2, 2, 219, 220, 7, 101, 2, 2, 220, 221, 7, 113, 2, 2, 221, 222, 7, 117, 2, 2, 222, 74, 3, 2, 2, 2, 223, 224, 7, 118, 2, 2, 224, 225, 7, 99, 2, 2, 225, 226, 7, 112, 2, 2, 226, 76, 3, 2, 2, 2, 227, 228, 7, 103, 2, 2, 228, 229, 7, 122, 2, 2, 229, 230, 7, 114, 2, 2, 230, 78, 3, 2, 2, 2, 231, 232, 7, 110, 2, 2, 232, 233, 7, 112, 2, 2, 233, 80, 3, 2, 2, 2, 234, 235, 7, 117, 2, 2, 235, 236, 7, 115, 2, 2, 236, 237, 7, 116, 2, 2, 237, 238, 7, 118, 2, 2, 238, 82, 3, 2, 2, 2, 239, 243, 7, 37, 2, 2, 240, 242, 10, 2, 2, 2, 241, 240, 3, 2, 2, 2, 242, 245, 3, 2, 2, 2, 243, 241, 3, 2, 2, 2, 243, 244, 3, 2, 2, 2, 244, 246, 3, 2, 2, 2, 245, 243, 3, 2, 2, 2, 246, 247, 5, 95, 48, 2, 247, 84, 3, 2, 2, 2, 248, 252, 9, 3, 2, 2, 249, 251, 9, 4, 2, 2, 250, 249, 3, 2, 2, 2, 251, 254, 3, 2, 2, 2, 252, 250, 3, 2, 2, 2, 252, 253, 3, 2, 2, 2, 253, 86, 3, 2, 2, 2, 254, 252, 3, 2, 2, 2, 255, 256, 5, 89, 45, 2, 256, 258, 7, 48, 2, 2, 257, 259, 5, 89, 45, 2, 258, 257, 3, 2, 2, 2, 258, 259, 3, 2, 2, 2, 259, 88, 3, 2, 2, 2, 260, 262, 4, 50, 59, 2, 261, 260, 3, 2, 2, 2, 262, 263, 3, 2, 2, 2, 263, 261, 3, 2, 2, 2, 263, 264, 3, 2, 2, 2, 264, 90, 3, 2, 2, 2, 265, 269, 7, 36, 2, 2, 266, 268, 10, 5, 2, 2, 267, 266, 3, 2, 2, 2, 268, 271, 3, 2, 2, 2, 269, 267, 3, 2, 2, 2, 269, 270, 3, 2, 2, 2, 270, 272, 3, 2, 2, 2, 271, 269, 3, 2, 2, 2, 272, 273, 7, 36, 2, 2, 273, 92, 3, 2, 2, 2, 274, 275, 9, 6, 2, 2, 275, 276, 3, 2, 2, 2, 276, 277, 8, 47, 2, 2, 277, 94, 3, 2, 2, 2, 278, 280, 7, 15, 2, 2, 279, 278, 3, 2, 2, 2, 279, 280, 3, 2, 2, 2, 280, 281, 3, 2, 2, 2, 281, 282, 7, 12, 2, 2, 282, 96, 3, 2, 2, 2, 9, 2, 243, 252, 258, 263, 269, 279, 3, 8, 2, 2]
\ No newline at end of file
......@@ -51,27 +51,27 @@ EOL=47
')'=4
':'=5
'return'=6
'X'=7
'Rx'=8
'Rz'=9
'Ry'=10
'Y'=11
'Z'=12
'CNOT'=13
'CZ'=14
'CX'=15
'H'=16
'Swap'=17
'Identity'=18
'CPhase'=19
'Measure'=20
'MEASURE'=21
'xacc'=22
'qmi'=23
'pi'=24
'+'=25
'-'=26
'*'=27
'*'=7
'X'=8
'Rx'=9
'Rz'=10
'Ry'=11
'Y'=12
'Z'=13
'CNOT'=14
'CZ'=15
'CX'=16
'H'=17
'Swap'=18
'Identity'=19
'CPhase'=20
'Measure'=21
'MEASURE'=22
'xacc'=23
'qmi'=24
'pi'=25
'+'=26
'-'=27
'/'=28
'^'=29
'='=30
......
......@@ -3,10 +3,10 @@ import numpy as np
xacc.Initialize()
qpu = xacc.getAccelerator('local-ibm') # or ibm, rigetti, etc...
qpu = xacc.getAccelerator('tnqvm') # or ibm, rigetti, etc...
buffer = qpu.createBuffer('q',2)
@xacc.qpu(accelerator=qpu)
@xacc.qpu(accelerator='tnqvm')
def foo(buffer, theta):
X(0)
Ry(theta, 1)
......@@ -15,9 +15,10 @@ def foo(buffer, theta):
# Execute the code on the QPU
foo(buffer, -3.1415936)
print(foo.nParameters())
# Check into the results
print(buffer.getExpectationValueZ())
print(buffer.getMeasurementCounts())
#print(buffer.getMeasurementCounts())
xacc.Finalize()
\ No newline at end of file
......@@ -6,7 +6,7 @@ qpu = xacc.getAccelerator('tnqvm')
qbits = qpu.createBuffer('q',4)
@xacc.qpu(accelerator=qpu) # or ibm, rigetti, etc...
def foo(buffer, t0, t1):
def foo(buffer, *args):
xacc(uccsd, n_qubits=4, n_electrons=2)
Measure(0,0)
......
......@@ -133,6 +133,7 @@ PYBIND11_MODULE(_pyxacc, m) {
.def("insertInstruction", &xacc::Function::insertInstruction, "")
.def("addInstruction", &xacc::Function::addInstruction, "")
.def("addParameter", &xacc::Function::addParameter, "")
.def("nParameters", &xacc::Function::nParameters, "")
.def("eval", &xacc::Function::operator(), "")
.def("name", &xacc::Function::name, "")
.def("description", &xacc::Function::description, "")
......
from _pyxacc import *
import os, platform, sys, sysconfig
import argparse, inspect
import os
import platform
import sys
import sysconfig
import argparse
import inspect
def parse_args(args):
parser = argparse.ArgumentParser(description="XACC Framework Utility.",
parser = argparse.ArgumentParser(description="XACC Framework Utility.",
formatter_class=argparse.ArgumentDefaultsHelpFormatter,
fromfile_prefix_chars='@')
parser.add_argument("-c", "--set-credentials", type=str, help="Set your credentials for any of the remote Accelerators.", required=False)
parser.add_argument("-k", "--api-key", type=str, help="The API key for the remote Accelerators.", required=False)
parser.add_argument("-u", "--user-id", type=str, help="The User Id for the remote Accelerators.", required=False)
parser.add_argument("--url", type=str, help="The URL for the remote Accelerators.", required=False)
parser.add_argument("-g", "--group", type=str, help="The IBM Q Group.", required=False)
parser.add_argument("--hub", type=str, help="The IBM Q Hub.", default='ibm-q-ornl', required=False)
parser.add_argument("-p", "--project", type=str, help="The IBM Q Project.", required=False)
parser.add_argument("-L", "--location", action='store_true', help="Print the path to the XACC install location.", required=False)
parser.add_argument("--python-include-dir", action='store_true', help="Print the path to the Python.h.", required=False)
parser.add_argument("-b", "--branch", default='master',type=str, help="Print the path to the XACC install location.", required=False)
opts = parser.parse_args(args)
if opts.set_credentials and not opts.api_key:
print('Error in arg input, must supply api-key if setting credentials')
sys.exit(1)
return opts
parser.add_argument("-c", "--set-credentials", type=str,
help="Set your credentials for any of the remote Accelerators.", required=False)
parser.add_argument("-k", "--api-key", type=str,
help="The API key for the remote Accelerators.", required=False)
parser.add_argument("-u", "--user-id", type=str,
help="The User Id for the remote Accelerators.", required=False)
parser.add_argument(
"--url", type=str, help="The URL for the remote Accelerators.", required=False)
parser.add_argument("-g", "--group", type=str,
help="The IBM Q Group.", required=False)
parser.add_argument("--hub", type=str, help="The IBM Q Hub.",
default='ibm-q-ornl', required=False)
parser.add_argument("-p", "--project", type=str,
help="The IBM Q Project.", required=False)
parser.add_argument("-L", "--location", action='store_true',
help="Print the path to the XACC install location.", required=False)
parser.add_argument("--python-include-dir", action='store_true',
help="Print the path to the Python.h.", required=False)
parser.add_argument("-b", "--branch", default='master', type=str,
help="Print the path to the XACC install location.", required=False)
opts = parser.parse_args(args)
if opts.set_credentials and not opts.api_key:
print('Error in arg input, must supply api-key if setting credentials')
sys.exit(1)
return opts
def initialize():
xaccHome = os.environ['HOME']+'/.xacc'
if not os.path.exists(xaccHome):
os.makedirs(xaccHome)
try:
file = open(xaccHome+'/.internal_plugins', 'r')
contents = file.read()
except IOError:
file = open(xaccHome+'/.internal_plugins', 'w')
contents = ''
file.close()
file = open(xaccHome+'/.internal_plugins', 'w')
xaccLocation = os.path.dirname(os.path.realpath(__file__))
if platform.system() == "Darwin":
libname1 = "libxacc-quantum-gate.dylib"
libname2 = "libxacc-quantum-aqc.dylib"
else:
libname1 = "libxacc-quantum-gate.so"
libname2 = "libxacc-quantum-aqc.so"
if xaccLocation+'/lib/'+libname1+'\n' not in contents:
file.write(xaccLocation+'/lib/'+libname1+'\n')
if xaccLocation+'/lib/'+libname2+'\n' not in contents:
file.write(xaccLocation+'/lib/'+libname2+'\n')
file.write(contents)
file.close()
setIsPyApi()
xaccHome = os.environ['HOME']+'/.xacc'
if not os.path.exists(xaccHome):
os.makedirs(xaccHome)
try:
file = open(xaccHome+'/.internal_plugins', 'r')
contents = file.read()
except IOError:
file = open(xaccHome+'/.internal_plugins', 'w')
contents = ''
file.close()
file = open(xaccHome+'/.internal_plugins', 'w')
xaccLocation = os.path.dirname(os.path.realpath(__file__))
if platform.system() == "Darwin":
libname1 = "libxacc-quantum-gate.dylib"
libname2 = "libxacc-quantum-aqc.dylib"
else:
libname1 = "libxacc-quantum-gate.so"
libname2 = "libxacc-quantum-aqc.so"
if xaccLocation+'/lib/'+libname1+'\n' not in contents:
file.write(xaccLocation+'/lib/'+libname1+'\n')
if xaccLocation+'/lib/'+libname2+'\n' not in contents:
file.write(xaccLocation+'/lib/'+libname2+'\n')