ラベル CMOS Annealing web の投稿を表示しています。 すべての投稿を表示
ラベル CMOS Annealing web の投稿を表示しています。 すべての投稿を表示

2023年4月11日火曜日

App Inventor FoundationのNatalie Lao, Ph.D.との対談

This visit and conversation is featured on the App Inventor Foundation news site (here)!
It is also introduced on the official Facebook , Instagram and Twitter.
 2023年4月7日(金)に、App Inventor FoundationのExecutive DirectorであるNatalie Lao, Ph.D.が、 Dr. Nicholas Kwokとともに神奈川工科大学を訪問され、小生(山本富士男)、田中博教授(情報工学科)、鷹野教授(情報工学科・国際センター所長)と対談いたしました。また、田中(博)研究室では須藤康裕准教授(情報工学科)も加わり、MIT App Inventorなどを利用して開発したデモ説明を実施いたしました。


対談の詳細は、下記の神奈川工科大学ニュース(KAITニュース)をご覧ください。


------------------------------------------------------------------------
ところで、KAITニュースには載せていない当日のデモ模様から
------------------------------------------------------------------------
(1)ソーラーカーレースのリアルタイムモニタ
彼女はこれに大変興味を示し、「スクリーンをビデオに撮りたいのでもう一度デモして」と言ったのでそうしました。以下のビデオは彼女が撮影したもの。(実際のものより解像度を落としてあります。)

(2)量子アニーリングのスマホアプリ
他にもいくつか、デモしたのですが、このアプリ(ライブデモ)もちょっと盛り上がりました!
オーノー、something wrong! がこちら。
トライアゲン... Good, good!、がこちら。
私の4Gスマホ(5Gは持っていません!)と日立CMOS Annealingマシンとの交信です。Elapsed timeはちょっと長かったのですが、実アニーリング時間は72msほどでした。このアプリでは、各画素とその隣接8方向の画素を用いてエネルギー関数(コスト関数)を構成します。それをスマホでやるので、少し重い処理になります。

(3)ゲート型量子コンピューティングのApp Inventorチュートリアル
まだ、構想段階だが、ゲート型量子コンピューティングのチュートリアル的アプリをApp Inventorで作りたい。ということも話しました。先方も、何らかの形で、IBMのQuantumマシンを使っているとのことでした。マスコットとしての、私の自作ブロッホ球を机の上に置いて披露しました!ちょっとはウケたような。

2022年9月1日木曜日

Image noise reduction based on quantum annealing

Abstract

This app uses quantum annealing, a type of quantum computing, to reduce noise in binary images. For this purpose, a model called an Ising model, which consists of the interrelationships of pixels after adding noise, is constructed, and sent to the Annealing WEB service using App Inventor's web function. Noise reduction is displayed on the smartphone screen based on the spin information corresponding to the pixels returned from the web service. This app, which runs on familiar smartphones, lets you experience the processing of a quantum annealing machine that is different from existing computers.

This app is published here: source code  
source code: MIT App Inventor Gallery
(If you need pre-built .apk file, please contact me.)

This app won the "2022 September's MIT APP INVENTOR OF THE MONTH" award. 

Noise reduction using Annealing web service

Here, we will use Hitachi's CMOS Annealing cloud web service. Designate the original image on your smartphone, add a small amount of random noise to it, and use it as the input image. In preparation for removing that noise, we map each black and white pixel to a spin up or down (in quantum mechanics). And we also describe the connection relations between those spins. After that, we construct an energy function (or cost function) that describes the properties that neighboring pixels (spins) should have after noise reduction. In other words, this creates an Ising model. Sending it to the web service will give you the spin direction that minimizes the energy function value. Based on that, it generates a noise-reduced image. A more detailed explanation of this method can be found on the Hitachi web page below:
https://annealing-cloud.com/en/tutorial/1.html

Noise reduction application created with MIT App Inventor

Figure 1 shows an application created with MIT App Inventor based on this method. The procedure for its use is shown at the bottom of the figure. First of all, in order to use this Annealing Web service, please obtain an access token from the Hitachi website below. You can get it for free. The expiration date is one month, but you can renew the expiration date if necessary. You will need to paste this token into the input field at the top of the app.
https://annealing-cloud.com/en/web-api/token-request.html

There are several parameters to control this annealing. Some of them can be changed from this screen. For the meaning of the parameters, see the Hitachi website above. Here we use a simple preset image (a simple illustration of a dog), but you can easily replace it with your own image. You can also observe by changing the size of the image and the number of noises (number of pixels).

It may take some time for the web service to respond, so please be patient!
If the noise reduction results seem strange or you get an error, please wait a while and try again!

Results of noise reduction in this method

This app is not aimed at practical noise reduction, but is a demo app that shows the possibilities of the quantum annealing method. Therefore, it will not cope well with images that are too complex or too much noise. Some execution results are shown in Figure 2. From these results, we can see the characteristics of this method. In other words, it can be confirmed that isolated noise within white or black areas is easy to remove, but noise near black and white borders is difficult to remove.

Main blocks of this app

The main MIT App Inventor blocks for this app are shown in Fig.3. There are two parts. Part (a) is for starting the Annealing Web service. An energy function (Ising model) required for noise reduction is set in the variable "model_list". The energy function contains two formulas. One is for the number of pixels in which black and white are reversed in the input image and the denoised image. The second is for the number of pairs of pixels in which adjacent pixels have the same value in the image after noise removal. Also, part (b) processes the result (information about spin) received as Json text from the web service.

Acknowledgments

This application is based on the explanation on the website of Hitachi, Ltd. below:
https://annealing-cloud.com/en/index.html
We would like to thank Dr. Masanao Yamaoka of Hitachi, Ltd., who developed the CMOS annealing machine, for answering various technical questions.