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

General sampling estimator #321

Merged
merged 4 commits into from Mar 18, 2024
Merged

General sampling estimator #321

merged 4 commits into from Mar 18, 2024

Conversation

dchung0741
Copy link
Contributor

@dchung0741 dchung0741 commented Mar 15, 2024

Directly provide general sampling estimator to users via the new create_general_sampling_estimator function. The input parameters are exactly the same as those that creates a (concurrent_)sampling_estimator.

Example code:

general_sampling_estimator = create_general_sampling_estimator(
    total_shots,
    sampler,
    bitwise_commuting_pauli_measurement,
    allocator,
)


# estimator
general_sampling_estimator(op, state)

# concurrent estimator
general_sampling_estimator(op, [state_1, state_2])
general_sampling_estimator([op], [state_1, state_2])
general_sampling_estimator([op_1, op_2], state)
general_sampling_estimator([op_1, op_2], [state])
general_sampling_estimator([op_1, op_2], [state_1, state_2])

# parametric estimator
general_sampling_estimator(op, param_state, param)

# parametric concurrent estimator
general_sampling_estimator(op, param_state, [param_1, param_2])

Copy link

github-actions bot commented Mar 15, 2024

@github-actions github-actions bot temporarily deployed to pull request March 15, 2024 05:24 Inactive
@github-actions github-actions bot temporarily deployed to pull request March 15, 2024 06:27 Inactive
@github-actions github-actions bot temporarily deployed to pull request March 18, 2024 02:52 Inactive
Copy link
Contributor

@toru4838 toru4838 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!!

@toru4838 toru4838 merged commit 776ec7c into main Mar 18, 2024
8 checks passed
@toru4838 toru4838 deleted the general_sampling_estimator branch March 18, 2024 10:34
@github-actions github-actions bot locked and limited conversation to collaborators Mar 18, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants