qWalkBuilder is an open-source python library for building and executing well-defined discrete-time quantum walks in Qiskit
To install the qWalkBuilder
library, follow these steps:
-
Clone the repository:
git clone https://github.com/sagnikpal2004/qWalkBuilder.git cd qWalkBuilder
-
Create a virtual environment (optional but recommended):
python -m venv .venv source .venv/bin/activate
-
Install the
qWalkBuilder
library:pip install .
Build a quantum walk with a two-qubit Hadamard coin and a 4x4 node Torus shift operator, initializing from a single node state.
Measure at time 10 on the Z-basis and print the probabilities for each state
import qWalkBuilder as qWB
qw = qWB.QuantumWalk("H.2", "T.[4,4]", "singleNode")
result = qw.time(10).run("measure_z")
print(f"Probabilities: {result}")
16nT
: 4x4 node Torus
H
: Hadamard
uniform
: Uniform superpositon over all qubitssingle
: No superposition