EntangleMap v0.2.0 · User guide

Read your circuit’s story

EntangleMap turns a small quantum circuit into an explainable report: where correlation grows, when it peaks, and which structural properties deserve attention next.

Local by default

The circuit and statevector stay in the browser.

Step-aware

Entropy is computed after every valid gate.

Reproducible

Export the source and report as JSON.

1. Quick start

Choose Bell, GHZ, VQE, or QAOA to load an example. For your own circuit, open View / Edit Code, paste the input, and watch the report update as you type.

A useful first experiment is to compare a Bell state with a product-state circuit. The Bell state is only two gates, but its entropy across the first cut reaches one e-bit. That difference is the kind of physical signal EntangleMap is designed to make visible.

2. Input format

EntangleMap accepts a small, explicit subset of OpenQASM 2.0 and a compact pseudo-syntax.

// Compact syntax
H 0
CX 0 1
RZ 1 pi/2
SWAP 2 3
OPENQASM 2.0;
include "qelib1.inc";
qreg q[4];

h q[0];
rz(pi/2) q[0];
cx q[0], q[1];
swap q[2], q[3];

Supported gates

  • I, H, X, Y, Z — single-qubit gates
  • RX, RY, RZ — rotations with numbers or expressions such as pi/2
  • CX, CZ — controlled two-qubit gates
  • SWAP — exchange two qubits

Header declarations such as OPENQASM, include, qreg, and creg are accepted. barrier is ignored with a warning. measure and reset are reported but not simulated because this release analyzes the unitary portion of a circuit.

3. Input diagnostics

EntangleMap does not silently discard a malformed line. Unsupported gates, missing operands, invalid angles, and qubits outside the selected register appear with their source line number. Valid lines continue to run, so you can repair a circuit without losing the rest of the analysis.

4. Understanding the report

Peak cut

`2|3` means the first two wires are compared with the remaining three.

Peak step

The gate step where the strongest observed correlation occurs.

Estimated depth

A source-order moment schedule; disjoint gates may share a moment.

Entangling gates

The count and proportion of gates that act across two qubits.

The heatmap uses rows for contiguous wire cuts and columns for circuit steps. Each cell is normalized against the maximum possible entropy for its cut, which makes different cuts easier to compare visually. Hover a cell to see the raw e-bit value.

The Complexity Pressure indicator combines normalized peak entropy, entangling-gate density, and estimated depth. It is a transparent comparison aid for small circuits, not a prediction of runtime on a specific classical machine.

5. What is being calculated?

For each valid gate, a Web Worker evolves a complex statevector. For each contiguous cut, EntangleMap constructs a reduced density matrix by tracing out the complementary subsystem. The eigenvalues of that matrix are used to calculate Von Neumann entropy:

S(rho) = -sum(p_i * log2(p_i))

The implementation uses a Jacobi eigenvalue routine and reports entropy in bits, or e-bits. The effective Schmidt-rank value shown in the UI is 2^S; it is an entropy-derived indicator, not an exact rank calculation.

6. Privacy, limits, and scope

There is no backend in the analysis path. However, the application still depends on the browser environment and any hosting layer used to serve the static application. EntangleMap itself does not upload circuit source or statevector data.

  • Maximum selectable width: 10 qubits.
  • Maximum documented circuit length: 150 steps.
  • Only contiguous wire cuts are analyzed.
  • No noise, measurement collapse, sampling, transpilation, or hardware connectivity model.
  • Statevector and entropy costs grow exponentially with qubit count.

7. Export and reproducibility

Click Export JSON report after an analysis completes. The file includes the report version, timestamp, selected width, original source, parsed gates, diagnostics, metrics, entropy timeline, pressure score, and final-state probabilities. This makes it suitable for attaching to a lesson, issue, experiment log, or review.

8. Contributing

The most valuable next contributions are independent reference checks, additional educational circuits, accessibility improvements, and feedback from people who teach or develop with quantum circuits. Run npm test, npm run lint, and npm run build before submitting a change.

« Back to Profiler Workspace