Skip to content

QuEra colorscheme #295

Open
Open

Description

@jon-wurtz

Provide some default "quera colors" to use in plots and things. For example:

from bloqade import Colorscheme
# Set a specific color
fig,ax = plt.subplots()
plt.plot(x=x,y=y,color=Colorscheme.PURPLE)
# Use the colormap
fig,ax = plt.subplots()
plt.imshow(data, cmap=Colorscheme.cmap)

# Default cycling
fig,ax = plt.subplots()
ax.set_prop_cycle(Colorscheme.COLORS())
plt.plot(x=x1,y=y1)
plt.plot(x=x2,y=y2)
plt.plot(x=x3,y=y3)

Where colorscheme could be an object

from cycler import cycler # builtin
class Colorscheme():
    PURPLE = "#67OEFF"
    ORANGE = "#FF5900"
    RED = "#EF2F55"
    GREEN = "#57BC13"
    # etc.

    @classmethod # or @property
    def COLORS(cls):
        return cycler([cls.PURPLE,cls.ORANGE,cls.RED,cls.GREEN])

    @property
    def cmap():
        return plt.get_cmap("plasma")

Activity

  1. h2110w0r1d commented on Jun 10, 2026

    @h2110w0r1d

    Hi! I’d like to work on this issue. I’ll first check the existing package structure to find the right place to expose a Colorscheme API, then add the color constants, a matplotlib-compatible color cycle, a colormap, and small tests/examples.

    Could this issue be assigned to me? Also, please let me know if there are official/preferred QuEra hex values I should use. :)

  2. h2110w0r1d commented on Jun 10, 2026

    @h2110w0r1d

    Hi! I started looking into this and noticed that this repository is a namespace/meta package that mainly contains docs and examples, while the actual source lives in sub-packages such as bloqade-circuit and bloqade-analog.

    Before implementing this, could you clarify where you’d like the Colorscheme API to live? Should it be added in this repository to expose from bloqade import Colorscheme, or should it go into one of the sub-packages, e.g. bloqade-circuit/bloqade-analog or a visualization-related module?

    Once the intended location/import path is clear, I’d be happy to work on the implementation with tests and a small example.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions