}
cpx_mtx_free(&tmp);
}
- else if (strcmp(instr[i].n, "sample_all") == 0)
+ else if (strcmp(instr[i].n, "born_all") == 0)
{
for (uint32_t j = 0; j < qubitCountPow2; j++)
{
printf(": %.00f%%\n", cpx_magsqr(&n) * 100);
}
}
- else if (strcmp(instr[i].n, "sample") == 0)
+ else if (strcmp(instr[i].n, "born") == 0)
{
double prob = 0;
for (uint32_t j = 0; j < qubitCountPow2; j++)
}
printf("%.00f%%\n", prob * 100.0);
}
- else if (strcmp(instr[i].n, "hiddenvar") == 0)
+ else if (strcmp(instr[i].n, "hvar") == 0)
{
HIDDEN_VARIABLE = 1;
float tmp1 = (float)instr[i].arg0;
memcpy(&tmp2, &tmp1, sizeof(uint32_t));
srand(tmp2);
}
- else if (strcmp(instr[i].n, "truerand") == 0)
+ else if (strcmp(instr[i].n, "rand") == 0)
{
HIDDEN_VARIABLE = 0;
}
strcpy(instr[instrLen].n, "printc");
instr[instrLen++].q0 = q0;
}
- else if (strcmp(lines[i], "sample") == 0 || strcmp(lines[i], "sample q") == 0)
+ else if (strcmp(lines[i], "born") == 0 || strcmp(lines[i], "born q") == 0)
{
if (qubitCount == 0xFF)
{
break;
}
instr = realloc(instr, (instrLen + 1) * sizeof(QInstr));
- strcpy(instr[instrLen].n, "sample_all");
+ strcpy(instr[instrLen].n, "born_all");
instrLen++;
}
- else if (sscanf(lines[i], "sample q[%i]", &q0) == 1)
+ else if (sscanf(lines[i], "born q[%i]", &q0) == 1)
{
if (qubitCount == 0xFF)
{
break;
}
instr = realloc(instr, (instrLen + 1) * sizeof(QInstr));
- strcpy(instr[instrLen].n, "sample");
+ strcpy(instr[instrLen].n, "born");
instr[instrLen++].q0 = q0;
}
else if (sscanf(lines[i], "reset q[%i]", &q0) == 1)
// optimizations that this instruction
// would prevent
}
- else if (sscanf(lines[i], "hiddenvar %f", &a0) == 1)
+ else if (sscanf(lines[i], "hvar %f", &a0) == 1)
{
instr = realloc(instr, (instrLen + 1) * sizeof(QInstr));
- strcpy(instr[instrLen].n, "hiddenvar");
+ strcpy(instr[instrLen].n, "hvar");
instr[instrLen++].arg0 = a0;
}
- else if (strcmp(lines[i], "truerand") == 0)
+ else if (strcmp(lines[i], "rand") == 0)
{
instr = realloc(instr, (instrLen + 1) * sizeof(QInstr));
- strcpy(instr[instrLen].n, "truerand");
+ strcpy(instr[instrLen].n, "rand");
instrLen++;
}
- else if (strcmp(lines[i], "fullsample") == 0)
+ else if (strcmp(lines[i], "sample") == 0)
{
if (i != linesLen - 1)
{
- fprintf(stderr, "QAnsel: fullsample should be used at the end of the program.");
+ fprintf(stderr, "QAnsel: Sampling should be performed at the end of the program.");
errFound = 1;
break;
}
if (bitCount == 0xFF)
{
- fprintf(stderr, "QAnsel: fullsample cannot be used without initializing classical bits.");
+ fprintf(stderr, "QAnsel: Sampling cannot be used without initializing classical bits.");
errFound = 1;
break;
}