Skip to content

Commit

Permalink
Remove reset from beginning of tomography experiments (backport #1250) (
Browse files Browse the repository at this point in the history
#1258)

This is an automatic backport of pull request #1250 done by
[Mergify](https://mergify.com).


---


<details>
<summary>Mergify commands and options</summary>

<br />

More conditions and actions can be found in the
[documentation](https://docs.mergify.com/).

You can also trigger Mergify actions by commenting on this pull request:

- `@Mergifyio refresh` will re-evaluate the rules
- `@Mergifyio rebase` will rebase this PR on its base branch
- `@Mergifyio update` will merge the base branch into this PR
- `@Mergifyio backport <destination>` will backport this PR on
`<destination>` branch

Additionally, on Mergify [dashboard](https://dashboard.mergify.com) you
can:

- look at your merge queues
- generate the Mergify configuration with the config editor.

Finally, you can contact us on https://mergify.com
</details>

Co-authored-by: Will Shanks <willshanks@us.ibm.com>
  • Loading branch information
mergify[bot] and wshanks authored Aug 28, 2023
1 parent f76b889 commit 8b06749
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,6 @@ def circuits(self):
if prep_element:
# Add tomography preparation
prep_circ = self._prep_circ_basis.circuit(prep_element, self._prep_physical_qubits)
circ.reset(self._prep_indices)
circ.compose(prep_circ, self._prep_indices, inplace=True)
circ.barrier(*self._prep_indices)

Expand Down
8 changes: 8 additions & 0 deletions releasenotes/notes/remove-tomo-reset-3f21ec4d0dacba91.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
other:
- |
Removed the reset instruction from the beginning of tomography experiments.
Since qubits are usually reset between circuits, this change should have no
impact on tomography experiments, but it should allow backends that do not
provide a reset instruction to run tomography experiments. `#1250
<https://github.com/Qiskit-Extensions/qiskit-experiments/issues/881>`
4 changes: 2 additions & 2 deletions test/library/tomography/test_process_tomography.py
Original file line number Diff line number Diff line change
Expand Up @@ -576,7 +576,7 @@ def test_qpt_conditional_circuit(self, circuit_clbits):
fid = qi.process_fidelity(state.value, targets[idx], require_tp=False)
self.assertGreater(
fid,
0.95,
0.935,
msg=f"{fitter} fidelity {fid} is low for conditional outcome {idx}",
)

Expand Down Expand Up @@ -607,7 +607,7 @@ def test_qpt_conditional_meas(self):
prob = state.extra["conditional_probability"]
prob_target = 0.5
self.assertTrue(
np.isclose(prob, prob_target, atol=1e-2),
np.isclose(prob, prob_target, atol=2e-2),
msg=(
f"fitter {fitter} probability incorrect for conditional"
f" measurement {idx} {outcome} ({prob} != {prob_target})"
Expand Down

0 comments on commit 8b06749

Please sign in to comment.