-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Closed
Labels
bugSomething isn't workingSomething isn't workingmod: transpilerIssues and PRs related to TranspilerIssues and PRs related to Transpiler
Milestone
Description
Environment
- Qiskit version: 1.2.4
- Python version: 3.12
- Operating system: Windows
What is happening?
Running the ALAPScheduleAnalysis
pass directly on a circuit fails. Running it via a passmanager works.
How can we reproduce the issue?
A minimal example
import numpy as np
from qiskit.circuit import QuantumCircuit
from qiskit.transpiler import PassManager, InstructionDurations
from qiskit.transpiler.passes import ALAPScheduleAnalysis
durations = InstructionDurations( [("reset", None, 10),
("cz", None, 120), ("cx", None, 120), ("crx", None, 160),
("rx", None, 80), ('ry', None, 80), ('rz', None, 0), ("measure", None, 30_000)]
)
circ = QuantumCircuit(2)
circ.rx(np.pi/2, 0)
circ.rz(-np.pi/2, 0)
pm = PassManager([ALAPScheduleAnalysis(durations)])
circ = pm.run(circ) # works
circ = QuantumCircuit(2)
circ.rx(np.pi/2, 0)
circ.rz(-np.pi/2, 0)
p=ALAPScheduleAnalysis(durations)
p(circ) # fails
What should happen?
Usually a qiskit pass can be applied directly to a quantum circuit, so it seems reasonable to expect the same from schedule passes.
Any suggestions?
No response
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingmod: transpilerIssues and PRs related to TranspilerIssues and PRs related to Transpiler