---
title: InstructionDurationCheck (latest version)
description: API reference for qiskit.transpiler.passes.InstructionDurationCheck in the latest version of qiskit
source: https://eu-de.quantum.cloud.ibm.com/docs/en/api/qiskit/qiskit.transpiler.passes.InstructionDurationCheck
---

# InstructionDurationCheck

*class* `qiskit.transpiler.passes.InstructionDurationCheck(*args, **kwargs)`

[GitHub](https://github.com/Qiskit/qiskit/tree/stable/2.5/qiskit/transpiler/passes/scheduling/alignments/check_durations.py#L20-L61)

Bases: [`AnalysisPass`](/docs/api/qiskit/qiskit.transpiler.AnalysisPass "qiskit.transpiler.basepasses.AnalysisPass")

Duration validation pass for reschedule.

This pass investigates the input quantum circuit and checks if the circuit requires rescheduling for execution. Note that this pass can be triggered without scheduling. This pass only checks the duration of delay instructions, which report duration values without pre-scheduling.

This pass assumes backend supported instructions, i.e. basis gates, have no violation of the hardware alignment constraints, which is true in general.

Create new duration validation pass.

The alignment values depend on the control electronics of your quantum processor.

**Parameters**

- **acquire\_alignment** – Integer number representing the minimum time resolution to trigger acquisition instruction in units of `dt`.
- **pulse\_alignment** – Integer number representing the minimum time resolution to trigger gate instruction in units of `dt`.
- **target** – The [`Target`](/docs/api/qiskit/qiskit.transpiler.Target "qiskit.transpiler.Target") representing the target backend, if `target` is specified then this argument will take precedence and `acquire_alignment` and `pulse_alignment` will be ignored.

## Attributes

### is\_analysis\_pass

Check if the pass is an analysis pass.

If the pass is an AnalysisPass, that means that the pass can analyze the DAG and write the results of that analysis in the property set. Modifications on the DAG are not allowed by this kind of pass.

### is\_transformation\_pass

Check if the pass is a transformation pass.

If the pass is a TransformationPass, that means that the pass can manipulate the DAG, but cannot modify the property set (but it can be read).

## Methods

### execute

`execute(passmanager_ir, state, callback=None)`

[GitHub](https://github.com/Qiskit/qiskit/tree/stable/2.5/qiskit/passmanager/base_tasks.py#L76-L122)

Execute optimization task for input Qiskit IR.

**Parameters**

- **passmanager\_ir** (*IR*) – Qiskit IR to optimize.
- **state** ([*PassManagerState*](/docs/api/qiskit/qiskit.passmanager.PassManagerState "qiskit.passmanager.compilation_status.PassManagerState")) – State associated with workflow execution by the pass manager itself.
- **callback** ([*Callable*](https://docs.python.org/3/library/collections.abc.html#collections.abc.Callable)*\[\[*[*Task*](/docs/api/qiskit/qiskit.passmanager.Task "qiskit.passmanager.base_tasks.Task")*, IR\_OUT,* [*PropertySet*](/docs/api/qiskit/qiskit.passmanager.PropertySet "qiskit.passmanager.compilation_status.PropertySet")*,* [*float*](https://docs.python.org/3/library/functions.html#float)*,* [*int*](https://docs.python.org/3/library/functions.html#int)*], None] | None*) – A callback function which is called per execution of optimization task.

**Returns**

Optimized Qiskit IR and state of the workflow.

**Return type**

[tuple](https://docs.python.org/3/library/stdtypes.html#tuple)\[*IR\_OUT*, [*PassManagerState*](/docs/api/qiskit/qiskit.passmanager.PassManagerState "qiskit.passmanager.compilation_status.PassManagerState")]

### name

`name()`

[GitHub](https://github.com/Qiskit/qiskit/tree/stable/2.5/qiskit/passmanager/base_tasks.py#L72-L74)

Name of the pass.

**Return type**

[str](https://docs.python.org/3/library/stdtypes.html#str)

### run

`run(dag)`

[GitHub](https://github.com/Qiskit/qiskit/tree/stable/2.5/qiskit/transpiler/passes/scheduling/alignments/check_durations.py#L53-L61)

Run duration validation passes.

**Parameters**

**dag** ([*DAGCircuit*](/docs/api/qiskit/qiskit.dagcircuit.DAGCircuit "qiskit._accelerate.circuit.DAGCircuit")) – DAG circuit to check instruction durations.

### update\_status

`update_status(state, run_state)`

[GitHub](https://github.com/Qiskit/qiskit/tree/stable/2.5/qiskit/passmanager/base_tasks.py#L124-L142)

Update workflow status.

**Parameters**

- **state** ([*PassManagerState*](/docs/api/qiskit/qiskit.passmanager.PassManagerState "qiskit.passmanager.compilation_status.PassManagerState")) – Pass manager state to update.
- **run\_state** (*RunState*) – Completion status of current task.

**Returns**

Updated pass manager state.

**Return type**

[*PassManagerState*](/docs/api/qiskit/qiskit.passmanager.PassManagerState "qiskit.passmanager.compilation_status.PassManagerState")
