Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Interactive visualizations require internet connection #805

Closed
nonhermitian opened this issue Aug 21, 2018 · 10 comments · Fixed by #4438
Closed

Interactive visualizations require internet connection #805

nonhermitian opened this issue Aug 21, 2018 · 10 comments · Fixed by #4438
Labels
type: feature request New feature or request

Comments

@nonhermitian
Copy link
Contributor

nonhermitian commented Aug 21, 2018

Informations

  • Qiskit Terra version: 0.6
  • Python version: 3.6
  • Operating system: OSX

What is the current behavior?

The new interactive visualizations, introduced in #765 , require having an internet connection:

requirejs.config({
            paths: {
                qVisualization: "https://qvisualization.mybluemix.net/q-visualizations"
            }
        });

when it should be possible to have the required js reside locally. @filemaster and @Tansito, is there any overriding issue that prevents having the required js in terra?

@delapuente delapuente added the type: feature request New feature or request label Aug 22, 2018
@filemaster
Copy link
Contributor

To use a JS library locally installed, implies the user have to modify the Jupyter installation manually. We think the installation process is not easy enough to force the user to modify the Jupyter installation for visual library usage.

@nonhermitian
Copy link
Contributor Author

Closing this, as it appears there is no way around this without making an nbextension.

@diego-plan9
Copy link
Member

Actually, can you leave it open, even if the solution is not trivial and might not be short-term? It would serve as a reminder that we do want the visualizations not to require internet connection and we can track the status of future updates (a module for jupyter-related functionality that includes it based on nbextension is not that far-fetched if demand and functionality grows, and other alternatives might appear in the meantime).

@nonhermitian nonhermitian reopened this Aug 28, 2018
@nonhermitian
Copy link
Contributor Author

Installing an nbextension via qiskit install would be a bit of a hack, requiring installing via jupyter in the commandline behind the scenes. It could be done, but ideally would be a different install altogether, as are other nbextensions.

@diego-plan9
Copy link
Member

Yes, I was thinking of an eventual splitting and providing a jupyter-specific package, in the same spirit other suites do (as otherwise can become rather messy) - but mostly long-term and reevaluating in the future depending of how things evolve.

mtreinish added a commit to mtreinish/qiskit-core that referenced this issue Sep 4, 2018
This commit fixes a small oversight when qobj validation was added
in Qiskit#805. The validation depends on a json schema files being present
to validate against, however these weren't being included in the
python package. This just adds it to the MANIFSET file to make sure we
include it.

Fixes Qiskit#859
@1ucian0
Copy link
Member

1ucian0 commented Apr 4, 2019

Hi @diego-plan9 ! The future is here :) Any reevaluation?

@diego-plan9
Copy link
Member

The future moves at good speed! :) Although in this particular issue (interactive visualizations) I don't think there have been many changes - I still agree that providing a jupyter-specific package that includes an extension is the sensible way to go. Any thoughts?

@1ucian0
Copy link
Member

1ucian0 commented Apr 6, 2019

I do agree!

lia-approves pushed a commit to edasgupta/qiskit-terra that referenced this issue Jul 30, 2019
This commit fixes a small oversight when qobj validation was added
in Qiskit#805. The validation depends on a json schema files being present
to validate against, however these weren't being included in the
python package. This just adds it to the MANIFSET file to make sure we
include it.

Fixes Qiskit#859
@yeralin
Copy link
Contributor

yeralin commented Feb 4, 2020

No need for future here. How about storing an entire JS file content (or maybe its trimmed version) in the codebase?

Then inject it instead of trying to pull it from the internet.

@nonhermitian
Copy link
Contributor Author

Or, we could just move everything to plotly that has all of this taken care of for us. This has started with #3786

mtreinish added a commit to mtreinish/qiskit-core that referenced this issue May 12, 2020
The interactive visualization functions with each of the iplot functions
will stop working in the near future. The hard coded url that these functions rely on (see Qiskit#805) where the static compile js is hosted from is going to
disapear in the near future. This will break these functions from
working on released versions of qiskit, with no ability to fix it. This
commit just deletes the functions because they won't work anymore once
https://qvisualization.mybluemix.net goes away. So we can't even
maintain compatbility with a deprecation window once that happens. Even
if we did rehost the underlying js code somewhere else we can't rely on a
static url like this in the future and the application is too large to
self host in terra itself.
@mergify mergify bot closed this as completed in #4438 Jul 7, 2020
mergify bot added a commit that referenced this issue Jul 7, 2020
* Remove the interactive visualizations

The interactive visualization functions with each of the iplot functions
will stop working in the near future. The hard coded url that these functions rely on (see #805) where the static compile js is hosted from is going to
disapear in the near future. This will break these functions from
working on released versions of qiskit, with no ability to fix it. This
commit just deletes the functions because they won't work anymore once
https://qvisualization.mybluemix.net goes away. So we can't even
maintain compatbility with a deprecation window once that happens. Even
if we did rehost the underlying js code somewhere else we can't rely on a
static url like this in the future and the application is too large to
self host in terra itself.

* Add backwards compat shims to call mpl functions

While the interactive visualization functions will not work anymore to
ease the transition of anyone using them this commit adds back the
functions removed in the previous commit and converts them to be shims
that call the matplotlib based visualization functions. The functions
are also deprecated, this should at least give users a method to
transition off of the iplot functions.

* Fix release note section typo

* Return figures from matplotlib funcs

* Fix lint failures

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
mergify bot pushed a commit that referenced this issue Jul 7, 2020
* Remove the interactive visualizations

The interactive visualization functions with each of the iplot functions
will stop working in the near future. The hard coded url that these functions rely on (see #805) where the static compile js is hosted from is going to
disapear in the near future. This will break these functions from
working on released versions of qiskit, with no ability to fix it. This
commit just deletes the functions because they won't work anymore once
https://qvisualization.mybluemix.net goes away. So we can't even
maintain compatbility with a deprecation window once that happens. Even
if we did rehost the underlying js code somewhere else we can't rely on a
static url like this in the future and the application is too large to
self host in terra itself.

* Add backwards compat shims to call mpl functions

While the interactive visualization functions will not work anymore to
ease the transition of anyone using them this commit adds back the
functions removed in the previous commit and converts them to be shims
that call the matplotlib based visualization functions. The functions
are also deprecated, this should at least give users a method to
transition off of the iplot functions.

* Fix release note section typo

* Return figures from matplotlib funcs

* Fix lint failures

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
(cherry picked from commit a1635c1)
faisaldebouni pushed a commit to faisaldebouni/qiskit-terra that referenced this issue Aug 5, 2020
* Remove the interactive visualizations

The interactive visualization functions with each of the iplot functions
will stop working in the near future. The hard coded url that these functions rely on (see Qiskit#805) where the static compile js is hosted from is going to
disapear in the near future. This will break these functions from
working on released versions of qiskit, with no ability to fix it. This
commit just deletes the functions because they won't work anymore once
https://qvisualization.mybluemix.net goes away. So we can't even
maintain compatbility with a deprecation window once that happens. Even
if we did rehost the underlying js code somewhere else we can't rely on a
static url like this in the future and the application is too large to
self host in terra itself.

* Add backwards compat shims to call mpl functions

While the interactive visualization functions will not work anymore to
ease the transition of anyone using them this commit adds back the
functions removed in the previous commit and converts them to be shims
that call the matplotlib based visualization functions. The functions
are also deprecated, this should at least give users a method to
transition off of the iplot functions.

* Fix release note section typo

* Return figures from matplotlib funcs

* Fix lint failures

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: feature request New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants