Simulacao generica de caminhadas quanticas discretas (MSLQW-PPI) por dispatcher de estrutura (hipercubo, grade, ...)
Project description
QuantumWalkSimulation
Simulacao generica de caminhadas quanticas discretas (MSLQW-PPI —
Multi-self-loop Lackadaisical Quantum Walk com Inversao Parcial de Fase,
Souza et al., arXiv:2305.19614) via uma unica funcao qw(), parametrizada
por base, degree e structure. A moeda lackadaisical e o oraculo de
inversao parcial sao os mesmos independente da estrutura; apenas o
deslocamento (shift) muda, escolhido internamente por dispatcher:
structure="hypercube"-> shift por distancia de Hamming (bit flip)structure="grid"-> shift por distancia de Manhattan (grade periodica)
Instalacao
pip install QuantumWalkSimulation
Uso
from QuantumWalkSimulation import qw
# Hipercubo Q_3 (N = 2**3 = 8 vertices)
r = qw(
base=2, degree=3, num_selfloop=3, t_f=100,
weight_value=1/8, marked_vertices=[0],
inverted_self_loops=2, structure="hypercube",
)
# Grade 4x4 (N = 4**2 = 16 vertices; degree = 2*n_dims)
r = qw(
base=4, degree=4, num_selfloop=3, t_f=100,
weight_value=1/16, marked_vertices=[0],
inverted_self_loops=2, structure="grid",
)
r.probs # (t_f, N)
r.det_times # (t_f,)
r.peak_detection
r.peak_step
Parametros
| Parametro | Tipo | Descricao |
|---|---|---|
base |
int |
N = base ** n_dims. Hipercubo exige base=2. |
degree |
int |
Grau do vertice. Hipercubo: degree = n_dims. Grade: degree = 2 * n_dims (par). |
num_selfloop |
int |
m self-loops por vertice. |
t_f |
int |
Passos de simulacao. |
weight_value |
float |
Peso l do self-loop. |
marked_vertices |
list[int] |
Vertices marcados. |
inverted_self_loops |
int |
s: quantos dos m self-loops tem fase invertida (1 <= s <= m). |
structure |
str |
"hypercube" ou "grid". |
Licenca
MIT
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file quantumwalksimulation-0.1.1.tar.gz.
File metadata
- Download URL: quantumwalksimulation-0.1.1.tar.gz
- Upload date:
- Size: 6.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6c1a15988488660a91c927f34ec26d50f60975310bee3bb9a84698717661a646
|
|
| MD5 |
1abca8f44fcc715a265a66109b310111
|
|
| BLAKE2b-256 |
741bf4778ab4d6fb16b9a932b65aae3748aa3674c3eb149812414ff0206546af
|
File details
Details for the file quantumwalksimulation-0.1.1-py3-none-any.whl.
File metadata
- Download URL: quantumwalksimulation-0.1.1-py3-none-any.whl
- Upload date:
- Size: 6.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b0f89c0da99dfc59529481d52189e33f0ecdd00bbe2e03af0a7777c90a608705
|
|
| MD5 |
e634ef929d13a58bf7f9fe1968b4617e
|
|
| BLAKE2b-256 |
1a1ea64aaff1f38bb9b41ac0eab72f6d3f6e886f2c5911ce8b4411fb974d1bb8
|