Install FlagQuantum#
Read Requirements before proceeding.
Steps#
Install FlagQuantum
Install the released package
python -m pip install flagquantum
Install a development checkout with the development tools
git clone https://github.com/flagos-ai/FlagQuantum.git cd FlagQuantum python -m pip install -e ".[dev]"
Add the optional dependencies you need
python -m pip install -e ".[jax,cuda,viz]"
Use the group names in Requirements instead of installing external frameworks by hand, so that pinned compatibility windows are kept.
Verify the installation
import flagquantum as fq print(fq.__version__)
Verify a local execution path
python -m examples.local.simulate python -m examples.local.measure python -m examples.local.train
These three examples cover local statevector simulation, measurements, and PyTorch-native training without credentials, remote resources or optional backends.
Development containers#
The repository also ships development container definitions for CPU and CUDA environments, with and without JAX and the QSteed compiler. Follow the container guide in the repository when you prefer a prepared environment; the images install FlagQuantum from the checkout and include JupyterLab, and none of them contain provider credentials.