2020年7月27日月曜日

研究費と審査員の関係

大久保三代さんのブログ:
https://web.archive.org/web/20200727150033/https://ameblo.jp/okb-34/entry-12613645240.html

慶應の末端研究員だったころ、研究費の取り方を

教えてもらうために、当時医系技官だった愉一に

近づいた私。その努力実って獲得したのが

 

厚生労働省老人保健健康増進等事業 主任研究員


とか


申請書や予算書は、夫が書いてくれた。今だからいえる話。


というようなことが書いてある。

国会議員も勤めていらっしゃった方なので、いろいろとびっくりしている。




2020年7月17日金曜日

Rewriting sample codes in Quantum Algorithm Implementations for Beginners (Bell state)

I have changed the strategy of learning Quantum algorithms.
Now, I am following  "Quantum Algorithm Implementations for Beginners".

The first trial is to construct Bell state and check if the understanding is correct.
By running my sample code the numbers of measurements observed in 1000 trials are;
|00>:494, |01>:0, |10>:0, |11>:506
There is a good agreement with the textbook

A sample code is;
Q# (Program.qs)
namespace Bell2 {

    open Microsoft.Quantum.Canon;
    open Microsoft.Quantum.Intrinsic;
    
    operation Bell() : (Int,Int,Int,Int) {
        Message("Hello quantum world!");

        mutable n00 = 0;
        mutable n01 = 0;
        mutable n10 = 0;
        mutable n11 = 0;

        for(trian in 1..1000){
        using ( (qubit0, qubit1) = (Qubit(), Qubit()) ){
            H(qubit0);
            CNOT(qubit0,qubit1);

            let res0 = M(qubit0);
            let res1 = M(qubit1);

            if(res0 == Zero){
                if(res1 == Zero){
                    set n00 += 1;
                }else{
                    set n01 += 1;
                }
            }else{
                if(res1 == Zero){
                    set n10 += 1;
                }else{
                    set n11 += 1;
                }

            }
            Reset(qubit0);
            Reset(qubit1);
        }
        }

        //Message("00:#, 01:#, 10:#, 11:#");
        return(n00,n01,n10,n11);
    }
}

C# (Driver.cs)

using System;

using Microsoft.Quantum.Simulation.Core;
using Microsoft.Quantum.Simulation.Simulators;

namespace Bell2
{
    class Driver
    {
        static void Main(string[] args)
        {
            using (var qsim = new QuantumSimulator())
            {
            long a,b,c,d;
            (a,b,c,d) = Bell.Run(qsim).Result;
            Console.WriteLine("{0},{1},{2},{3}",a,b,c,d);
            }

            
        }
    }
}

Otherwise, files are created automatically when one creates a new project, namely,
  • Go to View -> Command Palette
  • Select Q#: Create New Project
  • Select Standalone console application
  • Navigate to the location on the file system where you would like to create the application
  • Click on the Open new project... button, once the project has been created

2020年7月15日水曜日

Install GCC 10 with SPACK on Redhat 6

Spack looks good and I am playing around it.
However, the very basic component GCC10 cannot be installed with the following error by default;
"~binutils" conflicts with "gcc@7: arch=linux-rhel6-None" [New GCC cannot use system assembler on RHEL6]

The circumvent is:
% spack install gcc+binutils

Still not completed, but looks installing.

2020年6月26日金曜日

SC19の論文出版

されました。

https://link.springer.com/chapter/10.1007%2F978-3-030-49943-3_2

誰も教えてくれないのに、Researchgateとか、ORCIDとかが察知していたのでわかった。
ので、まだ、抜き刷りもらってません。

2020年6月16日火曜日

ROCm on Ubuntu 20.04

Just installed ROCm on Ubuntu 20.04, even though my GPU is a bit (too) old (R9 290).

Basically just followed the following site to the line of;
sudo apt install rocm-libs hipcub miopen-hip

A bit confusing point is; we need to do
% . /etc/profile.d/rocm.sh
after the installation of packages.

2020年5月24日日曜日

Error in Matrix Makert IO function (C)

I feel that there is an error in I/O functions of the Matrix Market Routine (https://math.nist.gov/MatrixMarket/mmio-c.html) .

mm_is_* functions in mmio.h expects that descriptions in matrix files are in the upper case, but 
at least those in bcsstk14.mtx are all in the lower case.

Then, the following modifications should work;

/********************* MM_typecode query fucntions ***************************/

#define mm_is_matrix(typecode)  ((typecode)[0]=='M' || (typecode)[0]=='m')

#define mm_is_sparse(typecode)  ((typecode)[1]=='C' || (typecode)[1]=='c')
#define mm_is_coordinate(typecode)((typecode)[1]=='C' || (typecode)[1]=='c')
#define mm_is_dense(typecode)   ((typecode)[1]=='A' || (typecode)[1]=='a')
#define mm_is_array(typecode)   ((typecode)[1]=='A' || (typecode)[1]=='a')

#define mm_is_complex(typecode) ((typecode)[2]=='C' || (typecode)[2]=='c')
#define mm_is_real(typecode)    ((typecode)[2]=='R' || (typecode)[2]=='r')
#define mm_is_pattern(typecode) ((typecode)[2]=='P' || (typecode)[2]=='p')
#define mm_is_integer(typecode) ((typecode)[2]=='I' || (typecode)[2]=='i')

#define mm_is_symmetric(typecode)((typecode)[3]=='S' || (typecode)[3]=='s')
#define mm_is_general(typecode) ((typecode)[3]=='G' || (typecode)[3]=='g')
#define mm_is_skew(typecode)    ((typecode)[3]=='K' || (typecode)[3]=='k')
#define mm_is_hermitian(typecode)((typecode)[3]=='H' || (typecode)[3]=='H')


2020年3月16日月曜日

Q# + C# on Ubuntu 18.04

職場の計算機が使えないので、Q#勉強用の環境をLinuxに構築。
VS Codeはインストールできているとして、C#の環境は以下で簡単に構築可能。

https://docs.microsoft.com/ja-jp/dotnet/core/install/linux-package-manager-ubuntu-1804