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

[Testing] Better testing the projectors #224

Open
RolandMacDoland opened this issue Nov 27, 2023 · 1 comment
Open

[Testing] Better testing the projectors #224

RolandMacDoland opened this issue Nov 27, 2023 · 1 comment
Assignees
Labels
testing Everything related to tests

Comments

@RolandMacDoland
Copy link
Collaborator

jpmoutinho 32 minutes ago
Oh man those get a bit... verbose 😅. I would suggest mostly testing the projector in terms of expected results coming out of circuits and observables instead of directly comparing matrices. E.g.:

For some random initial state checking that a random projector as a block in the circuit will lead to a unnormalized wavefunction with only a component in the respective basis state.
Checking that HamEvo with a generator written with only projectors gives the same result as one written with Paulis (e.g., X_proj = |0><1| + |1><0| and you can similarly rewrite the other paulis with the projectors and build an Hamiltonian out of it).
Same thing for using the projectors as the observable in the QuantumModel.

@RolandMacDoland RolandMacDoland self-assigned this Nov 27, 2023
@dominikandreasseitz dominikandreasseitz changed the title Better testing the projectors [Testing] Better testing the projectors Nov 27, 2023
@RolandMacDoland RolandMacDoland added the testing Everything related to tests label Apr 26, 2024
@mlahariya
Copy link
Collaborator

@RolandMacDoland , @jpmoutinho - Check if this might be duplicated work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
testing Everything related to tests
Projects
None yet
Development

No branches or pull requests

2 participants