Skip to content

Conversation

@MichaelBroughton
Copy link
Collaborator

@MichaelBroughton MichaelBroughton commented Mar 20, 2021

Adds the tfq.noise module with the first callable op tfq.noise.expectation, which should behave just like our noiseless op only it supports noisy circuits and requires a num_samples parameter to indicate how many monte-carlo runs to do.

Had to bump the version of qsim in order to work around: quantumlib/qsim#308 as well as quantumlib/qsim#312

Had to make some small tweaks to qsim_circuit_parser_test.cc for the noisy case that we missed when we first put things in.

Like most of our ops the noisy expectation op has both a small and large version. I recommend reading through the ComputeLarge and then understanding the parallelization scheme for ComputeSmall.

Please review closely

@MichaelBroughton MichaelBroughton marked this pull request as draft March 20, 2021 09:31
@MichaelBroughton MichaelBroughton marked this pull request as ready for review March 20, 2021 10:31
for (const Operation& op : moment.operations()) {
placeholder.gates.clear();
gate_fail = false;
gate_found = false;
Copy link
Member

Choose a reason for hiding this comment

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

gate_found = true?

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

Successfully merging this pull request may close these issues.

3 participants