QProtSim

Installation

Start with the CPU installation below. It runs on your computer's processor and does not require a quantum computer or a graphics card. GPU options are available for users with compatible hardware.

Get QProtSim

You need Python 3.11 or later and a copy of the QProtSim repository. Download and extract the repository ZIP, then open a terminal in the extracted folder. If you use Git, you can get the same files with:

git clone https://github.com/pra-ashok/QProtSim.git
cd QProtSim

The commands on this page run from that folder. Check your Python version:

python --version

On systems where the command is python3, use python3 to create the environment in the next step.

Create an environment

A virtual environment keeps QProtSim's packages separate from your other Python tools.

python -m venv .venv

Activate it using the command for your terminal:

Terminal Activation command
Linux or macOS source .venv/bin/activate
Windows PowerShell .venv\Scripts\Activate.ps1
Windows Command Prompt .venv\Scripts\activate.bat

Then update the package installer:

python -m pip install --upgrade pip

Activate this environment again whenever you open a new terminal to use QProtSim.

CPU

Install QProtSim and its CPU simulator:

python -m pip install ".[cpu]"
qprotsim --help

The dot in .[cpu] means “install from this folder.” If the help text appears, continue to your first analysis.

Use this setting in your analysis configuration:

pl_device: default.qubit

pl_device names the simulator that runs the quantum circuit. The CPU installation also includes lightning.qubit, an alternative CPU simulator. You can select it by changing that value.

If installation reports a missing compiler or a failed FreeSASA build, see installation troubleshooting. FreeSASA is the tool QProtSim uses to estimate how much of each residue is exposed to solvent.

Optional GPU execution

A GPU is a graphics processor that can also run numerical calculations. Choose the option matching your hardware and system software:

Hardware Install from the QProtSim folder Configuration setting
Supported NVIDIA GPU with CUDA python -m pip install ".[cuda]" pl_device: lightning.gpu
Supported AMD GPU with ROCm python -m pip install ".[rocm]" pl_device: lightning.amdgpu

These packages use PennyLane Lightning 0.44.0. Installing a GPU package does not install your graphics driver or make every GPU compatible. Check the requirements for your chosen simulator before installing: NVIDIA requirements · AMD requirements.

Verify the backend

A backend is the simulator used to execute the circuit. QProtSim can continue on the CPU when a requested backend is unavailable. The report lists the requested backend, so that label alone does not confirm GPU execution.

Before measuring GPU performance, run this small check in Python. Replace lightning.qubit with your chosen device name. A successful run prints the device name and a sample shape of (100, 2).

import pennylane as qml

device = qml.device("lightning.qubit", wires=2)

@qml.set_shots(100)
@qml.qnode(device)
def check_backend():
    qml.Hadamard(wires=0)
    qml.CNOT(wires=[0, 1])
    return qml.sample(wires=[0, 1])

samples = check_backend()
print(device.name, samples.shape)

If this check fails, resolve the backend error or use default.qubit for CPU execution.

Optional structure pictures

QProtSim can include pictures of the protein in its report. To enable PyMOL rendering where a compatible package is available, install:

python -m pip install ".[visualization]"

PyMOL is optional. Other image sources and simpler structure drawings are available when it is absent.