Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Create projectors in any basis (#4192)
* First version of StateVectorProjector * Outer product fix * Support projector in default qubit * change inheritance * consistent diagonalizing gates * Update docstring * Proper bra-ket in label * Tests for StateVectorProjector * fix tests * Projector prototype * Explicit signature and pow method * discard hacky prototype * New hack (thanks Tymmy <3) * Exception tests * Docstring for __new__ * Label method adds matrix to cache * tests for label method * Update docstrings * Update changelog * enhanced docstring for label method * `Projector.__new__` docstring rephrased * Fix docstring Co-authored-by: Matthew Silverman <matthews@xanadu.ai> * Remove boolean kwarg * Remove `basis_representation` from changelog * Fix wire length issue * Update Projector example in docstring Co-authored-by: Matthew Silverman <matthews@xanadu.ai> * Update changelog description Co-authored-by: Tom Bromley <49409390+trbromley@users.noreply.github.com> * Update projector description Co-authored-by: Tom Bromley <49409390+trbromley@users.noreply.github.com> * change argument names to be `state` * Remove shape indication in docstring Co-authored-by: Tom Bromley <49409390+trbromley@users.noreply.github.com> * fix expval with state vector projector * Code example and remove hidden class docstring * minor docstring corrections * add expval test (it was failing) * projector bind new parameters dispatcher * Update error string Co-authored-by: Matthew Silverman <matthews@xanadu.ai> * fix projector and qubit device * extensive projector testing * remove outdated test * fix tests typo * Additional indications on input shape Co-authored-by: Mudit Pandey <mudit.pandey@xanadu.ai> * revision feedback * update copy --------- Co-authored-by: = <=> Co-authored-by: Matthew Silverman <matthews@xanadu.ai> Co-authored-by: Tom Bromley <49409390+trbromley@users.noreply.github.com> Co-authored-by: Mudit Pandey <mudit.pandey@xanadu.ai>
- Loading branch information