npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

dandelion_chart

v1.0.15

Published

A library for visualizing quantum state probabilities and amplitudes in a geometrical and interactive way.

Downloads

23

Readme

Dandelion chart

A library for visualizing quantum state probabilities and amplitudes in a geometrical and interactive way.

Dandelion Chart

npm version Downloads


Info

  • Purpose: The Dandelion Chart library is designed to help users visualize quantum state amplitudes and probabilities through an intuitive and geometrical representation.
  • Built On: The library leverages the power of D3.js for robust rendering and interactivity.
  • Use Case: Ideal for quantum computing researchers, educators, and developers to explore and explain quantum states visually. Here is the online demo with the integration of dandelion chart: Dandelion Chart Demo

Highlights

  • Intuitive Visualization: Maps quantum state amplitudes (real and imaginary parts) to a 2D geometrical representation.
  • Interactive Scaling: Dynamically adjust circle sizes to reduce visual clutter.
  • Multi-Qubit Support: Effortlessly visualize quantum systems with multiple qubits.
  • Customizable: Define your own color schemes for better clarity and personalization.
  • Lightweight: Easy to integrate into existing projects.

Install

npm install dandelion_chart -S

Import

import {dandelion_chart} from 'src/function/package_folder/dandelion_chart'

Usage

Parameters required:

  • state_vectors Array : the state vector array to be visualized
  • [bundle_g, size_arr, position_arr, point_radius=8] Array : placement parameters
    • bundle_g d3_selection : the container for the dandelion chart
    • size_arr Array : the size of the dandelion chart
    • position_arr Array : positio of the dandelion chart
    • point_radius Number : the radius of the points in the chart, default is 8
  • [theta, theta_point] Array : optional parameters for scaling
    • theta Number : the parameters to decrease the area of circles, reducing the visual clutter when there are numerous basic states
    • theta_point Number : the parameters to decrease the radius of points, reducing the visual clutter when there are numerous basic states

Basic Example

import * as d3 from 'd3';
import {dandelion_chart} from 'dandelion_chart'

// Define data for quantum states
let state_vector = [
  [0.13, 0.428],
  [0.07, -0.495],
  [0.1, 0.2],
  [0.4, 0.3]
]

// Create a D3 container
const bundle_g = d3.select('body')
        .append('svg')
        .attr('width', 500)
        .attr('height', 500)
        .append('g')
        .attr('class', 'dandelion-chart-group');


// Initialize the Dandelion Chart
dandelion_chart(state_vector, [bundle_g, [300, 300], [0, 0]], [0.8, 1]);