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
We have noticed an issue in transpiling a circuit with the gate rxx with optimization_level = 0.
By using an argument theta outside the range [0,pi), the rxx gate is transpiled to rxx-wrapped, which is not in the basis gate set.
The problem could be overcome by using optimization_level > 0, but it shouldnt happen on the optimization_level =0 case.
Steps to reproduce the problem
from qiskit import QuantumCircuit, transpile
from qiskit_aqt_provider import AQTProvider
from qiskit_aqt_provider.primitives import AQTSampler
provider = AQTProvider("ACCESS_TOKEN")
backend = provider.get_backend("offline_simulator_no_noise")
circuit = QuantumCircuit(2)
circuit.rxx(-0.1, 0 ,1) ##the first argument is theta (we set it as negative to show the issue)
circuit_t = transpile(circuit, backend, optimization_level=0)
circuit_t.draw()
This code results with the wrapped-RXX gate. When attempting to run the circuit with said gate, the run results with an error:
Informations
What is the current behavior?
We have noticed an issue in transpiling a circuit with the gate rxx with optimization_level = 0.
By using an argument theta outside the range [0,pi), the rxx gate is transpiled to rxx-wrapped, which is not in the basis gate set.
The problem could be overcome by using optimization_level > 0, but it shouldnt happen on the optimization_level =0 case.
Steps to reproduce the problem
This code results with the wrapped-RXX gate. When attempting to run the circuit with said gate, the run results with an error:
" ValueError: Operation 'Rxx-warpped(-0.1)' npt om tje nasos gate set: {rz, r, rxxx}"
What is the expected behavior?
With this basic script, the transpilation should've result in a circuit with gates which are in the basis gate set.
Suggested solutions
The text was updated successfully, but these errors were encountered: