UNPKG

quaco.js

Version:

A lightweight modular Quantum Computing Simulator in JavaScript. Supports qubits, quantum gates, entanglement, circuits, algorithms, and visualization.

10 lines (6 loc) 283 B
// examples/grover_search.js import { Grover } from '../src/Algorithms/Grover.js'; // 3 qubits (search space size = 8) // Marked item = 5 (binary 101) const found = Grover.run(3, 5); console.log("Grover found marked item:", found, "(decimal:", parseInt(found, 2) + ")");