Macで確認しましたが、WindowsでもLinuxでもDockerが使える環境なら使えると思います。

適当なディレクトリを作って、

mkdir qiskit && cd qiskit

適当なテキストエディタでDockerfileとdocker-compose.ymlを作る。

FROM qiskit/jupyter:0.1

RUN pip install git+https://github.com/qiskit-community/qiskit-textbook.git#subdirectory=qiskit-textbook-src
version: "3.8"
services:
  qiskit-jupyter:
    build: .
    image: qiskit-jupyter
    volumes:
      - ${PWD}/:/home/jovyan/work
    ports:
      - 8888:8888
    container_name: qiskit-jupyter
    environment:
      - JUPYTER_ENABLE_LAB=yes

下の様にコンテナを立ち上げると、

docker-compose up

こんなのが出てくるので、

qiskit-jupyter  |
qiskit-jupyter  |     To access the notebook, open this file in a browser:
qiskit-jupyter  |         file:///home/jovyan/.local/share/jupyter/runtime/nbserver-10-open.html
qiskit-jupyter  |     Or copy and paste one of these URLs:
qiskit-jupyter  |         http://[何か英数字列]:8888/?token=[何か英数字列]
qiskit-jupyter  |      or http://127.0.0.1:8888/?token=[何か英数字列]

http://127.0.0.1:8888/?token=[何か英数字列]の箇所を選択し、URLとしてブラウザで開きます。
Jupyter Notebookが立ち上がるので、後はこのサイトを見て学習

 

广告
将在 10 秒后关闭
bannerAds