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
The class InstructionDurations in qiskit.transpiler.instruction_durations.py is agnostic to parameter values. This poses problems for gates that have a parameter-dependent duration.
Details
Instruction durations are created using e.g. the following code:
Here, for each tuple, the first argument is the name of the instruction, the second argument is the qubits it applies to, and the third argument is the duration. The problem with this structure is that it does not have the parameters of the instructions. This is fine for basis gates like ["x", "h", "cx"] and even rz(theta) since it does not have a duration. However, this is not sufficient for cases such as rzx(theta) in which the same instruction on the same pair of qubits can have a different duration depending on the parameter theta.
Proposed solution
We can add an additional entry to the tuples in InstructionDurations that corresponds to the parameters of the instruction. E.g. (inst_name, qubits, params, duration). This will also better reflect the information of the QuantumCircuit.calibrations variable which contains the schedule for a given instruction, qubits, and parameter values of the instruction.
The text was updated successfully, but these errors were encountered:
What is the expected enhancement?
Summary
The class
InstructionDurations
inqiskit.transpiler.instruction_durations.py
is agnostic to parameter values. This poses problems for gates that have a parameter-dependent duration.Details
Instruction durations are created using e.g. the following code:
Here, for each tuple, the first argument is the name of the instruction, the second argument is the qubits it applies to, and the third argument is the duration. The problem with this structure is that it does not have the parameters of the instructions. This is fine for basis gates like
["x", "h", "cx"]
and evenrz(theta)
since it does not have a duration. However, this is not sufficient for cases such asrzx(theta)
in which the same instruction on the same pair of qubits can have a different duration depending on the parametertheta
.Proposed solution
We can add an additional entry to the tuples in
InstructionDurations
that corresponds to the parameters of the instruction. E.g.(inst_name, qubits, params, duration)
. This will also better reflect the information of theQuantumCircuit.calibrations
variable which contains the schedule for a given instruction, qubits, and parameter values of the instruction.The text was updated successfully, but these errors were encountered: