Closed amccaskey closed 3 years ago
a quick hack to get this working would be adding an identity gate
auto ir = compiler->compile(R"(__qpu__ void f(qbit q) { X(q[0]); I(q[1]); })", nullptr);
I think this is a bug, it should do
auto tmp_buffer = qalloc(target_operator->nBits());
oh cool. I'll update with my next commit.
Take the following test of QITE
This is a 2 qubit problem, but at first PartialTomoObjFuncEval will be evaluating with the state preparation circuit which is on 1 qubit, and it tries to qalloc() with statePrep->nPhysicalBits(). This causes an error in the backend qpp accelerator due to mismatched n-qubits in the provided buffer vs the composite instruction being executed.
Maybe we need to update evaluate() to also take the number of qubits.