You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am using the AI transpiler on the QAOA Ansatz and trying to run it on ibm_kyiv and I am getting this error "'The instruction u3 on qubits (34,) is not supported by the target system. Circuits that do not match the target hardware definition are no longer supported after March 4, 2024. See the transpilation documentation (https://docs.quantum.ibm.com/guides/transpile) for instructions to transform circuits and the primitive examples (https://docs.quantum.ibm.com/guides/primitives-examples) to see this coupled with operator transformations.'"
Here is the relevant code:
ansatz = QAOAAnsatz(hamiltonian,reps).decompose().decompose().decompose()
ai_passmanager = PassManager([
AIRouting(backend=backend, optimization_level=3, layout_mode="optimize", local_mode=True)
])
ansatz_isa = ai_passmanager.run(ansatz)
with Session(backend=backend) as session:
# If using qiskit-ibm-runtime<0.24.0, change `mode=` to `session=`
num_shots = 10000 * (2**hamiltonian.num_qubits)
estimator = Estimator(mode=session)
estimator.options.default_shots = num_shots
# Set simple error suppression/mitigation options
estimator.options.dynamical_decoupling.enable = True
estimator.options.dynamical_decoupling.sequence_type = "XY4"
estimator.options.twirling.enable_gates = True
estimator.options.twirling.num_randomizations = "auto"
optimizer_results = optimize(estimator, ansatz_isa, hamiltonian)
The text was updated successfully, but these errors were encountered:
Hi @RedWyrm13 !
In your code you are only applying the routing pass to the circuit. In order to run the circuit in the real backend there are some other extra passes that needs to be present.
I think the easiest way would be to generate a preset manager and then add the ai_routing pass at the appropriate step:
I think that should work. Let us know if you find other issues.
Also you can use the generate_ai_passmanager function that would create a pass manager with ai_routing plus some other passes to improve the results depending on your input options (as well as all qiskit passes needed to run the circuit in the real hardware):
I am using the AI transpiler on the QAOA Ansatz and trying to run it on ibm_kyiv and I am getting this error "'The instruction u3 on qubits (34,) is not supported by the target system. Circuits that do not match the target hardware definition are no longer supported after March 4, 2024. See the transpilation documentation (https://docs.quantum.ibm.com/guides/transpile) for instructions to transform circuits and the primitive examples (https://docs.quantum.ibm.com/guides/primitives-examples) to see this coupled with operator transformations.'"
Here is the relevant code:
The text was updated successfully, but these errors were encountered: