Create a shell script with the following content. This allows a local development environment for SQuADDS.
#!/bin/bash
# Ensure script fails if any command fails
set -e
# Specify the env will be emulating x86 | |
CONDA_SUBDIR=osx-64 conda create -n <env_name> python=3.10 | |
# Activate env | |
conda activate <env_name> | |
# Set env to fetch x86 packages | |
conda config --env --set subdir osx-64 | |
# Install qiskit metal | |
pip install qiskit-metal | |
# Install just the notebook component of jupyter | |
# Don't install the full 'jupyter' package which will lead to qt conflicts |
import requests | |
import time | |
import os | |
import sys | |
import openai | |
import tiktoken | |
from termcolor import colored | |
openai.api_key = open(os.path.expanduser('~/.openai')).read().strip() |
There was no one resource avaiable online that walks through the process of installing qiskit-metal on a M1 Mac (Apple Silicon).
Hoping this helps others.
conda environment
with python 3.10 or 3.11 and configure it to emulate x86
CONDA_SUBDIR=osx-64 conda create -n <env_name> python=3.11
conda activate <env_name>
conda config --env --set subdir osx-64