Skip to content

Comments

Fix testing strategies#362

Open
jclark-ce wants to merge 4 commits intoBQSKit:mainfrom
jclark-ce:strategies_fix
Open

Fix testing strategies#362
jclark-ce wants to merge 4 commits intoBQSKit:mainfrom
jclark-ce:strategies_fix

Conversation

@jclark-ce
Copy link

Address #360, changes are:

  • Made the gates strategy filter gates ahead of time rather than relying on hypothesis
  • Fixed frozen_gates to return only non-constant gates when requested, as well as accounting for None constant inputs
  • Switched floats calls to use the default width argument, which drastically reduces the rejection rate for param lists (this defaults to 64-bit floats, which should produce valid params as far as I can tell)

@jclark-ce
Copy link
Author

I guess I must've forgotten to re-run the tests before making the floats call change. Anyway, the errors in the last test were due to nan popping up in the results with large param values (which caused the tests to fail since nan is not equal to itself). The new version clamps the floats calls to the range $[-2^{16},2^{16}]$, which is roughly equivalent to using 16-bit floats (but without the failure rate).

Having actually run tests on the new version, it looks like they all pass with the exception of test_power_gate, which might be an actual bug, either in PowerGate or in the test_power_gate fixture.

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.

1 participant