1

I have a quantum circuit for the Markovian Reservoir Engineering[MRE] Model, written in cirq (frontend) and trying to run it on Ionq hardware, using qbraid credits. This is all being done on qbraid workspace. We did test run a simple quantum circuit with Qiskit as frontend, we did not get any issues.

In MRE, we have to run for three different pumps [XX, ZZ, and ZZXX], each of them for 256 shots and we have to do for each of the four initial states - 00, 01, 10, 11 and each case for five different probabilities. Since we have credits on two different qbraid accounts, what we are doing is that on one account, we are running several pumps for a particular initial state for all five different probability inputs, and the remaining batches on another account.

Below is the error I am getting.

ValidationException: An error occurred (ValidationException) when calling the CreateQuantumTask operation (reached max retries: 4): Device requires all qubits in the program to be measured. This may be caused by declaring non-contiguous qubits or measuring partial qubits

Also, we tried to resolve this by measuring all the qubits and also initializing sys and ancilla qubits as subarrays [such as all qubits from 0 to 5 are for sys and the remaining for ancilla qubits], however, it still does give us the same error.

Any suggestion would be appreciated.

ryanhill1
  • 2,623
  • 1
  • 11
  • 39

1 Answers1

3

I believe we connected over Discord, but reposting my answer here for anyone else that might run into a similar issue:

This was a bug in the qbraid.transpiler.cirq_braket conversions module. It was caused by a failure to convert the cirq.ops.MeasurementGate to an equivalent Amazon Braket gate (since one doesn't exist). The qBraid transpiler was not properly accounting for this, so had a bug that actually dropped the entire quantum register where the measurement gate would-have been applied. This impacted the output circuit qubit indexing, and thus caused the non-contiguous qubits error you got above.

As you mentioned, the quick fix was simply removing the measurement gate from your cirq $\rightarrow$ braket conversion. But since then, this issue has been resolved with PR #192 and published with Release 0.4.0. So updating to the latest version should fix it!

ryanhill1
  • 2,623
  • 1
  • 11
  • 39