-
Notifications
You must be signed in to change notification settings - Fork 44
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
sparse state prep: allow user to pick target bitsize if needed #1430
sparse state prep: allow user to pick target bitsize if needed #1430
Conversation
@tanujkhattar ptal |
qualtran/bloqs/state_preparation/sparse_state_preparation_via_rotations.py
Show resolved
Hide resolved
@@ -116,6 +116,7 @@ def assert_bloq_example_serializes_for_pytest(bloq_ex: BloqExample): | |||
'state_prep_via_rotation_symb', # cannot serialize HasLength | |||
'state_prep_via_rotation_symb_phasegrad', # cannot serialize Shaped | |||
'sparse_state_prep_via_rotations', # cannot serialize Permutation | |||
'sparse_state_prep_via_rotations_with_large_target_bitsize', # setting an array element with a sequence. |
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.
What's going on here? Is it because we can't serialize permutation?
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.
yes I think so
@pytest.mark.parametrize( | ||
"bloq_ex", | ||
[_sparse_state_prep_via_rotations, _sparse_state_prep_via_rotations_with_large_target_bitsize], | ||
) | ||
def test_examples(bloq_autotester, bloq_ex): | ||
bloq_autotester(bloq_ex) |
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.
Can we add a slow test that asserts the simulation is correct? The bloq example auto tests do not cover correctness of decomposition, AFAIR ?
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.
added simulation tests (at the end)
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.
Thanks
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.
LGTM % nits
StatePreparationViaRotations