Use unitary equivalence instead of circuit equality in noise tests#1446
Conversation
jakelishman
left a comment
There was a problem hiding this comment.
This seems right for the immediate test, but the change in Terra was because of a misalignment of expectations around IGate - for historical IBM Q reasons, IGate represents a delay rather than an identity, so it was wrong for opflow to emit them.
I'm slightly concerned in Aer that the whole QuantumError noise model seems to want IGates as input, and depolarising_error emits IGate. I suppose in the context of creating noise models, it's possibly ok?
Here's the docstring about it:
https://github.com/Qiskit/qiskit-terra/blob/226f4646140bd26e0ea70fdfd018a8fd7f156fa8/qiskit/circuit/library/standard_gates/i.py#L20-L24
|
We can confirm with @itoko on this but I think that makes sense in this context, at least while the |
|
I believe that, in this case, we can just compare unitary matrices of target and expected circuits, which can include |
50ba2b5 to
f64b63b
Compare
Co-authored-by: Matthew Treinish <mtreinish@kortar.org>
…iskit#1446) * Use unitary equivalence instead of circuit equality in noise tests Recent qiskit-terra reduces I gates and some tests of Aer failed in equality checks of QuantumCircuit injected as noise. This PR change a way of equality check from object equality to unitary equivalence of QuantumCircuit. Co-authored-by: Matthew Treinish <mtreinish@kortar.org> Co-authored-by: Hiroshi Horii <horii@jp.ibm.com>
…iskit#1446) * Use unitary equivalence instead of circuit equality in noise tests Recent qiskit-terra reduces I gates and some tests of Aer failed in equality checks of QuantumCircuit injected as noise. This PR change a way of equality check from object equality to unitary equivalence of QuantumCircuit. Co-authored-by: Matthew Treinish <mtreinish@kortar.org> Co-authored-by: Hiroshi Horii <horii@jp.ibm.com>
…iskit#1446) * Use unitary equivalence instead of circuit equality in noise tests Recent qiskit-terra reduces I gates and some tests of Aer failed in equality checks of QuantumCircuit injected as noise. This PR change a way of equality check from object equality to unitary equivalence of QuantumCircuit. Co-authored-by: Matthew Treinish <mtreinish@kortar.org> Co-authored-by: Hiroshi Horii <horii@jp.ibm.com>
In the recently released terra 0.20.0 release the minimum python packaging spec supported is manylinux2014 now. On the main branch we bumped the manylinux base image we use for wheel jobs to manylinux2014 in #1498. However, on the stable 0.10.x branch we don't want to do that since we probably should not drop support for older environments on a stable release. This commit updates the wheel job config to instead install terra from a compatible binary wheel instead of using the latest release. This should hopefully avoid the CI failure but still enable us to run without building terra from source or dropping support for manylinux2010. * Use unitary equivalence instead of circuit equality in noise tests (#1446) Co-authored-by: Hiroshi Horii <horii@jp.ibm.com>
In the recently released terra 0.20.0 release the minimum python packaging spec supported is manylinux2014 now. On the main branch we bumped the manylinux base image we use for wheel jobs to manylinux2014 in Qiskit#1498. However, on the stable 0.10.x branch we don't want to do that since we probably should not drop support for older environments on a stable release. This commit updates the wheel job config to instead install terra from a compatible binary wheel instead of using the latest release. This should hopefully avoid the CI failure but still enable us to run without building terra from source or dropping support for manylinux2010. * Use unitary equivalence instead of circuit equality in noise tests (Qiskit#1446) Co-authored-by: Hiroshi Horii <horii@jp.ibm.com>
Summary
I deleted I gate from the test to reflect this commit.
Details and comments