-
Notifications
You must be signed in to change notification settings - Fork 159
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Sampler fails to run FidelityKernel even if circuits are transpiled #1519
Comments
Hi @repettovaleria thanks for your detailed description of the issue. As you already noted, the root cause of your failure is in the |
Hi @ElePT I noticed that the very same happens with circuits containing a reset operation. I attached the Qasm2.0 definitions for both circuits which only differ in one having a reset operation. The circuit was transpiled using |
The |
Issue transfered to qiskit-community/qiskit-algorithms#165 |
Describe the bug
I'm trying to run a quantum kernel using the ComputeUncompute class on a quantum system. I'm submitting a transpiled circuit however it fails raising the following issue on the IBM-quantum platform dashboard
Failed - Circuits do not match the target definition (non-ISA circuits). -- \n Transpile your circuits for the target before submitting a primitive query. For\n example, you can use the following code block given an IBMBackend object backend \n and circuits of type List[QuantumCircuit]:\n from qiskit.transpiler.preset_passmanagers import generate_preset_pass_manager\n pm = generate_preset_pass_manager(optimization_level=1, target=backend.target)\n isa_circuits = pm.run(circuits)\n Then pass isa_circuits to the Sampler or Estimator.\n -- https://ibm.biz/error_codes#1517
and the following error on the terminal:
This is happening only on real systems, whereas when run on simulator the code works fine.
Steps to reproduce
Here is the testing code I have run:
Expected behavior
I expect the circuit to be able to run on the system without any problems since I'm transpiling it before submitting the job. This problem never occurred before when running other FidelityQuantumKernel(that employ the ComputeUncompute) instances before without any problems regarding the circuit, and this issue raised only after the qiskit-runtime-primitives-update
Suggested solutions
Is this possibly due to the ComputeUncompute construct the circuit by appending two circuits that are already transpiled wheras it might be more "proper" to constract the full circuit and then transpile it.
Additional Information
This issue first raised when I was using running aFidelityQuantumKernel that run the circuit through the ComputeUncompute class so to get to root of the problem I run the test I reported here using directly that.
The same code runs without error on a simulator
The text was updated successfully, but these errors were encountered: