Skip to content
This repository was archived by the owner on Jan 12, 2024. It is now read-only.

Improvements to Microsoft.Quantum.Random namespace - #328

Merged
Cassandra Granade (cgranade) merged 38 commits into
masterfrom
cgranade/random
Aug 18, 2020
Merged

Improvements to Microsoft.Quantum.Random namespace#328
Cassandra Granade (cgranade) merged 38 commits into
masterfrom
cgranade/random

Conversation

@cgranade

@cgranade Cassandra Granade (cgranade) commented Aug 12, 2020

Copy link
Copy Markdown
Contributor

This PR implements the proposal in microsoft/QuantumLibraries#304 as part of the QSharpCore project for dependency ordering, and makes changes to simulators needed to adapt to the new API. As a part of that work, this PR also consolidates random number generation logic into SimulatorBase, so that random seeds can be set in a more uniform fashion.

This PR is open for early feedback only. Work deferred to future PR:

  • unit testing (and more bug testing in general)
  • API documentation
  • Add Q# APIs for uniform distribution over BigInt, normal distribution over Complex

@msoeken Mathias Soeken (msoeken) left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Great to see these improvements to the M.Q.Random namespace, thanks. Left some comments for now

Comment thread src/Simulation/Common/SimulatorBase.cs Outdated
Comment thread src/Simulation/Common/SimulatorBase.cs Outdated
Comment thread src/Simulation/Common/SimulatorBase.cs
Comment thread src/Simulation/QsharpCore/Diagnostics/Facts.qs
Comment thread src/Simulation/QsharpCore/Random/Convienence.qs Outdated
Comment thread src/Simulation/QsharpCore/Random/Types.qs Outdated
Comment thread src/Simulation/Simulators.Tests/TestProjects/UnitTests/Random/Tests.qs Outdated

@msoeken Mathias Soeken (msoeken) left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Some more comments on the most recent changes. These are very nice tests!

Comment thread src/Simulation/Simulators.Tests/TestProjects/IntrinsicTests/IntrinsicTests.csproj Outdated
Comment thread src/Simulation/Simulators.Tests/TestProjects/IntrinsicTests/Random/Tests.qs Outdated
Comment thread src/Simulation/Simulators.Tests/TestProjects/IntrinsicTests/Random/Tests.qs Outdated
…trinsicTests.csproj

Co-authored-by: Mathias Soeken <mathias.soeken@outlook.com>
…ndom/Tests.qs

Co-authored-by: Mathias Soeken <mathias.soeken@outlook.com>
…ndom/Tests.qs

Co-authored-by: Mathias Soeken <mathias.soeken@outlook.com>
@cgranade Cassandra Granade (cgranade) changed the title [WIP] Improvements to Microsoft.Quantum.Random namespace Improvements to Microsoft.Quantum.Random namespace Aug 18, 2020
@cgranade
Cassandra Granade (cgranade) marked this pull request as ready for review August 18, 2020 16:33
@cgranade

Copy link
Copy Markdown
Contributor Author

Some more comments on the most recent changes. These are very nice tests!

Thank you for your feedback, and for your kind words!

@msoeken Mathias Soeken (msoeken) left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Looks good to me, thanks!

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.

2 participants