Composer¶
Draw a circuit in Quirk, which simulates it itself up to 16 qubits. Beyond 16 qubits, with noise, or on a local kernel, use the Dense-Evolution engine below: the matrix product state (MPS) simulator takes the circuit as OpenQASM.
Quirk: up to 16 qubits
The editor and its simulator are Quirk by Craig Gidney (Apache-2.0), unchanged.
Dense-Evolution engine: beyond 16 qubits, noise, VQE
Run sends the OpenQASM on the left to the engine chosen. Use it beyond 16 qubits (the presets go up to 1500), with noise, or on the local kernel. A circuit drawn in Quirk is copied to the box at every edit.
| state | re | im | |amp| | phase |
|---|
| qubit | P(1) |
|---|
| outcome | shots | probability |
|---|
Materiali (tavola periodica, elementi reali Z=1..54 + Au, Pb)
Materiali (tavola periodica, elementi reali Z=1..54 + Au, Pb)
Clicca gli elementi per assemblare la lista simboli della molecola custom sotto — stesso effetto di scriverli a mano, solo più comodo. Qualsiasi combinazione è accettata; il numero di qubit reale che ne risulta decide se questo simulatore riesce a gestirla (diagonalizzazione esatta/VQE restano nel range ~12 qubit — un elemento pesante come il piombo darà un errore onesto di "troppi qubit", non un risultato finto).
Hamiltonian (real molecular, PennyLane Hartree-Fock)
Hamiltonian (real molecular, PennyLane Hartree-Fock)
Real fermion-to-qubit Hamiltonians, computed on demand. The whole catalog is always listed here (each entry shows the real qubit count its Hamiltonian needs) — picking one sets Qubits and loads its real Hartree-Fock reference circuit into the editor automatically. Or specify any small molecule's own atoms/geometry directly below.
Scan energia — curva vs lunghezza di legame (diagonalizzazione esatta)
Scan energia — curva vs lunghezza di legame (diagonalizzazione esatta)
Ricalcola l'energia di stato fondamentale della molecola custom (i simboli inseriti sopra) a più lunghezze di legame in una sola richiesta — utile per vedere una curva di dissociazione senza rifare "Compute ground state" a mano punto per punto. Ogni punto è una diagonalizzazione esatta reale, non un'interpolazione; la forma è la stessa usata da "Genera geometria" sopra (lineare, triangolare o ad anello), riscalata alla lunghezza di legame di ciascun punto.
VQE — ansatz variazionale reale (dense_evolution.vqe)
VQE — ansatz variazionale reale (dense_evolution.vqe)
Genera e ottimizza un vero circuito VQE per la molecola scelta sopra (catalogo o custom), parametri trovati da un vero Adam gradient descent (differenziazione adjoint, dense_evolution.vqe.run_vqe) — nessun angolo fisso, ogni esecuzione riottimizza da capo. Due ansatz reali disponibili: Hardware-efficient (template generico N layer RY+CNOT, tanti parametri, veloce per iterazione) o UCCSD (eccitazioni fermioniche singole/doppie reali della molecola, qml.qchem.excitations — pochi parametri, converge in meno iterazioni, ma ogni iterazione è molto più pesante perché il circuito decomposto è molto più profondo: per LiH/H2O conta minuti, non secondi, per iterazione). Il circuito risultante (tradotto in vero OpenQASM dalla decomposizione esatta di PennyLane, verificato bit-per-bit contro l'esecuzione su dense_evolution) viene caricato nell'editor principale e aggiunto alla libreria preset qui sopra.
Forze & MD — Hellmann-Feynman reale (dashboard_core.qmmm)
Forze & MD — Hellmann-Feynman reale (dashboard_core.qmmm)
Forze nucleari reali sulla molecola scelta sopra: F = -d<ψ|H(R)|ψ>/dR, con H(R) l'Hamiltoniana molecolare reale e differenziabile di PennyLane (metodo "dhf") e ψ lo stato elettronico tenuto fisso (teorema di Hellmann-Feynman esatto, non differenze finite). La traiettoria MD integra queste forze reali con Velocity-Verlet classico (masse atomiche reali, costante di conversione derivata dalle costanti CODATA) — "Ricalcola stato elettronico" risolve un vero Hartree-Fock ad ogni passo (MD ab-initio vero, molto più costoso) invece di tenere fisso lo stato iniziale (approssimazione reale e dichiarata, valida vicino alla geometria di partenza).
Mitigation — Zero-Noise Extrapolation (real, dense_evolution.zero_noise_extrapolation)
Mitigation — Zero-Noise Extrapolation (real, dense_evolution.zero_noise_extrapolation)
Measures a Pauli expectation value on the ideal state and on the real noise channel above (each an ensemble average over many stochastic Kraus draws), then extrapolates back to zero noise. Richardson: exact interpolation through 1×/2×/3× "Noise p". Polynomial (degree 2): least-squares fit through 1×..5×, trades a little interpolation bias for averaging down statistical noise across more scales. Pauli string uses dense_evolution's own qubit ordering (position 0 = qubit 0), length must match the circuit's qubit count.
Mitigation — density-matrix ZNE (real, dense_evolution.zne_density_matrix)
Mitigation — density-matrix ZNE (real, dense_evolution.zne_density_matrix)
Builds a real Monte-Carlo density-matrix estimate at 1×/2×/3× the "Noise p" above, extrapolates to zero noise, and projects onto the nearest physical (positive-semidefinite) state (Smolin–Gambetta–Smith). Graded — never fed back in — against the true ideal state via real Uhlmann fidelity, so the improvement shown is an honest measurement, not a guaranteed number.
No kernel? Run the circuit in your browser
If no local kernel answers, the page offers Prova nel browser (NumPy,
senza installare). It loads Pyodide (Python in WebAssembly) and the NumPy
MPS simulator
(dense_evolution/backends/mps_numpy.py),
so the circuit runs in this page and is sent nowhere. What it does: any
OpenQASM circuit of the supported gates. Up to 20 qubits it answers as the local
kernel does, with the sampled shots (same seed), the statevector and the circuit,
histogram, Q-sphere and Bloch figures; beyond 20 qubits, up to 1500, with the most
probable states, the bond dimension and the memory of the MPS. What it does not:
noise models, VQE, Hamiltonians and mitigation, which need JAX and the local
kernel below. The numbers are in single precision (complex64); the
first load downloads Pyodide from jsDelivr, so it needs the network.
Runs on your own machine, not a shared server
This page is static — every circuit runs on a real local kernel
(dense_evolution's own DenseSVSimulator, driven by local_site/app/server.py)
that you run on your own PC. Nothing here is precomputed or mocked, and
nothing you run is sent anywhere else. Grab the installer for your OS
and run it yourself (no site can install or launch anything on your
machine on its own) — it walks you through what it's about to do
(install the package, optionally download an offline copy of this
page, optionally add Desktop/Start Menu/startup shortcuts) before
doing any of it:
Windows (.bat)
·
macOS / Linux (.sh)
— or by hand: pip install dense-evolution[composer] then
dense-evolution serve. Either way, reload this page once it's
running — the banner above turns green the moment it detects your
kernel. To remove everything the installer created, run
uninstall-composer.bat
or
uninstall-composer.sh.