-
Notifications
You must be signed in to change notification settings - Fork 376
Setting is_measurement for converted state functions and backend arg required to CircuitSampler #1344
Conversation
merge qiskit-aqua to my fork
2) setting is_measurement for converted state functions 3) new test case in TestStateOpMeasEvals
self.assertListEqual(sampler.eval(), | ||
[[1.0, 0.6987712429686843], [0.7064159097160821, 1.0]]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Comparing to plain numbers is never a good idea 😉 Could you change this to just test if the first operand is still a measurement after going through the circuit sampler? Otherwise LGTM.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But other tests in the module compare .eval()
result to plain numbers.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Cryoris I changed the unit test in the way you suggested. Thanks for review.
releasenotes/notes/fix-is-measurements-in-circuit-sampler-18679ad9bfe3f9cb.yaml
Outdated
Show resolved
Hide resolved
…9ad9bfe3f9cb.yaml
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great, thanks for the fix!
…required to CircuitSampler (qiskit-community/qiskit-aqua#1344) * 1) backend arg required to CircuitSampler 2) setting is_measurement for converted state functions 3) new test case in TestStateOpMeasEvals * test if is_measurement correctly propagated in CircuitSampler * test_is_measurement_correctly_propagated simplified * release note added Co-authored-by: Steve Wood <40241007+woodsp-ibm@users.noreply.github.com> Co-authored-by: Julien Gacon <gaconju@gmail.com>
…required to CircuitSampler (qiskit-community/qiskit-aqua#1344) * 1) backend arg required to CircuitSampler 2) setting is_measurement for converted state functions 3) new test case in TestStateOpMeasEvals * test if is_measurement correctly propagated in CircuitSampler * test_is_measurement_correctly_propagated simplified * release note added Co-authored-by: Steve Wood <40241007+woodsp-ibm@users.noreply.github.com> Co-authored-by: Julien Gacon <gaconju@gmail.com>
…required to CircuitSampler (qiskit-community/qiskit-aqua#1344) * 1) backend arg required to CircuitSampler 2) setting is_measurement for converted state functions 3) new test case in TestStateOpMeasEvals * test if is_measurement correctly propagated in CircuitSampler * test_is_measurement_correctly_propagated simplified * release note added Co-authored-by: Steve Wood <40241007+woodsp-ibm@users.noreply.github.com> Co-authored-by: Julien Gacon <gaconju@gmail.com>
Summary
resolves #1338
resolves #1339
Details and comments