@nm-lang/core
v0.7.0
Published
Core parser, simulator, optimizer, exports, and learning-package utilities for the N/M quantum language.
Maintainers
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/coreAn 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.
