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

Conversation

@cgranade
Copy link
Contributor

@cgranade cgranade commented Jun 4, 2021

This PR contains the IQ# components needed to support microsoft/qsharp-runtime#709. Please see that PR for full details.

cgranade and others added 27 commits February 10, 2021 18:31

// Try running again:
// Note that noiseModel: null sets the noise model to be ideal.
await AssertNoisySimulate(engine, "FailIfOne", noiseModel: null);
Copy link
Contributor

Choose a reason for hiding this comment

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

This might be a bit silly, but is it worth having the inverse test where a noise model is specified that is so noisy that we expect FailIfOne to fail? Perhaps that's too probabilistic of a test such that it would not be a good candidate for CI, but is there any way the noise model could be set such that freshly allocated qubits in the ground state have a 100% chance to measure a One?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think that could be a good test, but it'd be difficult to write for exactly the reason you mention: such a test would be inherently probabilistic. Given that probabilistic tests have been a problem for our build already, I'm reticent to add more, but I think the question you raise is a good one to address as a part of improving test coverage more generally. Perhaps something like a completely amplitude damping channel?

Copy link
Contributor

@swernli swernli left a comment

Choose a reason for hiding this comment

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

The changes look good to me, based on my understanding. Just a few random questions/ideas, but seems like these updates are good to go.

@cgranade
Copy link
Contributor Author

cgranade commented Jun 9, 2021

I've made some updates to this PR to track updates in microsoft/qsharp-runtime#709, to fix serialization issues in the original form of this PR. This PR also now adds the %%qsharp Python magic command suggested by @guenp to help make it easier to document the experimental feature.

image

It looks like the build is broken until microsoft/qsharp-runtime#709 completes, but I'm a bit surprised that it's failing at the QIR step since that comes strictly before this repo in build order, such that it shouldn't be possible for any change in this repo to affect how QIR support builds. @swernli, have you seen that error before? Thanks!

Copy link
Contributor

@anjbur anjbur left a comment

Choose a reason for hiding this comment

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

LGTM!

@cgranade
Copy link
Contributor Author

Apologies for bothering again, @anpaz, but was wondering if you had any ideas on this one, as the local build is failing, but the package works locally on my machine and the e2e build is passing. From the error log, it looks like the NativeInterface class in qsharp-runtime can't find Microsoft.Quantum.Experimental.Simulators.Runtime.dll, but that DLL shows up in native directory of each runtime ID folder in the NuGet package.

Thanks for the help!

@cgranade
Copy link
Contributor Author

It looks like cc52fb0 should have fixed the build. The root cause was that the native runtime for the new experimental simulators feature requires glibc version 2.29, which is not available by default on older versions of Ubuntu (16.04). Updating the build agent seems to have resolved that issue.

@cgranade
Copy link
Contributor Author

The e2e failure seems to be similar as the one we saw earlier, namely an accidental circular dependency between the compiler and runtime repositories unrelated to the changes in this PR. Since earlier e2e builds passed and the local build is passing, and since this PR is against a feature branch, my vote would be to merge this PR anyway.

@cgranade
Copy link
Contributor Author

e2e build is passing at https://dev.azure.com/ms-quantum-public/Microsoft%20Quantum%20(public)/_build/results?buildId=27983&view=results, but that build isn't getting picked up by the status above. Merging to feature branch as per approval and passing e2e build.

@cgranade cgranade merged commit 5598eb5 into feature/experimental/opensim Jun 15, 2021
@cgranade cgranade deleted the cgranade/experimental/qdk-sim-rs branch June 15, 2021 04:52
cgranade pushed a commit that referenced this pull request Jun 17, 2021
* Add %simulate_noise and %noise_model magic commands.

* Guard new magic behind experimental.

* Fix to noise model source, use noise_model::ideal().

* Bump version and begin adding more documentation.

* Add simulate_noise to qsharp-core.

* Bump version and fix some syntax errors.

* Add to noise model encoder.

* Support setting opensim capacity through %config.

* Started adding integration tests for experimental opensim.

* Fixed tests.

* Bump version and register display encoders.

* Fix some display issues in noise model encoder.

* fixing a bug in json noise model import (#412)

* Update to 0.15.210324351-alpha.

* Update to 0.15.210324357-alpha.

* Capture more information in assertion logs.

* Adapt to changes in noise model serialization API.

* One more fix to serialization support.

* Use alpha from microsoft/qsharp-runtime#709.

* Support more processes and instruments in display encoders.

* Allow Python client to inform kernel about experimental features.

* Allow clients to override kernel name used to communicate with IQ#.

* Fix serialization bug.

* Allow loading noise models by name.

* Revert accidental changes.

* Allow getting/setting noise models by name, add docs.

* Expose representations and named noise models.

* Update package versions to latest alpha build.

* Update to latest build.

* Improve visualization and serialization.

* Update to latest build.

* Add Python magics, expose experimental build info to Python.

* Display encoder for sparse stabilizer states.

* Build info as a magic command.

* Update to latest build.

* Fix bug in group presentations.

* Expose build info.

* Fixed bug in mixed pauli process serialization.

* Update to latest build.

* One more slight encoder fix.

* Move IQ# build to latest version of Ubuntu.

* Trivial change to invalidate builds.

* Use -any.whl to block Windows-specific wheels on Linux images.

Co-authored-by: Sarah Kaiser <sckaiser@sckaiser.com>

Co-authored-by: Sarah Kaiser <sckaiser@sckaiser.com>
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.

5 participants