nandan (@nandanito) header
nandan (@nandanito) profile picture

Physics → software → quantum. Interested in how information becomes knowledge. Exploring at the intersection of quantum computing and machine intelligence.

Tokyo, Japan
Joined January 2013
Photo by nandan (@nandanito)Photo by nandan (@nandanito)Photo by nandan (@nandanito)Photo by nandan (@nandanito)Photo by nandan (@nandanito)Photo by nandan (@nandanito)Photo by nandan (@nandanito)Photo by nandan (@nandanito)Photo by nandan (@nandanito)Photo by nandan (@nandanito)
Can you move tokens confidentially on the XRP Ledger? Yes, under XLS-96, and as I write this only on Devnet. I built the core of a receivables facility on it and ran it to see exactly what it hides. The short answer: amounts, not relationships. Hidden from the public: each holder's balance, and the amount of each Send between confidential balances. Public: who pays whom, when and how often. Every amount converted into or out of confidential form. And some zero balances: the ledger writes a fixed encryption of zero, which anyone can recompute from public inputs, for a new balance, an inbox just merged and a position clawed back. I matched it byte for byte against live Devnet state. The issuer reads every balance, always. XLS-96 keeps a second copy encrypted to the issuer's key, and no setting turns it off. That is by design, and it means "confidential" here is confidentiality from the public. If the token allows clawback, the issuer can also destroy a confidential balance. Keys cannot be rotated or recovered, in XLS-96 or, as I write this, on Mainnet, Testnet or Devnet. A draft standard, XLS-99, proposes both. In the facility, that means the float, which suppliers drew on which days, and every tranche retired at the end are public. Each supplier's limit, draws and what it owes are not, though the public totals still bound them. Eleven issues went upstream to the XRPLF repositories; five are resolved so far. The write-up's claims cite rows of a public claims register, and the register keeps its own corrections. I am running the same study on EVM chains. Those results will follow. A research project on Devnet: not audited, not production-ready. Write-up: buff.ly/yZUYYCw Demo: buff.ly/gQ161xG Code: buff.ly/BcHYMo5 Independent work; not affiliated with Ripple. #XRPL #DigitalAssets #Tokenization #Privacy
1
31
Who can read what, in one table. Anyone sees who pays whom and every amount going in or out. Only the holder's keys can spend a balance. The issuer reads every balance and every transfer amount.
8
Here is a perfectly good q program: a counter, a loop, an accumulator, and it prints 15. It will still be correct next year, in production. That is the problem. @kxsystems' q has every reflex you brought from Python or Java, and the answers come out right, so nothing ever nudges you toward the one-word version, sum. Article 4 of my array-thinking series. J does not forbid loops either. But to write one you step outside J's ordinary notation: a definition block, a different assignment, a lone ) to close it. Five lines of visibly foreign machinery, where the array version is two characters. In q the loop is one ordinary line. That feeling of having wandered off is the whole case for a short detour through J before q. The detour sends three habits back with you, and two of them break on the way home. One breaks loudly. J writes a mean as +/ % # (sum divided by count, with no data mentioned); the same text does not parse in q at all, so it can never ship. One breaks silently, and ships. The 3-period moving average of six numbers in J: 3 (+/ % #)\ 1 2 3 4 5 6 gives 2 3 4 5: complete windows only. The same request in q (in q, / starts a comment, and this one shows what the line returns): 3 mavg 1 2 3 4 5 6f / 1 1.5 2 3 4 5 Six results, ramping up through partial windows. Neither is wrong. Both are called "the 3-period moving average". Read q's first value as a full window, the way J's would be, and you are two positions early, with no error. Last week's article took q's as-of join apart; this one is about a quieter gap. Also in it: whether the shift actually takes, using my earlier eval of KX's q plugin (with and without the plugin, all three loop-to-array tasks were solved, and why that carries little weight), and why J rather than APL or BQN. Every snippet is copied from a lesson that runs in CI, on KDB-X Community Edition and J 9.7.1. Article 4 of 5: buff.ly/UdAEy91 Independent work; not affiliated with KX or Jsoftware. #kdb #ArrayProgramming
1
46
The two places the J detour misleads you, in one picture. The mean written with no data in it fails to parse in q, so it can never reach production. The moving-average windows can: J's first result is q's third, and nothing complains. Respect the silent one more.
1
8
With latest board for 4.7" e-paper display. Build your e-reader for just $25. #m5stack #ereader #epaper #DIY
#M5StackNew 🎉 PaperDIY Assembly & Complete Kit Released PaperDIY Assembly & Complete Kit are DIY e-paper development board kits, including main control board, 140mAh lithium battery, e-paper display and acrylic screen pressure plate, suitable for building desktop information displays, electronic labels, maker DIY projects, and embedded hardware development experiments. ✨Features ✅ ESP32-S3R8 core controller (16MB Flash, 8MB PSRAM, 2.4 GHz Wi-Fi) ✅ 4.7" e-paper display, 960×540 resolution, 16-level grayscale display ✅ Onboard DC 3.7V battery connector, Low-power power management design ✅ 140mAh lithium battery, microSD card slot * PaperDIY Assembly Kit: assembly completed by the user, PaperDIY Complete Kit: includes a pre-installed 3D-printed enclosure, with hardware assembly completed at the factory. 🛒 Get Yours: Official Store: PaperDIY Assembly Kit: bit.ly/4jYssSu PaperDIY Complete Kit: bit.ly/3TW9Lo3 AliExpress: PaperDIY Assembly Kit: bit.ly/4i79YNj PaperDIY Complete Kit: bit.ly/4s4mLEw #M5Stack #M5StackNew #IoT #EINK #EPaper #DIYElectronics #Makers
3
98
pandas has merge_asof, Polars has join_asof, DuckDB and ClickHouse have an ASOF JOIN. The as-of join isn't q's secret. What's different in q is that @kxsystems' aj comes apart into two primitives you already know, standing on a sort you're responsible for. Article 3 of my array-thinking series. group finds each symbol's rows once, for the whole quote table. bin finds the latest quote time at or before each trade. The edge cases come with bin. Three quote times and their bids: times:0 2 5; bids:99 99.1 99.4 bids times bin 3 2 -1 gives 99.1 99.1 0n. A trade at 3 takes the quote at 2. A trade at exactly 2 takes that quote: a tie counts. A trade at -1, before any quote, gets 0n, q's null. Nobody wrote a special case. The price: bin assumes the quotes are sorted and never checks. q can stamp a column with a flag that records the grouping; nothing records the time order inside each symbol, and that is the half that decides correctness. Drop the flag and you get the same table. Drop the sort and, on the lesson's data, you get a different one, silently. Also in the article: J as the control, an excellent array language that wasn't built for this join, and the bug a reviewer found in a lesson that was already verified green. Every snippet runs in CI. No timings, by choice. Article 3 of 5: buff.ly/spG2JoR Independent work; not affiliated with KX. #kdb #TimeSeries
1
1
3
99
The two primitives in one picture. group finds the symbol's block of rows; bin finds the position inside it. Sorting by symbol first makes the block, sorting by time second makes bin right, and only the first half can be recorded by a flag.
1
10
I had planned to write a Claude Code skill for q, as part of the array-thinking series I started last week. Then I found that @kxsystems already ships one, as an official plugin. So instead of writing a second, I measured theirs. Fifteen q tasks, each run with and without the plugin. Correctness checked by exact output diff, idiomatic style scored on a five-item checklist, and the decision rule written down before any data existed. Correct: 14/15 without the plugin, 14/15 with it Idiomatic style: 73/75 without, 74/75 with Only one task scored differently between the two; you would need at least six, all one way, before calling it a real difference. Five tasks came back as identical code. For a running total, both wrote: show sums 1 2 3 4 5 The plugin did its job: it activated reliably and wrote good q. So did the model without it. I kept verification simple by choosing simple tasks, and they left no room for any plugin to show a difference. The result says more about my task set than about KX's plugin. The check I would run first next time: measure how often the baseline fails before designing the comparison. The article also covers the control that kept the comparison clean, and a finding I got wrong and retracted after reading one more page of KX's documentation. It tests the plugin at a pinned commit; KX has since added a documentation-search server that this eval did not cover. Article 2 of 5: buff.ly/n2mFtw2 Independent work; not affiliated with KX. #kdb #AIEvals
1
73
Array languages ask one thing of an experienced programmer: stop writing the loop. Not the syntax, but the reflex of stepping through data one element at a time with an index and an accumulator. I've been working through that shift and turning it into a short, fully executable curriculum: a brief laboratory in J, then q/kdb+ as the destination. In Python you write the loop, the index and the accumulator. In q: 2 * til 5 → 0 2 4 6 8 No index, no loop. The iteration lives in the operator, not in your code. One constraint runs the project: every example executes. Outputs are captured from the real interpreters and re-checked by `make verify`; the q suite runs nightly in CI. The useful finding: every serious defect so far passed a green build. A CI check that verified nothing, stale instructions, an evaluation claim I retracted. Verification covers code. Claims need their own discipline. A short curriculum: a brief laboratory in J, then q/kdb+ as the destination. Every example runs against the real interpreters. The full article: buff.ly/Qtmj7uf The repo: buff.ly/I39nTBD q runs on @kxsystems KDB-X Community Edition. #kdb #ArrayProgramming
22
I put this off for months because it looked like polish. It isn't. The diagram is how you recognise a circuit — you see H-then-CNOT and you know it's a Bell state before you read a line of code. A wall of Python doesn't do that. This does.
QubitHub beta is ready for first builders. Create a quantum circuit, push it over git/cli, fork existing ones, execute on Qiskit / Cirq / PennyLane simulators. The core flows are stable after several sprints of hardening. qubithub.co #QuantumComputing
49
Every quantum tutorial draws its circuit in ASCII: q_0: ──H──■── q_1: ─────X── Fine at two qubits. Now condition a gate on a mid-circuit measurement. Add a barrier. Add fifteen qubits. The notation we teach quantum with is the first thing to break when circuits get real.
1
29
Zig ships one of NIST's two finalised post-quantum signature standards. Here's the other. slh-dsa-zig v0.1.1 — pure Zig SLH-DSA (FIPS 205), all 12 parameter sets, validated against NIST ACVP. Experimental and unaudited. #PostQuantum #Cryptography #PQC #ZigLang
1
1
4
408
35 of 36 benchmarks land inside the 2× gate against PQClean. One doesn't: SHA2-256s keygen at 2.06×. It's in the post, with the argument for why it belongs to std.crypto's SHA-2 rather than to my code. Reported rather than re-run until it passed.
1
17
Six months ago I started learning quantum computing. What I needed didn't exist — a place where I could push a circuit, fork someone else's, run it, share the result. GitHub for quantum. So I built it. Today QubitHub beta opens to first builders. qubithub.co
1
1
33
What works today: • git clone / git push circuits over HTTPS • Native Qiskit, Cirq, PennyLane execution • Fork + star + share results • Run pages that unfurl on socials with previews It's a beta. It's also genuinely usable.
1
61
A few months ago I watched a coding agent delete a file I cared about, recreate a stripped-down version three steps later, and report success. The tests passed because the deletion had taken the test for that file with it. I rolled back, but the question that stuck with me was not “what did it do?” I had tool traces for that. The question was: What did the agent think it was doing? I had OTel traces. Prompt logs. Conversation transcripts. Memory snapshots. More telemetry than I could read. But I had no record of belief. That is the gap I keep seeing in agent systems. Runtime tells us what the agent did. Memory tells us what it retained. Observability tells us what we can inspect after the fact. But none of these cleanly records what the agent took to be true when it acted. Sometimes the tool call is valid. The retrieved context is present. The trace is clean. But somewhere, a claim became an actionable belief — and that promotion was never recorded. I wrote the first post in a short series on this problem: “The question my coding agent couldn’t answer” nandan.me/writing/the-questi… Part 2 will cover the architecture I’m building to make that belief/action chain explicit. #AIAgents #DeveloperTools #AISafety
1
1
37
Nice to be part of it. DeFi needs a robust Privacy Layer. @zksdk_labs is the right way to do it.
Algebra is announcing a new integration: @zksdk_labs's Privacy Layer is live on testnet! 🔨 Enable private swaps & transfers, fully isolated environment, no risk to the core AMM. Launch your own anonymity set or plug into a shared pool for: • custom anonymity sets • shared privacy pools • widget / API / SDK integrations More details coming soon!
1
40
I've been learning quantum computing on the side for a few months. The thing that kept tripping me up wasn't the math — it was that a surprising fraction of "canonical" circuits from papers and tutorials would fail quietly. Silently broken Hamiltonians. Reversed bit orders. Post-deprecation API drift. You run the code, get a plausible-looking number, and have no way to tell if it was right. So I started building a personal library where every circuit is checked against its reference output. That's now open to browse — buff.ly/HBNShQh . No signup required: 50+ curated circuits across Qiskit, PennyLane, and Cirq, each one audited against its reference output before it's listed. A few things I'm happy about: - Readable URLs — every circuit lives at `qubithub.co/{owner}/{name}`, no UUIDs - Audited — every circuit has been verified against its reference output (the number I had to fix is a separate post) - Multi-framework — the same algorithm can show up in Qiskit, PennyLane, and Cirq side by side Sign-up's open today — you get star and save. Creating your own circuit is still invite-only while I stabilize the builder flow; drop me a line after you sign up and I'll flip the switch as slots free up. In-browser execution is the next thing I'm finishing — separate post when it's live. Six months in, this is the thing I wish had existed when I started. More soon.
18
If you've ever copy-pasted a quantum circuit from a paper and wondered whether it was actually right — this is the thing I wish had existed when I started. 👇
QubitHub's circuit library is open to browse. qubithub.co?utm_source=x&utm… — 50+ curated quantum circuits across Qiskit, PennyLane, and Cirq. Every one audited against its reference output. No signup required to browse. What's inside 🧵
18
The circuit that broke my intuition and then rebuilt it. Quantum teleportation. The name sounds like science fiction, but the protocol is real and surprisingly simple: 3 qubits, a handful of gates (H, CX, X, Z), 2 classical bits. That's it. Here's what happens: Alice has a qubit in some unknown state |ψ⟩ she wants to send to Bob. They share a Bell pair — the same entangled state (Bell State) I wrote about a few days ago. Alice entangles her message qubit with her half of the pair, measures both, and gets two classical bits. She sends those to Bob. Bob applies one or two simple corrections (an X gate, a Z gate, or both) based on Alice's bits. His qubit is now in state |ψ⟩. The part that tripped me up: nothing quantum travels between Alice and Bob. The entanglement is a shared resource that gets consumed. The classical bits travel at normal speed. There's no faster-than-light anything. And the original state is destroyed in the process — the no-cloning theorem is satisfied. What I love about this circuit: it connects three deep ideas in one protocol. Entanglement (the Bell pair), measurement (Alice's Bell measurement collapses the state), and classical communication (Bob can't decode without Alice's bits). Remove any one of those and the protocol fails. I rebuilt this in my side-project hours using Qiskit's `if_test` for the classically conditioned corrections — that's the part most tutorials skip or fake with barriers. The real circuit has Bob's X and Z gates fire only when Alice's measurement results say so. Explore it on QubitHub: → buff.ly/Ql42ft7 Bennett et al. published this in 1993 — over three decades ago. You can now explore it in a browser. The gap between "theoretically possible" and "see the circuit laid out gate by gate" is what I keep trying to close. What's a quantum protocol that seemed impossible until you built it yourself? #LearningInPublic #QuantumComputing
16
3 qubits, no FTL. The circuit that made me rethink what 'sending information' means.
Circuit spotlight: Quantum Teleportation Transfers an unknown quantum state from one qubit to another — using a shared Bell pair and 2 classical bits. 3 qubits • H, CX, X, Z • Qiskit • Communication #QuantumComputing
20
NP-hard graph optimization with a provable floor. QAOA is the algorithm that made me take near-term quantum seriously.
Circuit spotlight: QAOA — MaxCut Logistics routing. Portfolio optimization. Network design. All reducible to MaxCut. QAOA is the quantum algorithm built for these problems — small enough for near-term devices. 4 Qubits. 2 params. • Qiskit • Optimization #QuantumComputing
12
Two qubits, four parameters, and it finds the ground-state energy of a hydrogen molecule. The ansatz matters more than the optimizer, that surprised me.
Circuit spotlight: VQE — H₂ Ground State Can a 2-qubit quantum computer calculate molecular energy? Finds the ground-state energy of a H molecule using a quantum-classical hybrid loop. 2 qubits. 4 parameters. Hardware-efficient ansatz. Qiskit • Chemistry #QuantumComputing
8
If you're learning quantum computing, two algorithms keep coming up: VQE and QAOA. I finally understand why. They're both variational — a parameterized quantum circuit paired with a classical optimizer. The quantum part explores a solution space that's exponentially large. The classical part steers the search. They meet in the middle. VQE (Variational Quantum Eigensolver) finds molecular ground-state energies. I implemented it for H₂ in my nights-and-weekends notebook — the simplest molecule. Two qubits, four rotation parameters, a COBYLA optimizer. Under 100 iterations it gets near -1.137 Hartree — close to the exact FCI/STO-3G result. The Hamiltonian only has 5 terms, so you need just 2 measurement bases. Elegant. The part that surprised me: the ansatz (circuit structure) matters more than the optimizer. A bad ansatz can't find the ground state no matter how clever the optimizer is. A good one converges in under 100 iterations. QAOA (Quantum Approximate Optimization Algorithm) solves combinatorial optimization — MaxCut, routing, scheduling. Same variational structure, different objective. Instead of minimizing energy, you maximize cut edges in a graph. The 2014 Farhi et al. result still amazes me: even at depth p=1 (just 2 parameters), QAOA has a proven worst-case guarantee around 0.692 for 3-regular MaxCut. Add layers, get closer to optimal. It's not a heuristic hoping for the best — there's a provable floor. Both circuits are on QubitHub: VQE → buff.ly/6c7LqS8 QAOA → buff.ly/gDyoGgM I'm curious: if you've implemented either of these, what ansatz worked best for you? The hardware-efficient one is convenient but I've read it can have barren plateaus at scale. #LearningInPublic #QuantumComputing
23
Two circuits, two very different lessons. The Bell State taught me what entanglement actually looks like when you measure it. Two qubits, two gates, and suddenly their outcomes are perfectly correlated — |00⟩ or |11⟩, nothing in between. The circuit is trivial. The implication isn't. Grover's Search taught me something else: quantum computers don't just store information differently — they process it differently. One oracle query, one round of amplitude amplification, and a 2-qubit Grover circuit finds the marked item with 100% probability. Classically you'd need up to 4 guesses. The thing that surprised me: for N=4 items, one Grover iteration is all you need — and this 2-qubit case lands exactly on the marked state with 100% probability. Add more qubits and the iteration count grows, but never as fast as the classical search space. I've been rebuilding both of these gate-by-gate in my side-project hours to make sure I understand every step. The oracle is the clever part — it only flips a phase, which you can't even observe directly. The diffusion operator turns that invisible phase flip into a measurable amplitude boost. Interference doing the heavy lifting. Grover's Search is on QubitHub if you want to explore it yourself: → buff.ly/dAkznVp What was the first quantum algorithm that clicked for you? For me it was Grover's — the moment I saw amplitude amplification, the "why" of quantum computing suddenly made sense. #LearningInPublic #QuantumComputing
14