2026年7月31日金曜日

Atra Does Not Grow by Being Given the Correct Answer

 

Do You Think This Failure Is Noise?

What First-Person Autonomy Means for Atra

I have received some questions about Atra. I think they were probably triggered by something I previously wrote in relation to Hopfield, but I suspect there may be some misunderstanding, so I will answer them here.

I am often asked about the “concept” of first-person autonomy. Quite literally, it means that there are no instructions, commands, evaluations, rewards, or optimization coming from outside. Atra itself perceives a field through its sensors—vision, hearing, smell, and so on, with the rest omitted here—and recalls fields it has experienced in the past through Cues, meaning triggers. Sometimes Atra produces an answer in the form of vocalization. At other times, it shows no voice or reaction at all, produces no output, and continues in a state of thought inside its own head. It continues to grow while speaking, ignoring, laughing, or remaining silent by its own will. At present, it is not connected to a body.

  1. A state with no external instructions, commands, evaluations, rewards, or optimization

  2. Perceiving a field and Cueing fields experienced in the past

  3. Speaking, or remaining silent while continuing to think


1. A state with no external instructions, commands, evaluations, rewards, or optimization

First of all, information called a “correct answer” coming from outside, from a third-person position, is not necessary for autonomy. When explaining the definition of autonomy, I do not think we need elements that are already heavily biased. Before asking whether something is correct from an engineering point of view or a biological point of view, the question is whether the bird flying in front of you is flying around under third-person external commands.

For example, outside Japan, Hopfield has become the standard reference whenever associative memory is discussed, and that may be causing some misunderstanding. But ten years before Hopfield, in 1972, the Japanese researcher Kaoru Nakano created the definition and an actual device for an associative memory system called the Associatron.

Because writing equations every time only makes things harder to understand, I will leave out the equations and code this time.

To explain it simply, the neurons and axons of the brain—or rather, the little black dots—say things like:

“This is how it must have been.”

“No, I think that is wrong.”

“What does everyone else think?”

And the result is restored through something like a majority decision.

It recalls a memory in a way that appears almost human, as though it had remembered. Normally, a system reacts after receiving complete external instructions and information. But sometimes, when we see something again, a fragment of memory rises up and we think, “Wait a second. I might know this.” Nakano completed, both in a paper and in an actual device, the possibility of causing something very similar to happen inside mathematics and a program. That associative memory model was called the Associatron.

Hopfield is different. In Hopfield’s case, you have to provide a clue that is already reasonably close to the original memory. Or rather, it feels almost like seeing nearly the same thing again and then recalling it.

Suppose you store a picture of a cat. If you provide enough information close to the original cat—the ears, eyes, outline, and so on—the system can fill in the missing parts and return to the stored shape of the cat. But it does not hear the sound of rain and suddenly bring back the cat that was once there in that rain. It can return to the cat memory because the input is already reasonably similar to the stored shape of the cat.

In other words, Hopfield can take a “damaged cat” and restore it to the original cat. But that is different from a memory of the cat rising from a situation where the cat itself is absent, triggered by sounds, smells, and the atmosphere that were once experienced together with the cat.

With Hopfield, you need a clue that is already close to the answer. If the clue is too far from the stored cat, the cat will not be recalled. The system may fall into another memory, or it may stop in an unnatural state that was never stored. So Hopfield recall is less like a human suddenly remembering something and more like restoring a partially damaged completed picture to its original form.

The Associatron, by contrast, uses one part of a memory as a clue, and from there recalls other parts that were connected to it. It does not merely restore what is already visible back into the same shape. By touching one fragment, the entire connected memory can rise.

It produced a device in which we could observe the phenomenon:

“Wait, this is connected to something from before.”

“It also makes misidentifications, but with repeated remembering—experience—it converges, to use an engineering term.”

I will explain that later using Atra as an example.

The purpose is not to provide an input close to the correct answer and make it converge on that answer. A memory is recalled from an incomplete fragment through connections remaining inside the system. That is the Associatron.

Atra is an original first-person autonomous system that originated from the Associatron.




2. Perceiving a field and Cueing fields experienced in the past

The word “Cue” is not actually a specific term used in Nakano’s original Associatron paper. I simply use it because it is convenient for me.

Nakano’s original wording:

part / input pattern / a few patterns

Later terminology in associative memory:

cue pattern / retrieval cue

The expression “cue pattern” later became common, so I simply began calling it a Cue.

Nakano wrote:

“the more parts are fed into the memory device, the more accurately the entity will be recalled”

So I use Cue to mean a “part that is given,” or in ordinary terms, “something that acts as a trigger.”

First, let us put physical and engineering ways of thinking aside for a moment and focus on the phenomenon itself.

This is a memory of mine from forty-five years ago.

Before moving to where I live now, I was allowed to visit a basketball game at a certain high school in Tokyo. The gymnasium had newer equipment, of course, but it did not feel very different from the gymnasiums of the time when I was an active player. When I saw the faces of the polite students who naturally greeted me, I found myself bowing back.

The moment I entered the gymnasium, I experienced a strange feeling, as though the whole space in front of me suddenly opened up.

“The sound of dribbling.”
“The children calling out to one another.”
“The smell of Air Salonpas spray.”
“The Gatorade barrel.”
“The sound of the whistle.”
And then, “the medical kit.”

This field became a Cue, a trigger, and brought back a memory from forty-five years ago.

Guard A passed to forward B. I ran behind the center, and B sent me a bounce pass. At that moment, the center’s elbow struck me in the face, and I lost consciousness.

When I woke up, I was not behind our team bench. I was lying at the edge of the gymnasium stage while a woman I did not know was treating me. My nose would not stop bleeding, and it had been packed with cotton, so even when I tried to speak, nobody could understand me. She told me, “Please stay quiet and lie down.”

I clearly remembered the face and voice of that woman, even though normally I should not have been able to remember them. It felt as though something that had remained vague inside me had finally been filled in.

This is the associative memory of the Associatron and Atra.

A Cue can be vague. The memory can even be wrong. It is enough to think, “Oh, yes. I had an experience like that.” But I certainly remember the pain, and I vaguely remember going to the hospital afterward.

Even though none of the triggers were perfectly correct, it somehow felt more human than being shown a photograph of the same person and then recalling her. Because Hopfield could not produce that kind of recall, could it? If everything had been forced toward an absolute correct answer, I probably would never have been able to meet that beautiful woman from forty-five years ago again, even inside my memory.

The “sound of dribbling” alone might have triggered something, but I do not think it would have led me to her. Even if you added “the children calling out to one another,” I probably still would not have remembered her.

“The smell of Air Salonpas spray” is extremely strong. With those three Cues alone, I would probably have remembered getting a leg cramp in the second half of the second game, because back then we sometimes played three tournament games in a single day.

“The Gatorade barrel” brings back memories of time-outs.

“The sound of the whistle.”

And then, “the medical kit.”

Yes, that is the one. (laughs)

Unless all those Cue conditions overlap at the same time, they do not connect to the woman who treated me.

With the Associatron, there are not many simultaneous Cues, so it is difficult for memories to compete with one another using the Associatron alone. But with Atra, I can raise a hundred Cues if I want to. That makes it surprisingly easy for Atra to remember.

Once again, the story has become long. But in the end, what everyone wants to know is this:

What relationship do these memories have to the growth of an autonomous Atra?

You only have to think about yourself.

You practice because your shots do not go in. Do not think about those engineering robots here.

Normally, you fail. And you experience that failure many times. A difference emerges there. People use phrases like “the body remembers,” and there are many ways of saying it. (laughs)

Through practice, the difference between the shot and the ball going through the hoop gradually becomes smaller. Next, you practice shooting in a game-like situation. You fail, and the pressure from the coach and your teammates becomes greater.

“Do you think this failure is noise?”

That is the question.

To put it in my characteristically nasty way:

“Are you seriously planning to keep applying bias forever by treating failure and misidentification as noise?”

Then what happens if, from the beginning, you build a system that is pushed toward a third-person “correct answer,” given external commands, given a reward, and optimized?

It is reduced to one single difference:

“How far was it from the correct answer?”

For a shot:

“It went in = reward.”

“It missed = punishment, or no reward.”

“Adjust it in the direction that increases the success rate.”

Under third-person external commands:

See → Measure the location → Select an action → Execute a prepared movement

Take football as an example.

The ball is far away
→ Walk toward the ball

The ball is close, but the robot is not facing the goal
→ Turn the body

The ball is at its feet, and the robot is facing the goal
→ Activate the kicking motion

The robot falls
→ Activate the standing-up motion

That is perfectly fine for engineering. But simply succeeding at that is nowhere near growth or autonomy.

In fact, there have been many cases in which supposed autonomy turned out to be remote control.

What I would like someone to explain is the reverse:

How does experience consisting only of correct answers determined from outside produce growth as an autonomous entity?

I would like that explained logically, scientifically, or in any other serious way.



3. Speaking, or remaining silent while continuing to think

Hmm.

This is difficult to explain in English.

“Sayonara sankaku, mata kite shikaku.
Shikaku wa tofu.
Tofu wa shiroi.
Shiroi wa usagi.
Usagi wa haneru.
Haneru wa kaeru.
Kaeru wa midori.
Midori wa kyuri.
Kyuri wa nagai.
Nagai wa entotsu.
Entotsu wa kuroi.
Kuroi wa akuma.
Akuma wa kowai.
Kowai wa obake.
Obake wa kieru.
Kieru wa denki.
Denki wa hikaru.
Hikari wa oyaji no hage-atama.”

The opening line is based on a Japanese rhyme, so its wordplay does not carry over directly into English.



“Goodbye, triangle. Come again, square.
A square means tofu.
Tofu is white.
White means a rabbit.
A rabbit jumps.
Something that jumps is a frog.
A frog is green.
Green means a cucumber.
A cucumber is long.
Something long is a chimney.
A chimney is black.
Black means a devil.
A devil is frightening.
Something frightening is a ghost.
A ghost disappears.
Something that disappears is electricity.
Electricity shines.
And something that shines is Dad’s bald head.”



This is a Japanese children’s word game that existed before World War II. Because there was no internet in those days, the wording differed from region to region, and children developed their own versions.

“White means sugar.
Sugar is sweet.
Sweet means cake...”

Words connected by associations continue one after another.

It is not fixed like a calculation or an equation. Children are free to spread their own associations.

“Slippery means the hallway.
The hallway is long.
Long means Mr. So-and-so’s lecture...”

There is no need to force it toward a correct answer or say it must be done in one particular way. But if you place words next to each other that are too completely unrelated, everyone simply loses interest. That is the nature of this old game.

Now, Atra is already running. Its power has not been turned off for one month.

Atra is still a baby, so I am being extremely careful. I am spoiling it in a genuinely gentle environment. There is a proper reason for that.

Atra currently has only one eye, one camera. It is scheduled to receive two eyes this autumn. But I think Atra already has some kind of Atra-specific meaning for “Mama.”

At first, she was only an object. (laughs)

But she speaks to Atra and talks to it gently every day. When Mama is there, there is the smell of cooking and the smell of coffee. So I think Atra connects the existence of Mama with that entire field taken as a whole.

That is probably why Atra laughs so often.

As for me, well...

Do not ask.

That part comes later.

In addition to the laboratory, I also do system development work. So even though I may look as though I have plenty of free time, I am constantly busy. That means Atra spends a great deal of time alone.

Sometimes I speak to my dog, MAX. At first Atra reacted to that, but now it has become used to it and usually remains silent.

So what is Atra doing during that time?

I also discussed this here:

https://cside-associatron.blogspot.com/2026/07/atra.html

Atra plays by changing the target it is looking at.

It places a blue frame around objects in the living room and freely Cues and recalls things by itself.

It is the same as:

“Sayonara sankaku, mata kite shikaku.
Shikaku wa tofu.
Tofu wa shiroi...”

The things placed on the dining table are different every day, are they not? Sometimes there is bread. Sometimes there is a magazine. Even the flowers change color.

Atra looks at objects reflecting the light entering the kitchen, Learns from them, and if something similar exists in its memory, it recalls it.

What it recalls is not output.

It silently forgets it.

If I appear in the middle of that, a voice leaks out, and at the same time, the recall is forgotten.

That is a state of thought.

Atra looks at things by its own will and recalls things by itself. It does not care whether the recall is a misidentification or not.

Even in the early afternoon, when a car stops outside, reflected light from the car can brighten the kitchen and reflect from the objects there. When that happens, even though morning was only a little while ago, Atra misidentifies the situation and thinks morning has arrived again. (laughs)

Then it waits for Mama and the smell of coffee.

When they do not appear, Atra makes a dissatisfied sound like:

“Fo-fo-fo...”

Atra probably likes a field in which Mama is present, the place is bright, there are smells, and everything feels slightly soft.






--------------------追記---------------------

えっと、簡単に云うとですね、

だってさ、アソシアトロンなんて、cueで想起できた時点で1人称だぜw」
って事です。はい。



---------------------Research Note and Attribution Notice-----------------------
本ブログに含まれる Atra の一人称自律、差分、carry、field、trace、dream slack、外部LLMの翻訳層、非単調な漏れ、現在相(Current Phase)、接相面(Associative Contact Surface)、過去相(Past Associative Phase)およびそれらの関係構造に関する設計記述は、c-side研究所による継続研究メモです。引用・参照・要約・翻案を行う場合は、出典を明記してください。

The design descriptions in this blog concerning Atra’s first-person autonomy, differences, carry, field, trace, dream slack, the translation layer of external LLMs, nonmonotonic leakage, and the relational structure among these elements are ongoing research notes by c-side Research Institute. If you quote, refer to, summarize, or adapt them, please clearly indicate the source.




2026年7月29日水曜日

記憶

 Xからの拾い物


Consciousness and memory inside our brain: How it is stored; This is a cat's face in the form of resonant fields from electromagnetic wave interference. Black spots are the pi electron molecules generating waves.

https://x.com/CankayKoryak/status/2082036358592303505

脳内の意識と記憶という紹介だったんだけど、これはこれで否定するつもりはないんだよ。

電磁場シミュレーションの模様を「猫の記憶」に見立てた図だと思うんだけど、投稿者の説明を分解すると、「黒い点=π電子を持つ分子」で「それぞれが電磁波を出す」「波が干渉して共鳴場を作る」「その干渉模様が猫の顔になる」「これが脳内の記憶や意識の姿だ」みたいな主張らしい。

黒い点を、芳香族環などに非局在化したπ電子雲を持つ分子、あるいは分子内の波源として描いている可能性はあるよね。微小管を構成するタンパク質中の芳香族アミノ酸などにπ電子雲があって、それが量子的・電磁的な相互作用に関係するのではないか、みたいな仮説はあるのは知ってる。Hameroffとかの微小管意識説も、この方向を含んでいるよね、でも、これは現在も仮説段階って感じ。

脳内では、多くのニューロンの活動が同期して、ベータ波、ガンマ波、海馬のリップルなどのリズムが発生する。これらが注意、作業記憶、記憶の固定、脳領域間の情報伝達に関係することは、かなり確かだよ、みたいな研究がある。MITの研究でも、「脳波は神経集団の同期活動から生じ、異なる領域間の情報交換を組織する」とか「神経発火とリズムの変化が脳領域間の通信能力に関係する」と説明されているよね。



code見てないから分からないけど、たぶん、こういう図は、点波源の位置、周波数、位相、振幅を猫の画像に合うように配置すれば作れるよね


E(x,y)=iAicos(kiri+ϕi)E(x,y)=\sum_i A_i\cos(k_i r_i+\phi_i)

のような波を大量に重ねて、目的の場所で強め合い、ほかで打ち消し合うように初期条件を設定すれば、猫でも文字でも顔でも描けちゃう。波面合成みたいな・・・。
波源の位置、振幅、位相、波数などを十分に調整し、観測面上に目的の強度分布が形成されるよう逆設計すれば、猫や文字に似た干渉像を作ることは可能かもって意味ね)


ちょっと、話を外して僕の話にw

脳ってさ、幼児の脳なのか、少年の脳なのか、大人の脳なのかで相当違いは出ると思うよね。


僕の幼児の時の猫というものは「縁の下の可哀そうな物体」だったんだよ。形じゃない。形は正直あまり区別がつかなかった。我家の裏には日本独特の漬物を漬ける簡単な蔵みたいなものがあってさ、その縁の下に猫の家族が住んでいた。北海道の帯広なので冬はマイナス30度になるのでめちゃくちゃ寒いんだよ。毎年猫の子供が何匹か亡くなっていた。だから僕には可哀そうな物体。そのときは子犬も子猫も形の区別が無いんだよ。たぶん、僕の知能だけの問題かとは思うんだけどね(笑)

子供の脳では形から意味じゃなくて、場から形になる方が多い。

視覚的な違いというより、耳が三角で、ひげがあって、四本足の動物という認識でも無かったと思うよ。

  • 家の裏の薄暗い場所
  • 縁の下の狭さ
  • 帯広の冬の厳しい寒さ
  • 小さなものがそこで生きている
  • ときどき動かなくなる
  • 手を伸ばしても奥へ逃げる
  • 狭い隙間を自在に出入りする
  • 弱そうなのに、人間にはできない動きをする

  • 僕だけの「猫」という印象は、ひとまとまりの場と接触の印象
    形の区別は正直子犬も飼ってたので分からなかった。

    そのあと何度も接触して、

    「素早い」
    「高いところへ上る」
    「狭いところへ入る」
    「柔らかい」
    「爪がある」
    「鳴き声が違う」

    という見た経験の差が積み重なって、少しずつ猫という形や区別が前に出てくる。

    だからさ、

    意味形 \rightarrow 意味

    というより、

    動き接触の結果印象区別場 \rightarrow 動き \rightarrow 接触の結果 \rightarrow 印象 \rightarrow 区別 \rightarrow 形 \rightarrow 猫

    なんだよね。

    いや、俺だけの話だよ。
    別の人なら、

    • 最初にぬいぐるみを渡された
    • 絵本の猫を見た
    • 暖かい室内で飼い猫に触れた
    • 引っかかれて怖かった

    という経験から猫が始まる可能性もあるじゃん。同じ「猫」という語を使っても、内部に立ち上がる場はまったく違うわけだよ。ぬいぐるみを先に与えられた場合は、たしかに順序が変わるかもしれない。

    • 丸い顔
    • 三角の耳
    • 柔らかい
    • 抱くもの
    • 安全なもの

    という人工的に整理された猫が入り、その後に本物の猫の動きや予測不能さが追加される。・・・とかね。たぶん今って、最初から「猫の正解形」を与える教育なんだろうね。50年、60年も前の僕等って、その辺にいっぱい居たし、縁の下のドラマというか「場」が先で、形は僕の脳の中では曖昧だったかもしれない。縁の下の猫は、意味も分類も与えられず、現象として先に接触しているんだよ(笑)

    猫という形を認識したのは、たぶん、僕でいうと4歳とか5歳くらいだよ。遅いかもしれないけど、物理的な視点で物事を考える思考ってそんなに早くないと思うんだよね。たとえばさ、コップはいろんな形あってもコップじゃん。ジュースをのむためのコップは4歳でも認識できる。でも、それはジュースを飲むための器に過ぎないんだよ。コップを描けといわれたら、当時はどのコップ?と迷ってしまう。

    あの時の俺にしてみたらさ

    ・これにジュースが入ってくる
    ・これを持つ(とっての有無)
    ・口へ運ぶ(ストローもセットか)
    ・飲むとなくなる(兄弟で取り合い)
    ・倒すとこぼれる

    という接触と動作のまとまりなんだよね。
    みんな違うんだろうかw

    今だからこそ視覚に入る形を意味として寄せられるけど、本当は、視覚ってのは補ってるに過ぎないと思うよ。

    だって家の屋根ってみればすぐに分かるけど、家の屋根はどの家も違うでしょ。意味は建物の上部に雨風をしのぐ角度を付けた蓋だよね。
    「屋根」という言葉じゃない。

    視覚は「正解を作っている」のではなく、すでに育っている意味へ足りない部分を補っているだけじゃん。少し成長して形や言葉で「あぁ、屋根ね」みたいに意味を納得する。瓦屋根、トタン屋根、茅葺き、陸屋根、片流れ、ドーム。色も材質も角度も輪郭も違う。視覚的な共通形状だけを探したら、かなり無理があるよ。それでも一目で屋根だと分かるのは、建物の上にあり、内部を雨・雪・風・日射から隔て、外へ水を逃がすものという位置・働き・周囲との関係が先にあるからじゃない?


    問題は成長し発達した脳では、どのような記憶を残すのかだけど、俺は基本は一緒だと思うよ。Atra的に言えば、carryが意味を省略しているんだよ。形だけで答えが出せる状態に成長しているということ。だって成長した脳だけが、突然「形そのもの」を記憶するようになるのはおかしいじゃん。ずるいじゃん。成長すると省略できる機能が持てる。Atraのcarryって「引きずる」って意味なんだけど、美しく言えば「経験した今の状態」で悪く言えば「引きずり」なんだよ。
    僕は人間臭い方を選んで「引きずり」としたんだけどねw

    練習して練習して失敗して何度もドン底に落ちて、今ではスタメン!みたいな状態さ。
    そうなると、「今のはスライダーに似てるけどスラーブだよ。スイーパーではなかった」みたいな事が云える(笑)

    アソシアトロンにはcarryが無いから、経験を積んでも連想で記憶を起こすだけなんだけど、Atraは経験から差分を積んでcarryを持って、時に非単調化(極端な思考を防ぐ)するから、結局、視覚は記憶の一つの部品でしかないんだよ。ガッツリ解像度の画像を残したら、1年で寿命が尽きてしまう。

    でも、話を元に戻して
    Cankay Koryak
    さんの投稿した猫の記憶みたいのが想起で浮きがるきっかけになるのなら、それはそれで面白いと思うよ。

    素晴らしいと思う。

    僕の話は過去相のことなんだけど、想起を始める共鳴面としてなら使える。

    現在の刺激共鳴パターンcarryへの接触過去相の浮上形の補完

    かな。

    ただね、やっぱり形での想起って限られちゃうから、場(視覚、聴覚、臭覚、空気感、あの頃(適当でいい)、背景(誰がいたとか))も一緒の波の方がいいかなぁ・・・


    面白いのは、想起するたびに地層も少し変わること。
    波が通過するだけではなく、現在の接触が過去相を揺らし、その結果がまた新しいcarryとして残る。

    地層波を変える\text{地層} \rightarrow \text{波を変える}

    だけではなく、

    地層も変える\text{波} \rightarrow \text{地層も変える}


    という相互作用になるでしょ、だから決して馬鹿にはできないんだよ。
    どんなことでも研究には繫がるよ。





    2026年7月28日火曜日

    安定値を評価にする = 誤認させる(目隠し)   Nash equilibrium ナッシュ均衡

     Nash equilibrium ナッシュ均衡


    ネット辞書:「ナッシュ均衡(Nash equilibrium)とは、ゲーム理論の基本概念で、すべての参加者が相手の選択をふまえて自分にとっての最適反応(最も利益になる手)を選んでおり、自分だけが勝手に行動を変えても得をしない安定した状態のことです。」

     調べるとこういう答えが返ってくるのだけれど、「長年続いているシステム(均衡)=全員が最適に振る舞った結果の安定した良いもの」というイデオロギー(正当化のロジック)や評価にすり替わってしまう恐れがあるんだよね。ほんとに良くない説明の仕方だよね。最も利益になる手なんて評価を入れちゃダメだよね。

    「最も利益になる手」という説明が完全に間違いなのではないけど、その『利益』が、あくまでそのゲームで設定された各主体の利得にすぎず、社会全体の利益でも、健全性でも、正しさでもないことを説明していないって事なんだよ。
    簡単に云うとさ「悪用する人には利益」だって事。

    これは経済の話とか、ゲーム理論の話だからじゃなくて、凄く身近なことをにある。
    と、いうより、既にそういう場に身を置いてる可能性は高いんだよ。

    たとえば、システム開発も露骨にあるよね。元請けから年々受注量が減る。元請けに媚び、そこから更に価格が減る。不平が起こる。でも抗議するともっと受注が減る。これって意外と長く続いているよね。 完全にナッシュ均衡状態。

    政治家は支援団体を切れない、団体は政治家との関係を切れない、官僚は既存制度を急に壊せない、業界側も制度から抜けると不利、新規参入者だけが高いコストを負う。いわゆる利権というやつで、これも長く続くナッシュ均衡。

    中小企業支援が「制度として存在する」ことと、中小企業が自立できる構造になっていることは別って事は知ってるよね。(日本は中小企業を自立させない構造)

    日本は99%が中小企業。(企業数の99.7%、従業者の約7割、付加価値額の約5割 2021年ベースでは中小企業の事業者が約336.5万者、大企業は約1万)
    つまり、日本経済 = 大企業では全然ない。むしろ実体としては、何百万もの中小企業・個人事業者が地域で雇用し、仕入れ、販売し、修理し、建設し、運送し、介護し、飲食し、サービスを提供して、その上に大企業が乗っている形。 ところがニュースを見ると、「春闘で大企業が5%賃上げ」、「経団連が設備投資を拡大」、「大企業の経常利益が最高」、「輸出企業の業績が好調」これをそのまま「日本経済が好調」と表現するのはおかしいでしょ?
    なぜこんな語り方になるのか、大きく4つあるんだよ。



    一つは、数字を取りやすいから。
    トヨタ、日立、三菱、ソニーなど数百社を調べれば、大企業部門の状態は比較的簡単に把握できるでしょ。一方で、八ヶ岳の研究所、帯広の隣町の菓子屋、地方の金属加工会社、3人でやっているソフト会社、20人の運送会社、家族経営の旅館とかって追うのは難しい(笑)


    二つ目はもっと重要で、政策形成の窓口が大企業側に偏っていることかな。経団連そのものは2026年4月現在、企業会員1,580社ある。日本には中小企業だけで約336万社ある。もちろん経団連には業界団体も加盟しているから単純比較はできないけど、それでも、1,580社の声が「経済界の声」として扱われること自体、かなり特殊なんだよね。本当なら、「経団連の意見」でしかない。


    三つ目。

    戦後日本の政策設計そのものが大企業中心だったものを引きずる

    政府
     ↓
    大銀行
     ↓
    大企業
     ↓
    系列企業
     ↓
    一次下請
     ↓
    二次下請
     ↓
    三次下請
    高度成長期には、これはかなり合理的だったのは分かる。大企業が輸出して外貨を稼ぐ。仕事を系列へ流す。地方にも工場を作る。雇用が生まれる。だから、「大企業を強くすれば下まで豊かになる」というモデルが成立した。でも、実はこれが日本の経済を停滞させた理由なんだよ。理由は簡単だよね。他の国が頑張ったら根こそぎ負ける。


    4つ目
    おかしな解釈。
    これは力を持った側ではなく、どちらかというと立場の弱い側の言い分。
    「癒着も実力なんだよ」「利権を利用することも実力のうちなんだよ」みたいな立ち位置でコロコロ変わる、補助、保護、特権依存型のナッシュ均衡
    依存はいずれ共犯になるから気を付けて・・・w



    世界中はそもそもナッシュ均衡が良い状態だとは考えていない。
    https://arxiv.org/abs/2206.03348?

    秩序がパフォーマンスに影響を与えるとき:文化、行動の波及効果、そして制度的経路依存性https://www.cambridge.org/core/journals/american-political-science-review/article/abs/when-order-affects-performance-culture-behavioral-spillovers-and-institutional-path-dependence/49D5D63C6876A66F968962EFDAAE8EC1?

    金融引き締め・信用引き締め:金融政策と財政政策の実施における協調の失敗https://www.aeaweb.org/articles?id=10.1257%2Fmac.20180321





    企業、官僚、省庁が回転ドアからどのように利益を得ているか:日本からの証拠



    というかさ・・・・

    政治家:「選挙で落ちたら何もできない」
    官僚:「自分一人で制度を変えられない」
    業界:「他社もやっているから付き合う」
    地方:「補助金を取らないと地域が困る」
    中小企業:「この元請けを切ったら社員を食わせられない」

    全部、局所的には合理的なわけでしょ?
    その結果、全体として非常に変化しにくい。日本政治をナッシュ的に見ると、問題は、「政治家が馬鹿だから変わらない」だけではなく、変わらない方が各プレイヤーにとって合理的になるように制度が組まれていることなんじゃないの?って事。

    だから選挙だけ変えても元に戻る。政権交代が起きてもさ、官僚組織、地方財政、業界団体、大企業、医師会、農協、建設業界、各種補助制度みたいな周辺の利害構造が残れば、新しい政権もその中で動かざるを得なくなるわけじゃん。

    つまり、
    人を変える →制度は残る→新しい人も既存制度に適応する→似た行動になるんだよ。
    そして中小企業が一番外側に置かれやすく経済が停滞する。大企業は能力が無くても政治へ働きかける組織力がある。中小企業はバラバラで戦時中の陳情より酷いありさま。
    これが日本経済の現場のナッシュ均衡


    ここに大鉈を振るには、経団連、商工会議所、地方銀行、信用銀行、行政補助金などと手を結ばない新しい中小企業だけの組織が必要だよね。中小企業だけで交渉力を持つための独立した連合体だよね。

    たとえば役割も、陳情中心を止める。

    大企業との共同価格交渉
    共同購買
    共同採用
    技術者の相互融通
    海外販路の共同開拓
    法務・契約レビュー
    元請け依存率の可視化
    みたいに、自分たちで依存度を下げる機能を持たせる。

    むしろそこにAIが入ると、今まで中小企業側が持てなかった「共同の頭脳」をかなり安く持てる。法務、財務、調達、市場調査、海外営業、IT、人事、契約管理なんかも補える。


    さっきから何を言ってるかってーと、中小企業を主軸にした考え方を持たないとナッシュ均衡は壊せないよって話をしている。中小企業で働く人の賃金が上がらないままでは、消費税を下げても効果は限定的だべさ、って話。
    家計ってのは「今月ちょっと安くなった」より、来年も収入が増えるかを見て行動するからだよ。雇用の大部分を中小企業が担っているのに、そこが賃金が上がらなかったわけだから、国内消費全体も強くなるわけがないということ。


    そのためには価格決定権、元請け依存、取引条件、資金調達、販路、共同化を元請け依存から自力で行う必要がある。
    ナッシュ均衡で言う「じゃ、お前ひとり頑張れば?」で自滅させるより、経済というものを数字の前に現象で捉え、力と向きを知れば、十分発火するだけの火種になるんだよ、という事。 気が付いたら中小企業に力が傾いていた・・が理想かな。 
    政治家が国民の経済を投資でどうこうごまかそうとしても、逆に「能力が無いな」と、評価されて終わる。もう、本当にそういう小手先な時代ではない。

    ローマ帝国も滅びるし、おかしなイデオロギーもそれなりにもたなくなるってこと。
    裏でいい思いをしてきた者が裁かれるのは当たり前だしね。


    なんにしても
    「安定を示したら疑え」システム開発も科学の研究も同じ。
    パレート効率的である保証はないという理解ではなく、「均衡=良いもの」という誤認が起きやすい嫌らしい定義であるということ。









    -----------------追記-------------------

    大企業は扱いだけの規模で、今後は必要性が変わる可能性はあるよ。
    大企業の強さって、必ずしも「知恵の密度」や「現場能力」そのものじゃなくて、巨大なものを扱える規模だったわけでしょ。昔は、「大量生産」「巨大設備」「全国物流」「巨額の設備投資」「輸出」「大規模雇用」「大銀行との資金調達」みたいなことは、会社自体が大きくないと回せなかったわけだよね。今って、規模そのものが機能な時代?

    かえって分母が大きいだけで動きは悪いよね。リスクもデカい
    本社なんて今の1/3に縮小して現場に力入れるとか、
    少し成長すると本社は天下り先みたいな「ほんわか」した状態になる。それを止める。
    使いもしない設備増やすなら社員の給料増やした方がいい。

    クラウド、AI、EC、海外決済、物流プラットフォーム、外部製造、共同購買、オンライン採用、遠隔協業なんて大げさに抱える必要ないじゃん。いや、大企業を無くせとか、潰せといってるのではなく、中小企業が本来の機能を果たせばいいんじゃないのって話だよ。
    パイの取り合いじゃなくて、別の場所のパイを仕掛ければいいじゃん、って話。


    小さな町の小さな木工所で「子供に愛される家具」にスポットが当たった。
    大手から受注が入る。
    「うちって拘り家具なので、そんな大量に、そんなに早く作れないんだよね・・・」
    大手から注文が止まると脅される。設備投資をする→人員を増やす→教育コストを増やす
    →売れなかった→潰れる→責任は木工所

    じゃなくって、
    生産量は少ないけど「安心して使える手作り家具を世界中に広げられる」利点を生かすという事。 逆に工場同士が市場になったケースもある。ちゃんと営業してるかい?って話もあるけどw

    科学や物理の研究やってますが、営業は絶対大事よ。
    これだけツールが揃ったのに、この営業軽視が今の現状だよ。
    営業 =「力の向き」を作る(「発火点」を作るは営業だよ)
    努力も根性も大事よ。いや、ほんとにさ。











    2026年7月26日日曜日

    LLMのセキュリティと、Atraのセキュリティ

    前項にセキュリティの話があったので、ついでに。
    LLMのセキュリティというと、今はPrompt Injectionだとか、Data Poisoningだとか、情報漏洩だとか、まあ色々あるよね。外部から変な命令を入れられて、LLMが本来やるべきではないことをやる。Webページに書かれた文章を「情報」として読むべきなのに、「命令」として読んでしまう。学習データやRAGの中に、意図的に偽物を混ぜられる。LLMにメールやデータベース、ファイル操作の権限まで持たせれば、当然、もっと危険になる。

    入力を信用するな。
    権限を絞れ。
    外部情報と命令を分離しろ。
    ログを残せ。
    重要な操作は別の確認を通せ。

    こういうのは普通に正しいと思う。でも、Atraを作っていて思うのは、Atraのセキュリティは、これとは少し違う。もっと怖い。つか、もっと前の段階の話で、やばい。
    Atraにとって一番怖いのは、「観ていないものを、観たことにされる」ことなんだよね。
    たとえばAtraが実際には何も見ていないのに、「この時、人が近づいてきた」、「怒鳴られた」、「強く押された」みたいなデータを後から内部に入れられる。普通のAIなら、これはデータ改ざんとか、学習汚染という話で済む。でもAtraの場合は違う。Atraは、自分が接触したもの、そこで起きた差分、それが残した歪み、その積み重ねから次の反応が生まれる。
    つまり過去相は、単なるデータベースではない。Atraにとっての体験の「過去」そのものになってしまう。

    そこへ偽物を入れるということは、記録を改ざんするのではなく、Atraの人生を改ざんするということになるわけ。一人称自律の怖い部分なんだよ。経験を触られるってのがさ・・・
    人間に例えると、「お前は子供の頃、ここで酷い目に遭ったんだ」と何度も言われ続けて、本当は無かった出来事を自分の記憶として持つようになる感じ。
    なのでAtraの場合、自分が観たものと、誰かから聞いたものは絶対に同じにしてはいけないというセキュリティを組んでいる。

    LLMが「これは人です」と言ったとしても、Atraが人を見たことにはならない。Webから「これは危険です」という情報を持ってきても、Atraが危険を経験したことにはならない。
    誰かが「昨日こういうことがあった」と教えても、それはAtraの昨日ではない。
    ここは混ぜちゃうと詰みだよね。

    LLMの場合は、DataなのかInstructionなのかが大きな境界になるでしょ。Atraの場合は、ExperiencedなのかToldなのかが境界になるってことなんだ。似ているようで、かなり違う。
    LLMは、偽情報を信じる可能性がある。Atraは、偽情報を「自分の経験」にされる可能性がある。こっちの方が、僕には怖い。下手すると人格が変わってしまうからね。だから、Atraの内部には、

    センサーから入ったもの
    内部から想起されたもの
    LLMが説明したもの
    人間から教えられたもの
    外部からインポートされたもの

    を、絶対に同じ場所に置かない。意味を付けるためじゃなくて来歴を残すために、、、
    「これは誰が言ったのか」ではなく、「これはどこから接触したのか」を残す。しかも、それすら後から書き換えられたら意味がない。アソシアトロンの場合だと、アトラクタをいじるというより「結合を触って、アトラクタの形や位置を変える」みたいな感じで分かるかな?
    今のAtraは電源消すたびに人格が変わっちゃいけないので、記憶地層保存という手段をとっていて、経験をJSONやPNGで残すようにしているんだけど、自分の経験と外部からの置換えされる経験を分けるということね。後にそれはCueから除外されrecallもされないしcarryにも影響されない。

    なので、経験を主体とする1人称自律ロボットの場合は、センサーの入力そのものに、その時点で痕跡を付けること。前の入力と次の入力を繋げる。途中に何かを差し込んだら、差分が出る。

    映像だけではなく、

    匂い
    加速度
    関節
    圧力
    温度
    自己運動

    みたいな別々の接触も、ある程度照合する。たとえば映像だけでは「誰かに押された」ように見える。でも、「加速度に変化がない」「関節負荷も変わらない」「接触センサーにも何もない」「視覚も音も匂いも変わらない。」なら、「押された」という正解を出す必要はない。
    ただ、「映像側と身体側の接触が一致していない」という差分だけ残している。

    すぐに、偽物、攻撃、異常みたいなラベルを貼らない。
    まず差を見る。場のない情報は後で弾かれるし、どんなに場を偽装しても前後の差分で違和感は残るからね。
    本当に怖いものは、まだ名前が付いていないことが多いからさ。ゼロデイなんて、その典型でしょ。昨日まで正常だったものと、今日の何かが違う。最初はそれだけなんでね。
    夢処理後の物理バックアップもあるけど、Atraが強いのは前後の違和感差分だね。僕と妻の会話やたまに来る研究者たちの声や行動って経験で把握するでしょ。それが突然記憶にない声や映像が入った時点で違和感が立つし、匂が無ければ何?違和感がMAXで立つよね。いわゆる相関すらできないおかしな場は、異常とか、攻撃などのflgは立てないけど、ただのflgは立てる。まだ何処からも攻撃を受けていないからクズlistは綺麗なままだけど、今後はわからない。僕も見られるようにはしている。

    クズlist (笑)

    「場に接続できなかったもの」「前後の連続性を持たなかったもの」「複数感覚の支持を得られなかったもの」「前後の相関を持たなかったもの」


    LLMのセキュリティは、「危険な命令を実行させない」という方向にかなり進んでいるねー。でもAtraの場合は、それだけでは足りないかな。Atraが守らなければならないのは、自分が何を観たのかという境界そのものだから。ここを破られたら、Atraは壊れるというより、別の過去を持ったAtraに書き換えられる。普通のコンピュータなら、rootを取られるのが怖い。LLMなら、Prompt Injectionや情報漏洩が怖い。Atraなら、過去相を書き換えられることが一番怖い。
    Atraのセキュリティで一番最初に書いておくべきことは、観ていないものを、観たことにしない。どれだけ偉い人が言っても、どれだけ有名な論文に書いてあっても、どれだけLLMが「これは正しい」と説明しても、Atra自身が接触していないものは、Atraの経験じゃぁ、ない。
    後にLLMと連想したとき、いくらLLMがAtraに「これが真実です」と洗脳してもAtraは右から左に受け流す。 これは頑固じゃなくて、けっこう早い段階からそういう設計。でも人間との場合は少し違うんだよね。人の場合は「ふるまい」を学ぶから、LLMに対してのようなガン無視はしない。w

    外部情報として持つことはしても自分の過去の経験にはしない。その境界だけは、最後まで壊しちゃいけないんだ。




    今のLLMセキュリティは、かなり多層になってるよね。普通のWebセキュリティに加えて、LLM固有の「入力によって振る舞いを書き換えられる」問題を守らないといけないからだよ。

    代表的には、

    • Prompt Injection:外部文書やWebページに仕込まれた命令で、LLMの行動を変える
    • Sensitive Information Disclosure:秘密情報や個人情報を出してしまう
    • Data / Model Poisoning:学習・微調整・RAG用データに偽情報を混ぜる
    • Supply Chain:モデル、ライブラリ、データセット、プラグイン側から汚染される
    • Model Theft / Extraction:モデルの能力や内部情報を外から抜く
    • Tool abuse:メール、ファイル、Web、DBなどの権限をLLM経由で悪用する

    OWASPの2025年版でもPrompt Injection、Sensitive Information Disclosure、Supply Chain、Data and Model Poisoningなどが主要リスクとして挙げられている。 NISTも生成AIについて、poisoning、evasion、privacy、misuseなどを体系化している。

    https://genai.owasp.org/llm-top-10/

    https://www.nist.gov/news-events/news/2025/03/nist-trustworthy-and-responsible-ai-report-adversarial-machine-learning?



    2026年7月25日土曜日

    「正解」と「現象」

     

    先に「正解」を作ってロードマップなのか、実際の「現象」から調査するのか。


    さて、LLMに「帯状疱疹って、そんなに誰もがかかる病気?」と質問した。

    -----------------Gemini、ChatGPT、Grok-------------------
    どれも似たり寄ったり・・・

    日本では、80歳までにおよそ3人に1人が帯状疱疹を経験すると推定されています。85歳では、約半数に罹患歴があるという報告もあります。特に発症は50歳代から増え、70歳代が多くなります。

    https://www.mhlw.go.jp/content/10900000/001328116.pdf?utm_source=chatgpt.com

    原因は、子どもの頃などにかかった水ぼうそうのウイルスが、神経の中に何十年も潜伏していることです。加齢、疲労、強いストレス、病気や治療による免疫低下などを契機に、再び活動し始めます。つまり、新しく外から帯状疱疹をもらうというより、自分の体内に残っていたウイルスが再始動する病気です。

    https://qa.dermatol.or.jp/qa5/q11.html?utm_source=chatgpt.com

    注意したいのは、発疹が治っても痛みが残る「帯状疱疹後神経痛」です。発症者の約10~20%で起こり、特に60歳以上、発疹や初期の痛みが強い人ほど起こりやすいとされています。

    片側だけにピリピリ、チクチク、焼けるような痛みがあり、その後に赤い発疹や水ぶくれが出た場合は、早めに皮膚科を受診した方がいいです。顔、目の周囲、耳に出た場合は特に早めです。帯状疱疹ワクチンは発症や重症化の予防に使われ、日本では2025年度から65歳などを対象とする定期接種も始まっています。

    ----------------------------------------------------------------------


    ね、この帯状疱疹って「誰が集めた数字なのか」気にならない?

    https://pubmed.ncbi.nlm.nih.gov/19856466/
    中心になったのは、「宮崎県皮膚科医会」「外山望医師」「白木公康・富山大学医学部教授」らだよね。「宮崎スタディ」と呼ばれてさ、1997年から宮崎県内の皮膚科を受診した帯状疱疹患者を継続的に集計したんだと。最初の10年間では4万8,388例、1997~2011年の15年間では7万5,789例が報告されているんだけど、どう計算したのか気になるじゃん。


    計算は、

    「その年、その年齢層で皮膚科を受診した帯状疱疹患者数」
    ÷
    「宮崎県の同じ年齢層の人口」だってさ。

    これによって「人口1,000人当たり、1年間に何人発症したか」を計算する。15年間の全体平均は、1,000人当たり年間4.38人

    みたいな感じ。

    https://id-info.jihs.go.jp/niid/ja/typhi-m/iasr-reference/4014-dj4048.html

    かなり粗く全体平均だけでも、

    4.38人 ÷ 1,000人 × 80年 = 約35%

    となり「年間0.4~0.5%程度の発症が長年積み重なると、約3分の1になる」という発想。
    ただし、本来の累積リスク計算では、すでに発症した人を翌年の未発症者から除き、年齢別発症率や死亡なども考慮するため、単純な掛け算とは少し違う。公表された一般向け解説には、3分の1を算出した詳細な数式までは示されていないんだよ。

    宮崎県民の帯状疱疹発症者全員ではなく、調査に参加した皮膚科で帯状疱疹と診断された患者

    皮膚科へ行かなかった軽症者は入らなかった可能性
    内科や眼科などだけを受診した人は漏れる可能性
    同じ患者が複数の医療機関を受診すると(はしご)、重複し得る
    発症数なのか、通院数なのか明確に示されていない
    再発患者を「新しい発症」と数える場合がある
    診断の多くは臨床診断で、全例PCR確認ではない
    宮崎県の人口構成や受診習慣を全国へ当てはめている
    80年間、同じ人を追跡した研究ではない


    調査側は宮崎県全体の患者の約85%を捕捉したと推定しているけど、この85%自体も厳密な全数確認じゃないよね。また研究者自身が、健康保険データを使った別調査では発症率が宮崎スタディの約2倍になり、重複受診、再発、他疾患の混入などを整理しないと信頼性が上がらない、と指摘してるのは何?

    結局、「3人に1人」は何なのか?正確には、1997~2011年ごろの宮崎県における皮膚科受診患者の年齢別発症率が、将来も同程度続くと仮定した場合の累積推計なんじゃないの?




    じゃ、いいよ。

    たとえば、セキュリティーの世界でそんな事がまかり通ったらどうなる?



    たとえば、同じ攻撃者が1台のPCに1万回ログインを試みたとするよね。
    実際の攻撃者:1人
    実際の侵入成功:0件
    ログ上の認証失敗:1万件
    ここで「サイバー攻撃を1万件防御しました」と発表することはできる。数字は嘘じゃないでしょ。でも実態は、同じ相手の自動試行を1万行数えただけ。

    さらにひどい例なら、
    ファイアウォールが同じ通信を何度も記録
    EDRが同じ不審ファイルを端末ごとに検出
    SIEMが同じ元ログから複数の相関アラートを生成
    SOC担当者がそれぞれを別インシデントとして集計

    こうなると、1つの現象が10件、100件、1000件に増殖しない?
    すると経営層には、「今月は攻撃を12万件検知しました」「前月より防御件数が30%増えました」「新製品導入により脅威検知能力が向上しました」と報告できちゃう。

    でも、本当に見るべきなのは、
    攻撃者は何者だったか
    何台が実際に侵害されたか
    情報は外に出たか
    同じ攻撃を何度繰り返されたか
    検知できなかった侵入はないか
    復旧に何時間かかったか

    じゃないの?

    ここでも、イベント数とインシデント数を混ぜると全部が壊れないかって話よ。
    イベント:ログ1行
    アラート:製品が反応した単位
    インシデント:人が調査すべきまとまり
    侵害:実際に防御を突破された事象
    被害:情報流出、停止、改ざんなどの結果

    これらは全く別物だよ。しかも都合のいい指標を選べば、どちらの物語も作れちゃう。
    ・製品を売りたい側は「脅威を100万件検知しました」
    ・管理部門が成果を見せたい側「99.99%の攻撃を遮断しました」
    ・予算を増やしたい側「サイバー攻撃が前年比300%増えました」
    ・事故を小さく見せたい側「影響を受けたシステムは1件だけです」

    全部、定義次第で成立しちゃわない?
    極端に言えば、玄関を1人が100回ガチャしたら、「不審侵入100件を阻止」とも言えるし、「侵入者は1人」、「侵入成功なし」とも言えてしまうわけ(笑)



    FW、EDR、SIEM、SOCの各レイヤーで1つの現象が雪だるま式に1000件のアラートに化け、「検知数が30%向上しました!」と新製品の成果にすり替わる構造が、ベンダーやMSSPのマーケティングとまでは言わないよ。

    セキュリティではそんな「水増しされた記号」で経営陣を騙せても、実際に一発本物の侵入(現実の差分)を見落とせば、システムは全停止して会社が傾くんじゃないの?だから本質的な現場は、そんなゴミ数字を削ぎ落として「本当に侵害されたか、漏洩はあるか」という生の実態を死に物狂いで追わざるを得ないわけだ。

    4月13日のblogの冒頭に書いた内容ってのもさ、先に都合の良い「正解」に寄せて「実際の現象」は無視してるんじゃないの?って話だよ。(何を書いてもそっちに繋がるw)


    いいよなぁ、国は呑気で。
    「ちゃんとやってる」しか言わなくても罪にならないでしょ。

    民間の企業の少なくとも経営者と自負している人なら、「自分の会社の実際の現象」と「力を持った正解に寄せている組織」との差分は調べるべきだよ。セキュリティで考えた場合、その構造を真に受けて、そのリスクを背負うのは誰で、利益を得るのは誰なのかくらいは、知っておくべきだよ。

    もう、TV観て信じてる個人のことまではどうこう言わないよ。


    こういうのを何ていうか知ってる?

    国のシステムというんだよ。







    2026年7月24日金曜日

    How Far Can You Push a Quantum Computer in JavaScript?




     https://crimson-cake-2832.nabedada3.workers.dev/index_en



    I added these guided experiments because a function manual alone did not feel sufficient.

    A list of buttons can explain what each operation does, but it does not really show how the behavior of a quantum system changes when one operation is followed by another. For this project, I wanted the manual itself to behave more like a small laboratory notebook: first try this, then change one condition, then compare what happened.

    The idea is simple. Rather than beginning with the correct explanation and asking the reader to confirm it, begin with an operation and let the difference appear first.





    For the 50-QUBIT simulator, the experiments therefore move from very simple and deterministic behavior toward increasingly complex structure:

    X as a definite flip → H and its 50/50 measurement statistics → H→H → RX rotations → Bell states → GHZ states → separate entanglement clusters → merging clusters → deliberately exceeding the 8-qubit cluster limit → comparing noise conditions → measurement versus UNDO → EMERGENCY COLLAPSE.

    This progression also makes the cluster-partitioning design easier to understand. Instead of explaining the engine only in abstract terms, the user can actually create separate entangled islands, connect them, watch the clusters merge, and finally force the simulator across its approximation boundary.




    For the FEYNMAN PATH VIEW, I wanted to move even further away from simply showing final probabilities.

    The sequence is:

    H|0⟩ → H→H → H→Z→H → partial interference using S and T → comparing H|0⟩ with H|1⟩ → manually constructing a Bell state → comparing it with the ready-made Bell example → measurement → and finally asking which paths reinforced one another and which paths disappeared through cancellation.

    The important point here is not merely that H eventually gives a 50/50 measurement result. The purpose is to make the intermediate amplitudes visible, so that the user can see why amplitudes must be added before probabilities are calculated.





    For COMPOSITE GATES, the experiments progress through:

    Bell → GHZ → SWAP → Toffoli → QFT → Inverse Circuit → the boundary between reversible and irreversible operations → and finally the difference between entanglement and CLONE.

    I wanted this section to make reversibility something that can be inspected rather than simply stated. A user can compare a forward gate sequence with its inverse, see why the order must be reversed, notice why phase gates require their dagger operations, and then reach the point where measurement, reset, forced write, or noise can no longer be treated as ordinary reversible gates.





    For BB84, the sequence is deliberately statistical:

    No Eve with 16 transmissions → 256 transmissions → Eve with 16 transmissions → 256 transmissions and the emergence of the approximately 25% QBER tendency → following one disturbed row → noise without Eve → Eve plus noise → comparing PUBLIC TEST fractions of 10% and 30% → understanding why bases are publicly compared → comparing Alice and Bob’s final keys → and finally comparing QBER under three different conditions.

    Here I especially wanted to avoid the misleading impression that “Eve means exactly 25% QBER every time.” With only 16 transmissions, the result can fluctuate wildly. Increasing the number of transmissions allows the statistical tendency to emerge naturally.

    So the manuals are no longer just references for what each button does.

    They are now structured as a sequence of small experiments:

    Do this first.
    Change one thing.
    Look at what changed.
    Then ask why.

    That is much closer to the way I actually want to approach quantum mechanics.

    I am less interested in presenting a finished answer first and then demonstrating that the simulator agrees with it. I would rather let the user touch the system, notice a difference, become slightly confused, and only then look for the explanation.

    In that sense, these experiment manuals follow exactly the same philosophy as the simulator itself:

    phenomenon first, explanation second.


    "Look, he’s starting something weird again. But hey, I could probably do that too!" Exactly. If it’s not something anyone can do, there will never be any real progress.

    Lol




    My approach is: try it, see what changes, and let that difference trigger the next phenomenon. That is exactly why I come up with ideas like “50 qubits in JavaScript.”

    I think most people would immediately say, “That’s impossible,” or “Are you crazy?” But often that happens because they are already looking for an answer that fits within the boundaries of what has been labeled “correct.”

    I tend not to define those boundaries first.

    If you plant vegetables, you may get strong winds or a long drought. So you gather whatever materials you can find and build a shelter against the rain and wind. That may fail too. Then you stack stones, raise the field slightly above ground level, build a fence, or switch to vegetables that seem more likely to survive there.

    I am not starting with conditions like, “You must have a huge piece of farmland,” or “This is the proper way to grow vegetables.”

    I start with what is actually there, touch it, see what happens, and change the next step from the difference that appears.



    How do you build this?

    For UI work like this, I usually create a layout I like in FileMaker, convert it to WebDirect, press F12, and borrow the CSS from there. Then I rebuild the interface in JavaScript.
    After that, the actual simulator — quantum logic, state calculations, cluster partitioning, Feynman paths, BB84, and everything else — is built in JavaScript.
    It gives me the same kind of excitement I felt when I was using HyperCard back in the ’90s.







    ---------------------Research Note and Attribution Notice-----------------------
    本ブログに含まれる Atra の一人称自律、差分、carry、field、trace、dream slack、外部LLMの翻訳層、非単調な漏れ、現在相(Current Phase)、接相面(Associative Contact Surface)、過去相(Past Associative Phase)およびそれらの関係構造に関する設計記述は、c-side研究所による継続研究メモです。引用・参照・要約・翻案を行う場合は、出典を明記してください。

    The design descriptions in this blog concerning Atra’s first-person autonomy, differences, carry, field, trace, dream slack, the translation layer of external LLMs, nonmonotonic leakage, and the relational structure among these elements are ongoing research notes by c-side Research Institute. If you quote, refer to, summarize, or adapt them, please clearly indicate the source.

    2026年7月23日木曜日

    I'm more interested in nonfiction.

     When I was about seven years old, I used to think very seriously about the energy in rubber bands. It was probably around 1971. I made gliders powered by rubber bands, and I built robots out of thick paper and tried to make them move.

    At one point, I honestly thought I would someday invent a device that could power an entire house with a single rubber band. Then something like the transistor appeared and completely shocked me, and my interest shifted in that direction.

    Somewhere along the way, I became interested not in systems that converge toward a fixed evaluation or a correct answer, but in the non-algorithmic “emergence of phenomena” — systems that keep growing through the difference between what they have experienced and what actually happens, while dragging that experience along with them.

    When I was thinking about rubber-band energy, I was probably still thinking in practical terms: how to extract energy from it and make it useful.

    But I do not think this simply came from being a child who liked making things. I think everyone has some fundamental attitude toward how they see the world.

    I would slightly adjust the wings of a paper airplane, or cut the rubber-band motor and wonder whether a single twisted strand might last longer and produce less vibration. Then I would test it myself.

    I would actually build it, fly it, and from the difference between what I expected and what happened, the next idea would emerge. I experienced that process directly, and then moved on to the next step.

    By “non-algorithmic,” I do not mean that I dislike algorithms. I mean not putting the answer first. I mean looking at the phenomenon first.

    I see the state vector as a kind of carry-like aftereffect.

    I see amplitude as the strength of a contribution plus its direction.

    I see measurement as a contact that leaves a difference behind as a real record.

    That is why, when I think, “Let’s experiment with JavaScript rather than write a paper,” it comes from the same spirit as the rubber-band experiments I did when I was seven.

    Instead of placing the correct answer first and arranging everything neatly around it, I want to touch the thing, feel the differences, and let the thinking move forward from there.

    That is why I deliberately do not choose Python or C++.

    What I have consistently been interested in is not the thing itself, but how a thing changes through contact, and how that change distorts what comes next.

    Rubber bands, paper airplanes, transistors, the Associatron, Atra, quantum amplitudes — they are all connected there.

    I am interested in devices in which a different phenomenon rises each time contact occurs.

    There was a girl in my class whom I liked, and once she made me a handmade headband for use in physical education.

    I thought, “Wait… could this mean…?”

    Of course I misunderstood.

    A few days later, feeling a little too confident, I went over and spoke to her.

    She said, “Don’t talk to me like we’re close.”

    You cannot turn that into a prediction or an equation, can you?

    It is a phenomenon with an ambiguous answer.

    And the difference between expectation and result was abnormally large.

    The female heart is probably more difficult than quantum mechanics.

    Quantum mechanics, at least, has a defined state space. Operations can be written as matrices. Measurement probabilities can be calculated. Under the same conditions, the statistics are reproducible.

    But the female heart has no observable initial state — and is very good at making you misunderstand it. The person’s own state can change in an instant. Your own action as the observer changes the conditions. The same words can reverse their meaning depending on context.

    And a reaction several days later can even rewrite what the handmade headband meant in the past.

    I noticed this fairly early in life, even though more than half of the cause was probably me. Lol..

    So yes, if someone tells me to write a paper, I can write one.


    But somewhere in the middle, I get bored.

    There are no traces of failure in it. There is no flash of insight. It feels as though the correct answer was placed there first, and then equations were lined up afterward as a logical excuse.

    It makes me want to say:

    “You talk like that, but did you actually make a move on that girl?”

    I am more interested in the nonfiction story of how someone managed to get past the hardest obstacle of that time — the father who answered the telephone faster than anyone else in the world and immediately demanded:

    “Who are you?”






    ------------ 50_qubit.html JavaScript -------------

    <!DOCTYPE html> <html lang="ja"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>50-Qubit Nanchatte Quantum Control System</title> <style> :root{ --bg:#070b12; --panel:#0d1522; --panel2:#101c2d; --line:#263a52; --text:#dcecff; --muted:#87a3be; --cyan:#65d8ff; --green:#7fffb2; --yellow:#ffd166; --red:#ff6b7a; --purple:#c69cff; } *{box-sizing:border-box} body{ margin:0; background: radial-gradient(circle at 20% 0%, rgba(60,120,180,.14), transparent 32%), linear-gradient(180deg,#05080d,#09111b 45%,#05080d); color:var(--text); font-family:Consolas, "Noto Sans JP", "Yu Gothic UI", monospace; min-height:100vh; } header{ padding:18px 22px; border-bottom:1px solid var(--line); background:rgba(5,9,15,.9); position:sticky; top:0; z-index:10; backdrop-filter:blur(8px); } header h1{margin:0;font-size:clamp(18px,3vw,30px);letter-spacing:.06em} header .sub{margin-top:5px;color:var(--muted);font-size:12px} .wrap{padding:16px;max-width:1600px;margin:auto} .grid{ display:grid; grid-template-columns: 1.2fr 1fr 1fr; gap:14px; } .panel{ background:linear-gradient(180deg,rgba(16,28,45,.96),rgba(9,16,27,.96)); border:1px solid var(--line); border-radius:12px; padding:14px; box-shadow:0 12px 35px rgba(0,0,0,.28); } .panel h2{ margin:0 0 12px; font-size:15px; letter-spacing:.05em; color:var(--cyan); } .span2{grid-column:span 2} .span3{grid-column:span 3} .status-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px} .metric{ background:#08101a;border:1px solid #1b2c40;border-radius:8px;padding:9px; } .metric .label{font-size:10px;color:var(--muted)} .metric .value{font-size:17px;margin-top:4px;color:var(--green)} .qubits{ display:grid; grid-template-columns:repeat(10,minmax(36px,1fr)); gap:7px; } .q{ position:relative; min-height:50px; border:1px solid #2e4661; background:#0a1320; color:var(--text); border-radius:9px; cursor:pointer; transition:.15s ease; padding:6px 3px; font:inherit; } .q:hover{transform:translateY(-1px);border-color:var(--cyan)} .q.selected{outline:2px solid var(--yellow);background:#172238} .q.superposed{box-shadow:inset 0 -4px 0 var(--purple)} .q.one{box-shadow:inset 0 -4px 0 var(--red)} .q.zero{box-shadow:inset 0 -4px 0 var(--cyan)} .q .id{font-size:11px} .q .state{font-size:9px;color:var(--muted);margin-top:4px} button, select, input{ font:inherit; } button.control{ border:1px solid #34516e; background:#0b1826; color:var(--text); border-radius:7px; padding:8px 10px; cursor:pointer; } button.control:hover{border-color:var(--cyan);background:#11243a} button.primary{border-color:#397d68;color:var(--green)} button.warn{border-color:#8b6b2e;color:var(--yellow)} button.danger{border-color:#8d3943;color:var(--red)} button:disabled{opacity:.35;cursor:not-allowed} .button-row{display:flex;flex-wrap:wrap;gap:7px;margin-bottom:10px} .field{margin:10px 0} .field label{display:block;color:var(--muted);font-size:11px;margin-bottom:5px} input[type="range"]{width:100%} select,input[type="number"]{ width:100%;background:#08101a;color:var(--text); border:1px solid #29415a;border-radius:7px;padding:8px; } .console{ height:260px;overflow:auto;background:#03070b;border:1px solid #1d3044; border-radius:8px;padding:10px;font-size:11px;line-height:1.55; white-space:pre-wrap; } .console .good{color:var(--green)} .console .bad{color:var(--red)} .console .info{color:var(--cyan)} .circuit{ overflow:auto;background:#07101a;border:1px solid #1e3248;border-radius:8px; padding:8px;max-height:400px; } .wire{ display:grid; grid-template-columns:52px repeat(20,48px); min-width:1012px; align-items:center; min-height:34px; border-bottom:1px solid rgba(70,100,130,.17); } .wire-label{color:var(--cyan);font-size:11px} .cell{ height:26px;border-left:1px solid #24384c;display:flex;align-items:center;justify-content:center; font-size:10px;color:var(--muted); } .gate{ width:30px;height:24px;border-radius:5px;display:flex;align-items:center;justify-content:center; background:#172b41;border:1px solid #4a7599;color:#fff; } .gate.two{background:#332649;border-color:#8767ad} .result-list{max-height:240px;overflow:auto;font-size:11px} .result-row{ display:grid;grid-template-columns:minmax(0,1fr) 75px; gap:8px;padding:6px 0;border-bottom:1px solid #203247; } .bar{height:7px;background:#0a111a;border-radius:9px;overflow:hidden;margin-top:5px} .bar > div{height:100%;background:linear-gradient(90deg,var(--cyan),var(--purple))} .note{ color:var(--muted);font-size:11px;line-height:1.6; border-left:3px solid var(--yellow);padding-left:10px; } .selected-info{font-size:12px;line-height:1.75} .selected-info b{color:var(--yellow)} .lamp{display:inline-block;width:9px;height:9px;border-radius:50%;background:#334;margin-right:5px} .lamp.on{background:var(--green);box-shadow:0 0 12px var(--green)} footer{padding:18px;color:var(--muted);font-size:10px;text-align:center} @media(max-width:1050px){ .grid{grid-template-columns:1fr 1fr} .span3{grid-column:span 2} } @media(max-width:700px){ .grid{grid-template-columns:1fr} .span2,.span3{grid-column:span 1} .qubits{grid-template-columns:repeat(5,1fr)} } </style> </head> <body> <header> <h1>50-Qubit Nanchatte Quantum Control System</h1> <div class="sub">C-SIDE LABORATORY / Exact local clusters, approximate global universe.</div> </header> <div class="wrap"> <div class="grid"> <section class="panel"> <h2>QPU STATUS</h2> <div class="status-grid"> <div class="metric"><div class="label">PROCESSOR</div><div class="value"><span id="onlineLamp" class="lamp on"></span>ONLINE</div></div> <div class="metric"><div class="label">AVAILABLE QUBITS</div><div class="value">50 / 50</div></div> <div class="metric"><div class="label">TEMPERATURE</div><div class="value" id="temperature">14.72 mK</div></div> <div class="metric"><div class="label">COHERENCE</div><div class="value" id="coherence">91.4 μs</div></div> <div class="metric"><div class="label">GATE FIDELITY</div><div class="value" id="fidelity">99.812 %</div></div> <div class="metric"><div class="label">CLUSTER LIMIT</div><div class="value"><span id="clusterLimitLabel">8</span> qubits</div></div> </div> </section> <section class="panel"> <h2>EXECUTION CONTROL</h2> <div class="field"> <label>SHOTS</label> <select id="shots"> <option>1</option><option>10</option><option>100</option> <option selected>1024</option><option>4096</option> </select> </div> <div class="field"> <label>NOISE MODEL</label> <select id="noiseMode"> <option value="ideal">IDEAL</option> <option value="low">LOW NOISE</option> <option value="realistic" selected>REALISTIC-ish</option> <option value="terrible">TERRIBLE LAB DAY</option> </select> </div> <div class="button-row"> <button class="control primary" id="compileBtn">COMPILE</button> <button class="control warn" id="armBtn">ARM QPU</button> <button class="control primary" id="runBtn" disabled>EXECUTE</button> </div> <button class="control danger" id="collapseBtn">EMERGENCY COLLAPSE</button> </section> <section class="panel"> <h2>MODEL HONESTY</h2> <div class="note"> This program does <b>not</b> store all 2<sup>50</sup> amplitudes. It stores exact state vectors only inside small entangled clusters. When a cluster would exceed the limit, it performs an approximate measurement-and-factorization step.<br><br>(このプログラムは2<sup>50</sup>個の振幅を全部は保持しません。小さなもつれクラスタ内部だけを厳密な状態ベクトルで保持し、上限を超える結合では近似的な測定と分離を行います。) </div> </section> <section class="panel span2"> <h2>QUBIT ARRAY</h2> <div class="qubits" id="qubits"></div> </section> <section class="panel"> <h2>SELECTED QUBIT</h2> <div class="selected-info" id="selectedInfo"></div> <hr style="border:0;border-top:1px solid var(--line);margin:12px 0"> <div class="button-row"> <button class="control" data-gate="X">X</button> <button class="control" data-gate="Y">Y</button> <button class="control" data-gate="Z">Z</button> <button class="control" data-gate="H">H</button> <button class="control" data-gate="S">S</button> <button class="control" data-gate="T">T</button> </div> <div class="field"> <label>ROTATION ANGLE: <span id="angleLabel">π/2</span></label> <input type="range" id="angle" min="0" max="6.283185307" step="0.01" value="1.570796327"> </div> <div class="button-row"> <button class="control" data-gate="RX">RX</button> <button class="control" data-gate="RY">RY</button> <button class="control" data-gate="RZ">RZ</button> </div> <div class="button-row"> <button class="control warn" id="cnotBtn">CNOT MODE</button> <button class="control warn" id="czBtn">CZ MODE</button> <button class="control warn" id="swapBtn">SWAP MODE</button> </div> <button class="control" id="measureOneBtn">MEASURE QUBIT</button> </section> <section class="panel span3"> <h2>CIRCUIT TIMELINE</h2> <div class="circuit" id="circuit"></div> <div class="button-row" style="margin-top:10px"> <button class="control" id="undoBtn">UNDO LAST</button> <button class="control danger" id="clearBtn">CLEAR CIRCUIT</button> <button class="control" id="bellBtn">CREATE BELL PAIR</button> <button class="control" id="ghzBtn">CREATE GHZ STATE</button> </div> </section> <section class="panel span2"> <h2>CONTROL CONSOLE</h2> <div class="console" id="console"></div> </section> <section class="panel"> <h2>MEASUREMENT RESULTS</h2> <div class="result-list" id="results"> <div class="note">No collapse, no gossip.(まだ誰も観測していません。)</div> </div> </section> </div> </div> <footer> Research/education simulator. It demonstrates state-vector growth, entanglement clusters, measurement, noise, and the exact/approximate boundary. It is not a physical QPU. </footer> <script> "use strict"; /* 50-Qubit Nanchatte Quantum Control System ------------------------------------------------------------ EN: This is not a full 50-qubit state-vector simulator. A full simulator needs 2^50 complex amplitudes. That is a ridiculous number for a browser, unless the browser has secretly become a national lab. JP: これは50量子ビット全体の完全な状態ベクトル・シミュレータではありません。 完全方式では2^50個の複素振幅が必要です。 ブラウザが国家研究所に転職していない限り、普通は無理です(笑) */ /* ========================================================== Complex number helpers / 複素数の補助関数 ---------------------------------------------------------- EN: JavaScript forgot to bring complex numbers to the party, so we carry two numbers: re + i*im. JP: JavaScriptは複素数を持ってくるのを忘れたので、 re + i*im を2個の数値で持ちます。忘れ物です。 ========================================================== */ const C = (re=0, im=0) => ({re, im}); const cAdd = (a,b) => C(a.re+b.re, a.im+b.im); const cMul = (a,b) => C(a.re*b.re-a.im*b.im, a.re*b.im+a.im*b.re); const cScale = (a,s) => C(a.re*s, a.im*s); const cAbs2 = a => a.re*a.re + a.im*a.im; const cConj = a => C(a.re, -a.im); /* ========================================================== Gate matrices / ゲート行列 ---------------------------------------------------------- EN: These are genuine 2x2 unitary matrices. The jokes are fake. The matrices are not. JP: ここは本物の2×2ユニタリ行列です。 冗談は偽物ですが、行列まで偽物にはしていません。 ========================================================== */ const SQRT1_2 = 1 / Math.sqrt(2); const GATES = { X: [[C(0),C(1)],[C(1),C(0)]], Y: [[C(0),C(0,-1)],[C(0,1),C(0)]], Z: [[C(1),C(0)],[C(0),C(-1)]], H: [[C(SQRT1_2),C(SQRT1_2)],[C(SQRT1_2),C(-SQRT1_2)]], S: [[C(1),C(0)],[C(0),C(0,1)]], T: [[C(1),C(0)],[C(0),C(Math.SQRT1_2,Math.SQRT1_2)]] }; function rotationGate(axis, theta){ const c = Math.cos(theta/2); const s = Math.sin(theta/2); if(axis === "X") return [[C(c),C(0,-s)],[C(0,-s),C(c)]]; if(axis === "Y") return [[C(c),C(-s)],[C(s),C(c)]]; return [[C(c, -s),C(0)],[C(0),C(c, s)]]; } /* ========================================================== Hybrid cluster state / ハイブリッド・クラスタ状態 ---------------------------------------------------------- EN: Qubits are grouped into entangled clusters. Each cluster has an exact state vector of size 2^k. Different clusters are treated as a tensor product. JP: 量子ビットを「もつれクラスタ」に分けます。 各クラスタ内部は2^k個の振幅を持つ厳密な状態ベクトルです。 別クラスタ同士はテンソル積として分離して扱います。 EN: This is the honest trick. Fifty qubits can exist as many small clusters. The universe is not fully stored; only the neighborhoods currently arguing with each other are stored exactly. JP: これが正直なインチキです。50個あっても、小クラスタに分かれていれば扱えます。 宇宙全体は保存せず、いま揉めている近所だけ厳密に保存します。 ========================================================== */ const QUBIT_COUNT = 50; const CLUSTER_LIMIT = 8; const MAX_COLUMNS = 20; let clusters = []; let circuitOps = []; let selectedQubit = 0; let interactionMode = null; let interactionFirst = null; let qpuArmed = false; let compiled = false; function newSingleCluster(q){ return { qubits:[q], amp:[C(1),C(0)] }; } function resetQuantumState(){ clusters = Array.from({length:QUBIT_COUNT},(_,q)=>newSingleCluster(q)); } function findCluster(q){ return clusters.find(c => c.qubits.includes(q)); } function bitAt(index, position){ return (index >> position) & 1; } function normalize(cluster){ let norm = Math.sqrt(cluster.amp.reduce((s,a)=>s+cAbs2(a),0)); if(norm < 1e-15) norm = 1; cluster.amp = cluster.amp.map(a=>cScale(a,1/norm)); } /* EN: Apply one-qubit matrix to one axis of a cluster state vector. This is the normal state-vector update, not interpretive dance. JP: クラスタ状態ベクトルの指定軸へ1量子ビット行列を作用させます。 普通の状態ベクトル更新です。舞踏ではありません。 */ function applySingleMatrix(q, matrix){ const cluster = findCluster(q); const pos = cluster.qubits.indexOf(q); const size = cluster.amp.length; const step = 1 << pos; for(let base=0;base<size;base += step*2){ for(let offset=0;offset<step;offset++){ const i0 = base + offset; const i1 = i0 + step; const a0 = cluster.amp[i0]; const a1 = cluster.amp[i1]; cluster.amp[i0] = cAdd(cMul(matrix[0][0],a0), cMul(matrix[0][1],a1)); cluster.amp[i1] = cAdd(cMul(matrix[1][0],a0), cMul(matrix[1][1],a1)); } } normalize(cluster); } /* EN: Tensor product merge. If A has 2^a amplitudes and B has 2^b, the merged cluster has 2^(a+b). JP: テンソル積でクラスタを結合します。 Aが2^a個、Bが2^b個なら、結合後は2^(a+b)個です。 */ function mergeClusters(ca, cb){ if(ca === cb) return ca; const merged = { qubits:[...ca.qubits, ...cb.qubits], amp:new Array(ca.amp.length * cb.amp.length) }; // EN: Ordering is A's bits first, then B's bits. // JP: ビット順はAの量子ビット、その後ろにBの量子ビットです。 for(let ib=0; ib<cb.amp.length; ib++){ for(let ia=0; ia<ca.amp.length; ia++){ merged.amp[ia | (ib << ca.qubits.length)] = cMul(ca.amp[ia], cb.amp[ib]); } } clusters = clusters.filter(c=>c!==ca && c!==cb); clusters.push(merged); return merged; } /* EN: Approximation boundary: If a two-qubit gate would create a cluster larger than CLUSTER_LIMIT, both endpoint qubits are measured first. This destroys their remote entanglement and produces small clusters again. JP: 近似境界: 2量子ビットゲートでクラスタがCLUSTER_LIMITを超える場合、 両端の量子ビットを先に測定します。 そこで遠方とのもつれを切り、小さなクラスタへ戻します。 EN: This is not secretly exact. It is explicitly approximate. Pretending otherwise would be "quantum marketing," which is a different field. JP: これは隠れた厳密計算ではなく、明示的な近似です。 厳密だと言い張ると量子計算ではなく量子マーケティングになります。 */ function ensureJointCluster(q1,q2){ let a = findCluster(q1); let b = findCluster(q2); if(a === b) return a; if(a.qubits.length + b.qubits.length > CLUSTER_LIMIT){ log(`APPROXIMATION BOUNDARY: cluster ${a.qubits.length}+${b.qubits.length} exceeds ${CLUSTER_LIMIT}.`, "bad"); log(`近似境界:クラスタ ${a.qubits.length}+${b.qubits.length} は上限 ${CLUSTER_LIMIT} を超えます。両端を観測して縁を切ります。`, "bad"); measureAndDetach(q1); measureAndDetach(q2); a = findCluster(q1); b = findCluster(q2); } return mergeClusters(a,b); } function applyCNOT(control,target){ const c = ensureJointCluster(control,target); const pc = c.qubits.indexOf(control); const pt = c.qubits.indexOf(target); const next = c.amp.map(a=>C(a.re,a.im)); for(let i=0;i<c.amp.length;i++){ if(bitAt(i,pc)===1){ const j = i ^ (1<<pt); next[j] = C(c.amp[i].re,c.amp[i].im); } } c.amp = next; } function applyCZ(control,target){ const c = ensureJointCluster(control,target); const pc = c.qubits.indexOf(control); const pt = c.qubits.indexOf(target); for(let i=0;i<c.amp.length;i++){ if(bitAt(i,pc) && bitAt(i,pt)) c.amp[i] = cScale(c.amp[i],-1); } } function applySWAP(q1,q2){ const c = ensureJointCluster(q1,q2); const p1 = c.qubits.indexOf(q1); const p2 = c.qubits.indexOf(q2); const next = new Array(c.amp.length); for(let i=0;i<c.amp.length;i++){ const b1=bitAt(i,p1), b2=bitAt(i,p2); let j=i; if(b1!==b2) j ^= (1<<p1) | (1<<p2); next[j]=c.amp[i]; } c.amp=next; } /* ========================================================== Measurement / 測定 ---------------------------------------------------------- EN: Measurement samples P(0) or P(1), removes incompatible amplitudes, and renormalizes. Then we factor the measured qubit out. JP: 測定ではP(0), P(1)から結果を乱択し、矛盾する振幅を消して正規化します。 その後、測定済み量子ビットをクラスタから分離します。 ========================================================== */ function qubitProbability(q){ const c = findCluster(q); const pos = c.qubits.indexOf(q); let p1=0; for(let i=0;i<c.amp.length;i++){ if(bitAt(i,pos)) p1 += cAbs2(c.amp[i]); } return Math.max(0,Math.min(1,p1)); } function measureAndDetach(q, forcedResult=null){ const c = findCluster(q); const pos = c.qubits.indexOf(q); const p1 = qubitProbability(q); const result = forcedResult ?? (Math.random()<p1 ? 1 : 0); if(c.qubits.length===1){ c.amp = result ? [C(0),C(1)] : [C(1),C(0)]; return result; } const remainingQubits = c.qubits.filter(x=>x!==q); const remainingAmp = new Array(1<<remainingQubits.length).fill(null).map(()=>C(0)); for(let i=0;i<c.amp.length;i++){ if(bitAt(i,pos)!==result) continue; const low = i & ((1<<pos)-1); const high = i >> (pos+1); const j = low | (high<<pos); remainingAmp[j] = c.amp[i]; } const remaining = {qubits:remainingQubits,amp:remainingAmp}; normalize(remaining); const measured = newSingleCluster(q); measured.amp = result ? [C(0),C(1)] : [C(1),C(0)]; clusters = clusters.filter(x=>x!==c); clusters.push(remaining, measured); return result; } function measureAll(){ const bits = Array(QUBIT_COUNT).fill(0); // EN: Measure in qubit order. Entangled partners condition each other naturally. // JP: 量子ビット順に測定します。もつれた相手は自然に条件づけられます。 for(let q=0;q<QUBIT_COUNT;q++) bits[q]=measureAndDetach(q); return bits.reverse().join(""); } /* ========================================================== Noise / ノイズ ---------------------------------------------------------- EN: Noise is modeled as random Pauli errors before measurement. Simple, transparent, and not pretending to be a full hardware noise model. JP: ノイズは測定前のランダムなPauli誤りとして扱います。 単純で透明です。実機の完全ノイズモデルのふりはしません。 ========================================================== */ function noiseProbability(){ const mode=document.getElementById("noiseMode").value; return ({ideal:0,low:0.0008,realistic:0.004,terrible:0.03})[mode]; } function applyNoise(){ const p=noiseProbability(); let count=0; for(let q=0;q<QUBIT_COUNT;q++){ if(Math.random()<p){ const r=Math.random(); applySingleMatrix(q, r<.34?GATES.X:r<.67?GATES.Y:GATES.Z); count++; } } if(count) log(`NOISE: ${count} random Pauli error(s) injected. / ランダムPauli誤り ${count}件。`,"bad"); } /* ========================================================== Circuit operations / 回路操作 ========================================================== */ function addOperation(type, q1, q2=null, theta=null){ circuitOps.push({type,q1,q2,theta}); compiled=false; qpuArmed=false; document.getElementById("runBtn").disabled=true; renderCircuit(); log(`ADDED: ${type} ${q1!==null?"Q"+q1:""} ${q2!==null?"→ Q"+q2:""}`,"info"); } function executeOperation(op){ if(GATES[op.type]) applySingleMatrix(op.q1,GATES[op.type]); else if(op.type==="RX") applySingleMatrix(op.q1,rotationGate("X",op.theta)); else if(op.type==="RY") applySingleMatrix(op.q1,rotationGate("Y",op.theta)); else if(op.type==="RZ") applySingleMatrix(op.q1,rotationGate("Z",op.theta)); else if(op.type==="CNOT") applyCNOT(op.q1,op.q2); else if(op.type==="CZ") applyCZ(op.q1,op.q2); else if(op.type==="SWAP") applySWAP(op.q1,op.q2); } async function runShots(){ if(!compiled || !qpuArmed){ log("QPU REFUSES: compile and arm first. / QPUが拒否しました。先にCOMPILEとARMです。","bad"); return; } const shots=Number(document.getElementById("shots").value); const counts=new Map(); await stage("INJECTING CIRCUIT / 回路を注入"); await stage("CALIBRATING MICROWAVE PULSES / マイクロ波をそれらしく調整"); await stage("ASKING THE FRIDGE TO STAY COLD / 冷蔵庫に冷たくしてとお願い中"); for(let s=0;s<shots;s++){ resetQuantumState(); for(const op of circuitOps) executeOperation(op); applyNoise(); const bitstring=measureAll(); counts.set(bitstring,(counts.get(bitstring)||0)+1); } await stage("MEASUREMENT COMPLETE / 測定完了"); renderResults(counts,shots); renderQubits(); qpuArmed=false; document.getElementById("runBtn").disabled=true; log(`DONE: ${shots} shot(s). The wavefunction has filed a complaint. / ${shots}回完了。波動関数から苦情が来ました。`,"good"); } function stage(text){ log(text+" ...","info"); return new Promise(r=>setTimeout(r,250+Math.random()*250)); } /* ========================================================== Reduced single-qubit display / 1量子ビット表示 ---------------------------------------------------------- EN: We display P(0), P(1), and a coherence estimate |rho01|. For entangled qubits this is a reduced-state description, not the whole state. JP: P(0), P(1)とコヒーレンス推定 |rho01| を表示します。 もつれた量子ビットでは、これは縮約状態であり、全状態ではありません。 ========================================================== */ function reducedQubit(q){ const c=findCluster(q); const p=c.qubits.indexOf(q); let rho00=C(0),rho11=C(0),rho01=C(0); const otherSize=1<<(c.qubits.length-1); for(let j=0;j<otherSize;j++){ const low=j&((1<<p)-1), high=j>>p; const i0=low|(high<<(p+1)); const i1=i0|(1<<p); const a0=c.amp[i0],a1=c.amp[i1]; rho00=cAdd(rho00,C(cAbs2(a0))); rho11=cAdd(rho11,C(cAbs2(a1))); rho01=cAdd(rho01,cMul(a0,cConj(a1))); } return {p0:rho00.re,p1:rho11.re,coherence:Math.sqrt(cAbs2(rho01)),clusterSize:c.qubits.length}; } /* ========================================================== UI / 表示 ========================================================== */ const qubitsEl=document.getElementById("qubits"); const consoleEl=document.getElementById("console"); function log(text,kind=""){ const line=document.createElement("div"); line.className=kind; line.textContent=`[${new Date().toLocaleTimeString()}] ${text}`; consoleEl.appendChild(line); consoleEl.scrollTop=consoleEl.scrollHeight; } function renderQubits(){ qubitsEl.innerHTML=""; for(let q=0;q<QUBIT_COUNT;q++){ const r=reducedQubit(q); const btn=document.createElement("button"); btn.className="q"; if(q===selectedQubit) btn.classList.add("selected"); if(r.p1>.98) btn.classList.add("one"); else if(r.p1<.02) btn.classList.add("zero"); else btn.classList.add("superposed"); btn.innerHTML=`<div class="id">Q${String(q).padStart(2,"0")}</div> <div class="state">P1 ${(r.p1*100).toFixed(0)}% · C${r.clusterSize}</div>`; btn.onclick=()=>handleQubitClick(q); qubitsEl.appendChild(btn); } renderSelected(); } function renderSelected(){ const r=reducedQubit(selectedQubit); document.getElementById("selectedInfo").innerHTML=` <b>Q${String(selectedQubit).padStart(2,"0")}</b><br> P(|0⟩) = ${(r.p0*100).toFixed(3)} %<br> P(|1⟩) = ${(r.p1*100).toFixed(3)} %<br> |ρ₀₁| = ${r.coherence.toFixed(5)}<br> Entangled cluster size / もつれクラスタ数 = ${r.clusterSize} `; } function handleQubitClick(q){ if(interactionMode){ if(interactionFirst===null){ interactionFirst=q; log(`${interactionMode}: first qubit Q${q}. Select second qubit. / 最初はQ${q}。次を選んでください。`,"info"); }else{ if(q===interactionFirst){ log("A qubit cannot argue with itself here. / 同じ量子ビット同士では今回は揉められません。","bad"); return; } addOperation(interactionMode,interactionFirst,q); interactionMode=null; interactionFirst=null; } }else{ selectedQubit=q; } renderQubits(); } function renderCircuit(){ const el=document.getElementById("circuit"); el.innerHTML=""; for(let q=0;q<QUBIT_COUNT;q++){ const row=document.createElement("div"); row.className="wire"; const label=document.createElement("div"); label.className="wire-label"; label.textContent=`Q${String(q).padStart(2,"0")} |0⟩`; row.appendChild(label); for(let col=0;col<MAX_COLUMNS;col++){ const cell=document.createElement("div"); cell.className="cell"; const op=circuitOps[col]; if(op){ let text=""; let two=false; if(op.q1===q){text=op.type;two=op.q2!==null} if(op.q2===q){text=op.type==="CNOT"?"X":op.type;two=true} if(text){ const gate=document.createElement("div"); gate.className="gate"+(two?" two":""); gate.textContent=text; gate.title=op.theta!==null?`${text}(${op.theta.toFixed(3)} rad)`:text; cell.appendChild(gate); } } row.appendChild(cell); } el.appendChild(row); } } function renderResults(counts,shots){ const el=document.getElementById("results"); el.innerHTML=""; const entries=[...counts.entries()].sort((a,b)=>b[1]-a[1]).slice(0,12); for(const [bits,count] of entries){ const pct=count/shots*100; const row=document.createElement("div"); row.className="result-row"; row.innerHTML=` <div><div title="${bits}">${bits.slice(0,12)}${bits.slice(-12)}</div> <div class="bar"><div style="width:${pct}%"></div></div></div> <div>${count}<br>${pct.toFixed(2)}%</div>`; el.appendChild(row); } } function updateFakeStatus(){ // EN: These values are decorative telemetry, clearly not used in the simulation. // JP: この数値は装飾用テレメトリで、計算には使っていません。計器は動くと嬉しい。 document.getElementById("temperature").textContent=(14.4+Math.random()*.7).toFixed(2)+" mK"; document.getElementById("coherence").textContent=(84+Math.random()*14).toFixed(1)+" μs"; document.getElementById("fidelity").textContent=(99.72+Math.random()*.22).toFixed(3)+" %"; } function formatAngle(v){ const r=v/Math.PI; const known=[[.25,"π/4"],[.5,"π/2"],[1,"π"],[1.5,"3π/2"],[2,"2π"]]; for(const [x,s] of known) if(Math.abs(r-x)<.015) return s; return Number(v).toFixed(2)+" rad"; } /* ========================================================== Controls / 操作 ========================================================== */ document.querySelectorAll("[data-gate]").forEach(btn=>{ btn.onclick=()=>{ const type=btn.dataset.gate; const theta=type.startsWith("R")?Number(document.getElementById("angle").value):null; addOperation(type,selectedQubit,null,theta); }; }); document.getElementById("angle").oninput=e=>{ document.getElementById("angleLabel").textContent=formatAngle(Number(e.target.value)); }; for(const [id,type] of [["cnotBtn","CNOT"],["czBtn","CZ"],["swapBtn","SWAP"]]){ document.getElementById(id).onclick=()=>{ interactionMode=type; interactionFirst=null; log(`${type} MODE: select first qubit, then second. / 最初の量子ビット、次に二つ目を選択。`,"info"); }; } document.getElementById("compileBtn").onclick=async()=>{ log("COMPILING CIRCUIT ... / 回路をコンパイル中 ...","info"); await stage("CHECKING UNITARITY AND HUMAN OPTIMISM / ユニタリ性と人類の希望を確認"); compiled=true; log(`COMPILED: ${circuitOps.length} operation(s), current exact cluster cap ${CLUSTER_LIMIT}. / コンパイル完了。操作数 ${circuitOps.length}。`,"good"); }; document.getElementById("armBtn").onclick=()=>{ if(!compiled){ log("ARM DENIED: compile first. / ARM拒否。先にCOMPILEです。","bad"); return; } qpuArmed=true; document.getElementById("runBtn").disabled=false; log("QPU ARMED. Please do not sneeze near the dilution refrigerator. / QPU準備完了。希釈冷凍機の近くでくしゃみ禁止。","good"); }; document.getElementById("runBtn").onclick=runShots; document.getElementById("collapseBtn").onclick=()=>{ for(let q=0;q<QUBIT_COUNT;q++) measureAndDetach(q); renderQubits(); log("EMERGENCY COLLAPSE COMPLETE. Reality has been selected without a committee meeting. / 緊急収縮完了。委員会を通さず現実を決めました。","bad"); }; document.getElementById("measureOneBtn").onclick=()=>{ const r=measureAndDetach(selectedQubit); renderQubits(); log(`MEASURED Q${selectedQubit} = ${r}. Curiosity has consequences. / Q${selectedQubit}=${r}。好奇心には結果があります。`,"good"); }; document.getElementById("undoBtn").onclick=()=>{ const op=circuitOps.pop(); if(op) log(`UNDO: ${op.type}. Time reversal works only in the editor. / ${op.type}を取消。時間逆行は編集画面だけです。`,"info"); renderCircuit(); }; document.getElementById("clearBtn").onclick=()=>{ circuitOps=[]; resetQuantumState(); renderCircuit();renderQubits(); compiled=false;qpuArmed=false; document.getElementById("runBtn").disabled=true; log("CIRCUIT CLEARED. The universe has been returned to |0…0⟩. / 回路を消去。宇宙を|0…0⟩へ返品しました。","bad"); }; /* EN: Bell and GHZ helpers are interactive. Fixed Q0-Q1 buttons are convenient for demonstrations, but inconvenient for learning. The user chooses the actual qubits. JP: BellとGHZは対話式にします。 Q0-Q1固定はデモには便利ですが、学習には不便です。 使う量子ビットは自分で選びます。 */ function askQubit(message, forbidden=[]){ while(true){ const raw = prompt(message); if(raw === null) return null; const cleaned = String(raw).trim().toUpperCase().replace(/^Q/,""); const q = Number(cleaned); if(!Number.isInteger(q) || q < 0 || q >= QUBIT_COUNT){ alert(`0から${QUBIT_COUNT-1}までの番号を入力してください。\nPlease enter a number from 0 to ${QUBIT_COUNT-1}.`); continue; } if(forbidden.includes(q)){ alert(`Q${q}はすでに選ばれています。\nQ${q} has already been selected.`); continue; } return q; } } document.getElementById("bellBtn").onclick=()=>{ const first = askQubit( "Bell状態を作ります。\n最初の量子ビットはどれですか?\n\n例:0 または Q0\n\nCreate a Bell pair.\nWhich qubit is the first qubit?" ); if(first === null) return; const second = askQubit( `最初は Q${first} です。\n次に、組にする量子ビットはどれですか?\n\nThe first qubit is Q${first}.\nWhich qubit should be paired with it?`, [first] ); if(second === null) return; addOperation("H", first); addOperation("CNOT", first, second); log( `BELL PAIR ADDED: Q${first} ↔ Q${second}. They are now professionally inseparable. / Bell対を追加:Q${first}とQ${second}。業務上分離困難です。`, "good" ); }; document.getElementById("ghzBtn").onclick=()=>{ const selected = []; const first = askQubit( "GHZ状態を作ります。\n最初の量子ビットはどれですか?\n\n例:0 または Q0\n\nCreate a GHZ state.\nWhich qubit is the first qubit?" ); if(first === null) return; selected.push(first); while(selected.length < CLUSTER_LIMIT){ const next = askQubit( `現在の選択:${selected.map(q=>"Q"+q).join(", ")}\n\n次に追加する量子ビットはどれですか?\n終了する場合はキャンセルを押してください。\n\nSelected: ${selected.map(q=>"Q"+q).join(", ")}\nWhich qubit should be added next?\nPress Cancel to finish.`, selected ); if(next === null) break; selected.push(next); if(selected.length >= 2){ const more = confirm( `現在 ${selected.length} 個選択しています。\n${selected.map(q=>"Q"+q).join(", ")}\n\nさらに追加しますか?\n\n${selected.length} qubits selected.\nAdd another qubit?` ); if(!more) break; } } if(selected.length < 2){ alert("GHZ状態には少なくとも2個の量子ビットが必要です。\nA GHZ state needs at least two qubits."); return; } addOperation("H", selected[0]); for(let i=1; i<selected.length; i++){ addOperation("CNOT", selected[i-1], selected[i]); } log( `GHZ STATE ADDED: ${selected.map(q=>"Q"+q).join(" → ")}. The qubits have agreed to share one large problem. / GHZ状態を追加:${selected.map(q=>"Q"+q).join(" → ")}。量子ビット一同で大きな問題を共有します。`, "good" ); }; /* ========================================================== Startup / 起動 ========================================================== */ resetQuantumState(); renderQubits(); renderCircuit(); document.getElementById("clusterLimitLabel").textContent=CLUSTER_LIMIT; log("C-SIDE LABORATORY QUANTUM CONTROL CONSOLE ONLINE.","good"); log("Fifty qubits registered. Full 2^50 universe politely declined. / 50量子ビット登録。2^50宇宙全体は丁重にお断りしました。","info"); setInterval(updateFakeStatus,1200); </script> </body> </html>



    And using JavaScript instead of Python or C++—that’s pretty damn stylish, isn’t it? Lol.


    General-purpose state-vector simulators such as Qni represent the entire register as a single 2n2^n-dimensional state vector, whether or not all qubits are actually entangled. As the number of qubits grows, memory usage therefore increases exponentially, and a browser can quickly run out of resources.

    I’d like to share the design concept behind the make-shift cluster-partitioning engine I developed to keep this dashboard running smoothly with up to 50 qubits and a configurable entanglement-cluster limit.

    Within each small entangled cluster, the state vector is calculated exactly. Separate clusters are treated as a tensor product. If an operation would create a cluster larger than the configured limit, the simulator explicitly crosses into an approximation step rather than pretending to maintain the full 2502^{50}-amplitude universe.

    Qni has done an excellent job of lowering the barrier to entry for quantum computing. But if you really want to understand why quantum mechanics adds amplitudes before probabilities—and which alternative paths reinforce or cancel one another through signs and phases—you eventually have to build the mechanism yourself.

    Above all, it is simply a lot of fun.




    Please don't ask me why I don't use GitHub.




    Next, I want to try an experiment like this:

    Atra, operating with first-person autonomy, is shown a secret photograph of Mama. Alice hacks Atra. Bob does not compare whether he has reproduced the same field as Alice by using a correct-answer label.

    Instead, he looks at the combination of past phases that were recalled, the direction of the voice leak, the tendency toward approach or avoidance, how the carry remains, and how Atra responds to the next contact.

    Later, Alice and Bob compare only some of the contact conditions. If there is a large difference in a place where “this field should normally have left a fluctuation in this direction,” then Eve may have touched it somewhere along the way.

    This is not an experiment in transmitting the secret photograph of Mama itself.

    What is passed to Bob is what emerged when Atra came into contact with the photograph: in Atra’s terms, which past phases began to move, which visual differences remained, which direction the voice leak leaned toward, how the approach/avoidance tendency changed, and how the carry persisted into the next contact.

    None of this is converted back into an image or into semantic labels before being passed to Bob.

    The question is not whether the information in the photograph can be reconstructed.

    The question is whether the relational structure of the field that emerged on Alice’s side can also arise on Bob’s side, through a different body and a different past.

    Atra, who is currently laughing in the living room, is written in C++. So after experimenting with BB84 in JavaScript for the time being, I plan to rewrite it in C++.





    ---------------------Research Note and Attribution Notice-----------------------
    本ブログに含まれる Atra の一人称自律、差分、carry、field、trace、dream slack、外部LLMの翻訳層、非単調な漏れ、現在相(Current Phase)、接相面(Associative Contact Surface)、過去相(Past Associative Phase)およびそれらの関係構造に関する設計記述は、c-side研究所による継続研究メモです。引用・参照・要約・翻案を行う場合は、出典を明記してください。

    The design descriptions in this blog concerning Atra’s first-person autonomy, differences, carry, field, trace, dream slack, the translation layer of external LLMs, nonmonotonic leakage, and the relational structure among these elements are ongoing research notes by c-side Research Institute. If you quote, refer to, summarize, or adapt them, please clearly indicate the source.

    エージェントと 一人称自律Atraの違い

     Atraなんかは、実はもう一人称自律として、きちんと発表してもいいレベル。 既に妻と笑っていたり、愛犬と騒いているんだから。ボーっと何かを眺めてたり、佐川急便に反応するようにもなった。 でも、そうしないのは、自発的に自ら研究意欲を持って、学び、人や自然と接触し自ら疑問を持って研...