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

@nm-lang/core

v0.7.0

Published

Core parser, simulator, optimizer, exports, and learning-package utilities for the N/M quantum language.

Readme

@nm-lang/core

N/M 0.2.0 Preview: parser, local quantum simulators, optimization, exports, numeric operations and learning-package utilities. This package provides an ES module API and TypeScript declarations.

Package 0.7.0 targets the N/M 0.2.0 language contract.

0.7.0 training numerics / Eğitim sayısal işlemleri

Core 0.7.0 adds first-order Hermitian exponential H/time derivatives, finite/analytic block QNG, shared-evaluation gradient covariance, deterministic stateful GD/momentum/Adam/QNG checkpoints and past-covariance shot allocation. Language 0.2.0, explicit permissions and scientific limits remain. Analytic QNG is initially flat/noiseless; sampled checkpoint continuation is rejected. Covariance allocation is a heuristic within the existing total budget.

Türkçe: Matris üstel türevi, blok/analitik QNG, gradyan kovaryansı, deterministik durumlu devam ve önceki kovaryansla ölçüm dağılımı eklendi. İzinler ve sınırlar korunur; kayıt izin vermez, sonlu ölçümle devam desteklenmez ve daha düşük hata garantisi yoktur. Normal editör Run ayrı kalır.

See Quantum AI and the public documentation. Registry availability is separate from this package version.

Install / Kurulum

Requires Node.js 20 or newer. Release checks use Node.js 22.23.1.

npm install @nm-lang/core

An untagged install selects npm's latest channel. Use @0.7.0 to pin this version. The N/M language remains Preview independently of the npm channel. Installation availability is determined by npm.

Türkçe: Etiketsiz kurulum npm'in latest kanalını seçer. @0.7.0 ile sürümü sabitleyebilirsiniz. N/M dili, npm kanalından bağımsız olarak Önizleme durumundadır.

First program / İlk program

import { createNMDefaultParseOptions, executeNMCode } from "@nm-lang/core";

const source = `module npm_bell;
fn main() {
  let q = qreg[2];
  H(q[0]);
  CNOT(q[0], q[1]);
  let a = measure(q[0]);
  let b = measure(q[1]);
  return (a, b);
}`;

const result = executeNMCode(source, createNMDefaultParseOptions());
if (!result.success) throw new Error(result.error);
console.log(result);

The example creates and measures a Bell pair on the local simulator. Türkçe: Örnek, yerel simülatörde Bell çifti oluşturup ölçer. Bu işlem gerçek kuantum donanımında çalıştırma anlamına gelmez.

Language options / Dil seçenekleri

Core API callers choose parsing options explicitly. createNMDefaultParseOptions() enables classical functions, typed classical values, Result returns, module visibility, parameter groups and compute/apply. Explicit false overrides remain off. Other experimental capabilities require their own opt-ins; defaults do not promote their stability status.

Türkçe: Core çağrılarında dil seçenekleri açıkça geçirilir. Varsayılan profili yukarıdaki fonksiyonla seçebilirsiniz; açıkça kapattığınız özellikler kapalı kalır. Deneysel özelliklerin sınırları ve durumları değişmez.

Limits / Sınırlar

Runtime, backend, training and export limits depend on the selected capability. Unsupported programs return structured errors. Simulator results are not hardware execution evidence. See the public capability documentation before depending on an experimental feature.

0.6.0: Numerics and workspaces / Sayısal işlemler ve çalışma alanları

Adds real/Complex Hermitian eigvecsh, first-order real solve derivatives with call-local factor reuse, and column-pivoted QR lstsq(A,b) for full-column-rank square/tall Float matrices. Parameter-dependent analytic derivatives of eigvecsh and lstsq fail explicitly. Shapes and work budgets remain bounded. Public workspace auto-import and deterministic project plans are available through the language-service and project-template APIs; filesystem creation belongs to the CLI's Node-only @nm-lang/cli/project-create entry. Published 0.5.0 snapshot fingerprints remain readable without relabelling.

Türkçe: Hermitsel özvektörler, gerçel doğrusal çözümün birinci türevi ve tam sütun ranklı Float matrisler için QR en küçük kareler çözümü eklenir. Public sembollerde otomatik import ve ortak proje planları sunulur. Dosya yazımı Node CLI girişindedir; Core tarayıcı uyumu, sınırlar ve eski kayıtların özgün parmak izleri korunur.

0.5.0: Trainable evolution / Eğitilebilir evrim

This package adds scalar-parameter evolution time and Hamiltonian coefficients, fixed gate topology at zero time/weight, and exact-statevector circuit/operator derivatives. The training host supports fixed or adaptive QWC allocation with one total shot budget, separate pilots/held-out confidence evidence, and optional final-cost precision targets. Required-shot estimates are informational; they do not spend extra shots, increase the 4096 limit or certify convergence. These features require the existing explicit Hamiltonian and grouping permissions.

Türkçe: Parametreli evrim süresi/katsayıları, sıfırda korunan kapı yapısı ve kesin statevector devre/operatör türevleri eklenir. Eğitim host'u sabit/adaptif QWC, tek toplam ölçüm bütçesi, ayrı pilot/değerlendirme güven kanıtı ve isteğe bağlı son maliyet hassasiyetini destekler. Ölçüm tahmini bilgi amaçlıdır; ek ölçüm almaz, 4096 sınırını artırmaz veya yakınsamayı belgelemez. Mevcut iki açık izin korunur.

The N/M language contract remains 0.2.0; package and artifact versions are separate. N/M dil sözleşmesi 0.2.0 olarak kalır; paket ve dosya biçimi sürümleri ayrıdır.

Hamiltonian 0.4.0 / Hamiltonian 0.4.0

Version 0.4.0 includes Hamiltonian evolution and shared-shot QWC expectations. Earlier releases do not include these additions. Both hamiltonianEvolution and measurementGrouping require explicit permission. Source printing and N/M IR v0.5 preserve original source, parser context, seed and shot plans. Imports rebuild with caller permissions; stored flags never grant them. QASM/framework export and source optimization/transpilation reject these semantics.

CLI: --experimental-hamiltonian-evolution, --experimental-measurement-grouping, --from-ir for a saved v0.5 IR, --locale en|tr for diagnostics. MCP: the matching experimentalHamiltonianEvolution / experimentalMeasurementGrouping booleans, nm_export target ir and nm_import_ir. LSP initialization uses initializationOptions.nm.experimental; VS Code uses nm.experimental.hamiltonianEvolution / nm.experimental.measurementGrouping. The editor offers completion/hover, closed-default diagnostics and original source columns for generated gates in the recorded debugger.

Türkçe: 0.4.0 bu geliştirmeleri içerir; iki yeni izin varsayılan kapalıdır. Yazdırma/IR özgün kaynağı ve ortak ölçüm bütçesini korur; içe aktarım kaydı çalıştırma yetkisi saymaz. CLI/MCP/LSP/Monaco/VS Code aynı izinleri taşır; tanılar ve ayarlar TR/EN destekler. TR/EN laboratuvarı sitede erişilebilirdir. N/M dil sözleşmesi 0.2.0 ve ön izleme olgunluğu korunur.

Release notes · Türkçe sürüm notları

License / Lisans

Free personal, educational and commercial use; source-code rights are reserved. Modification or redistribution of QuantumSoftware-owned package code requires separate permission. Your N/M programs and results remain yours. See LICENSE.txt and NOTICE.txt.

Türkçe: Kullanım ücretsizdir; açık kaynak lisansı verilmez. Paket kodunu değiştirme ve yeniden dağıtma için ayrıca izin gerekir.