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
In recent hardware there are backends that support gates where there are continuous. Two examples of this are the RZZ gate on IBM heron processors which support an angle of 0 to pi but anything outside of that isn't supported on the QPU. The ibm provider applies this bound as a custom scheduling stage that translates the gates if the angle is outside the bounds. Similarly aqt hardware implements an R gate where R(θ, φ) has the bounds θ ∈ [0, π] and φ ∈ [0, 2π]. Aqt works around this by adding rx as their target gate and then has a post processing step to convert the rx gate to r within the bounds.
Right now the target can represent a discrete angle by setting a float value to a parameter for a gate, and a continuous angle without any constraints by setting a Parameter value for a gate. We should expand this model to outline there are additional constraints on the parameter of a supported instruction. For example, having a way to express that this instruction only supports float angles between 0 and pi, no parameterized gates, and no angle values outside of that.
However, to fully support this path though we will need to have a transpiler mechanism/pass to conform to this constraint. Simply identifying
whether a gate is outside of the constraints isn't sufficient, as we'll need the transpiler to be able to translate a gate with a parameter outside the parameter bounds to something that is in the bounds. I'm not sure we can do this generally for all gates including custom definitions, but at least having a documented mechanism and one that works for standard gates should be sufficient.
The text was updated successfully, but these errors were encountered:
What should we add?
In recent hardware there are backends that support gates where there are continuous. Two examples of this are the RZZ gate on IBM heron processors which support an angle of 0 to pi but anything outside of that isn't supported on the QPU. The ibm provider applies this bound as a custom scheduling stage that translates the gates if the angle is outside the bounds. Similarly aqt hardware implements an R gate where
R(θ, φ)
has the bounds θ ∈ [0, π] and φ ∈ [0, 2π]. Aqt works around this by adding rx as their target gate and then has a post processing step to convert the rx gate to r within the bounds.Right now the target can represent a discrete angle by setting a float value to a parameter for a gate, and a continuous angle without any constraints by setting a
Parameter
value for a gate. We should expand this model to outline there are additional constraints on the parameter of a supported instruction. For example, having a way to express that this instruction only supports float angles between 0 and pi, no parameterized gates, and no angle values outside of that.However, to fully support this path though we will need to have a transpiler mechanism/pass to conform to this constraint. Simply identifying
whether a gate is outside of the constraints isn't sufficient, as we'll need the transpiler to be able to translate a gate with a parameter outside the parameter bounds to something that is in the bounds. I'm not sure we can do this generally for all gates including custom definitions, but at least having a documented mechanism and one that works for standard gates should be sufficient.
The text was updated successfully, but these errors were encountered: