Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
dcmckayibm committed Sep 28, 2024
1 parent 48d1adf commit 0098ea1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
4 changes: 2 additions & 2 deletions qiskit_experiments/test/mock_iq_helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -602,8 +602,8 @@ def compute_probabilities(self, circuits: List[QuantumCircuit]) -> List[Dict[str
probability_output_dict = {}
delay = None
for instruction in circuit.data:
if instruction[0].name == "delay":
delay = instruction[0].duration
if instruction.operation.name == "delay":
delay = instruction.operation.duration

if delay is None:
probability_output_dict = {"1": 1, "0": 0}
Expand Down
3 changes: 2 additions & 1 deletion test/library/characterization/test_zz_ramsey.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,8 @@ def compute_probabilities(self, circuits: List[QuantumCircuit]) -> List[Dict[str
freq = (-1 * self.zz_freq) / 2
else:
freq = self.zz_freq / 2
rz, _, _ = next(i for i in circuit.data if i.operation.name == "u1")
circdata = next(i for i in circuit.data if i.operation.name == "u1")
rz = circdata.operation
phase = float(rz.params[0])

prob1 = 0.5 - 0.5 * np.cos(2 * np.pi * freq * delay + phase)
Expand Down

0 comments on commit 0098ea1

Please sign in to comment.