quantumlib / Cirq

A Python framework for creating, editing, and invoking Noisy Intermediate Scale Quantum (NISQ) circuits.
Apache License 2.0
4.24k stars 1.01k forks source link

Portable way to embed images in colab notebooks #3308

Open balopat opened 4 years ago

balopat commented 4 years ago

Is your feature request related to a use case or problem? Please describe.

context: https://github.com/quantumlib/Cirq/pull/3307

Describe the solution you'd like

Images should be available in an ipython notebook in our repo in all circumstances:

[optional] Describe alternatives/workarounds you've considered

Pointing to images on github raw on master (current solution): while this works for existing images, it is hard to review a PR which has a new image coming in.

What is the urgency from your perspective for this issue? Is it blocking important work?

P1 - I need this no later than the next release (end of quarter)

maffoo commented 4 years ago

Do data urls work?

balopat commented 4 years ago

Do data urls work?

based on this SO thread it's not great but I haven't had time to try it out yet

balopat commented 3 years ago

So, data urls do work, the disadvantage is that it bloats the ipynb and makes it harder to read. I guess that is the price - as ipynb is a json format :)