Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make cost() not take "batched" as an argument #13

Closed
mariaschuld opened this issue Aug 29, 2018 · 4 comments
Closed

Make cost() not take "batched" as an argument #13

mariaschuld opened this issue Aug 29, 2018 · 4 comments
Assignees

Comments

@mariaschuld
Copy link
Contributor

I'm not sure whose level of influence this is (Ville? Josh?) but at the new_user_interface branch cost() requires the second argument "batched". Can we remove that easily?

This is related to the optimizer question, so we could also rewrite it in one go.

@josh146
Copy link
Member

josh146 commented Aug 29, 2018

This behaviour comes from the master branch, so @smite would be better placed to answer. From what I recall, the current Optimizer class requires an argument slot for batched.

@co9olguy
Copy link
Member

Let's keep in mind that this issue will likely become irrelevant as we deal with #12

@smite
Copy link
Contributor

smite commented Aug 29, 2018

The optimization interface will change, there are may ways to handle the batching. We can certainly remove the second argument.

@mariaschuld
Copy link
Contributor Author

Cool. Closing it.

AlbertMitjans added a commit that referenced this issue Dec 6, 2022
* Add classical shadow logic to the MP class

* Small fix

* Fix tests

* Fix tests

* Fix tests

* Fix tests

* Fix tests

* Fix tests

* Fix tests

* Add test

* Add wire_order to process_samples

* Docstring

* Add wire_order to process_samples

* Small fix

* Small fix

* Add wire_order to process_samples

* Add wire_order to process_samples

* Change tests

* Add wire_order to process_samples

* Add breaking change message

* Change tests

* Change tests

* Add wire_order to process_samples

* Change tests

* Fix tests

* Fix tests

* Add wire_order to process_samples

* Change tests

* Coverage

* Coverage

* Fix tests

* Small fix

* Small fix

* Add tests

* Revert

* Add tests

* Add tests

* Remove duplicated test

* Add tests

* Revert

* Small changes

* Fix tests

* black

* Change name

* Add comment

* Fix

* Fix test

* Fix test

* Improve code

* Add CustomMeasurement

* Small fix

* Small fix

* Small fix

* test (ClassicalShadow): 🧪 Test ClassicalShadow.process method

* Add changelog entry

* test (ClassicalShadow): 🧪 Fix mocker.spy

* revert (ClassicalShadow): ⏪ Remove process_state.

* Revert

* feat: ✨ Add _ShadowExpval class.

* Fix tests

* Fix test

* Fix

* Fix docs

* Fix docs

* Fix types

* Fix types

* Fix docstrings

* fix test

* Add changelog entry

* Remove docs

* Remove docs

* Fix docstrings

* Small change

* Remove return_type

* Fix

* Fix

* Fix

* fix

* fix

* Remove return_type

* fix

* Fix tests

* Remove mocker

* Add tests

* Fix tests

* Coverage

* Update doc/releases/changelog-dev.md

* Revert merge

* Change statistics signature

* Revert tests

* Revert

* Copy hamiltonian

* Use seed

* Change docstrings

* Change instance check.

* Fix

* Fix

* Remove dead code

* Fix tests

* Fix tests

* Add deprecation warning

* Fix docstring

* Add changelog entry

* Fix docstring

* Add type

* Remove type

* Deprecate observables

* Add changelog entry

* Change warning type

* Change warning type

* Revert

* Add changelog entry

* Refactor MP

* Refactor MP

* Coverage

* Add support for custom measurements

* Add changelog entry

* Add measurement's method_name attribute

* Fix

* Fix

* Small fix

* Make return_type None by default

* Add tests

* Add tests

* Coverage

* Add support for new return types

* Update tests/measurements/test_counts.py

* Remove unused imports

* Add import

* Move import

* Update tests/measurements/test_measurements.py

* Move ABC inheritannce

* Update tests/measurements/test_vn_entropy.py

Co-authored-by: Edward Jiang <34989448+eddddddy@users.noreply.github.com>

* Call _shape_new

* refactor (State): Raise error later in shape method.

* refactor (State): Raise error later in shape method.

* test: 🧪 Change skip message

* move ABC

* Move import

* Add TODO comment.

* refactor (QubitDevice): ♻️ Move code into private function.

* Improve deprecation cycle

* Change 'tape' to 'qscript'. Add tests for overriden measurement process

* Add docstring

* Change 'CustomMeasurement' to 'MeasurementTransform'

* Improve tests

* Fix

* Coverage

* Improve docstring

* Improve docstring

* Fix

* Add changelog entry

* Revert

* Add shadow expval

* Add comment

* Fix docstring

* Fix docstring

Co-authored-by: Edward Jiang <34989448+eddddddy@users.noreply.github.com>
rmoyard added a commit that referenced this issue Dec 8, 2022
* First draft

* Working pytreeify

* Fix doc

* Add np.ndarray cond

* QNode test

* Add more tests and GPU

* Add more tests

* More tests

* Add private functions

* Convert missing

* review

* review

* Apply suggestions from code review

Co-authored-by: antalszava <antalszava@gmail.com>

* Remove gpu tests

* Review

* Empty jac

* Empty vjps

* Doc

* Trigger CI

* Changelog and doc

* Trigger CI

* Trigger CI

* Update from review

* Apply suggestions from code review

Co-authored-by: antalszava <antalszava@gmail.com>

* introo sentence

* Trigger CI

* Trigger CI

* own runner

* Trigger CI

* Trigger CI

* Update torch tests

* update tests

* typo

* tape to queue

* typos

* torch cuda

* jnp

Co-authored-by: antalszava <antalszava@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants