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 Aug 7, 2020

This PR adds a new display hook to allow passing diagnostic displays from IQ# all the way through Python notebooks as well as IQ# notebooks, addressing an issue raised by @guenp in offline discussions about microsoft/QuantumLibraries#302.

image

NB: This PR introduces changes to the API surface of the IQ# client for Python, but these changes are fully localized to private methods.

@cgranade cgranade requested a review from rmshaffer August 7, 2020 19:51
Copy link
Contributor

@rmshaffer rmshaffer left a comment

Choose a reason for hiding this comment

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

Thanks for doing this! Looks great, will approve once CI is passing.

return self._execute(
f'%{magic} {json.dumps(map_tuples(kwargs))}',
raise_on_stderr=raise_on_stderr, _quiet_=_quiet_,
**kwargs
Copy link
Contributor

Choose a reason for hiding this comment

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

Perhaps **kwargs shouldn't be passed through here, since it's being converted to JSON as an argument to the magic command? I noticed the CI failure and I assume it's related to this.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good catch, thank you! I must have made that chance accidentally renaming things to be consistent, will revert that line.

@cgranade cgranade merged commit e075e9a into master Aug 7, 2020
@rmshaffer rmshaffer deleted the cgranade/display-hook branch October 1, 2020 15:04
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.

3 participants