Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/functional_tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
python-version: ["3.9", "3.10", "3.11", "3.12"]

steps:
- uses: actions/checkout@v3
Expand Down
12 changes: 12 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -336,3 +336,15 @@ es_runs/
.vscode-upload.json

mnist_data/

configs.yml
debug_qiskit.txt
fix_note.txt
h2_new.txt
max-acc-valid.pt
model.pt
.cursor/rules/*.mdc

.cursorignore
.cursor/
.github/copilot-instructions.md
5 changes: 3 additions & 2 deletions examples/QuantumNAS/quantumnas.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -4056,7 +4056,8 @@
"toc_visible": true
},
"kernelspec": {
"display_name": "Python 3",
"display_name": "torchquantum",
"language": "python",
"name": "python3"
},
"language_info": {
Expand All @@ -4069,7 +4070,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.8.16"
"version": "3.9.20"
},
"widgets": {
"application/vnd.jupyter.widget-state+json": {
Expand Down
2 changes: 1 addition & 1 deletion examples/gradient_pruning/callbacks.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
from torchpack.utils.logging import logger
from torchpack.utils.typing import Trainer
from torchpack import distributed as dist
from torchquantum.super_utils import get_named_sample_arch
from torchquantum.algorithm.quantumnas.super_utils import get_named_sample_arch
from torchquantum.util import legalize_unitary


Expand Down
6 changes: 3 additions & 3 deletions examples/regression/new_run_regression.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,13 +46,13 @@


def gen_data(L, N):
omega_0 = np.zeros([2**L], dtype="complex_")
omega_0 = np.zeros([2**L], dtype=complex)
omega_0[0] = 1 + 0j

omega_1 = np.zeros([2**L], dtype="complex_")
omega_1 = np.zeros([2**L], dtype=complex)
omega_1[-1] = 1 + 0j

states = np.zeros([N, 2**L], dtype="complex_")
states = np.zeros([N, 2**L], dtype=complex)

thetas = 2 * np.pi * np.random.rand(N)
phis = 2 * np.pi * np.random.rand(N)
Expand Down
6 changes: 3 additions & 3 deletions examples/regression/run_regression.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,13 +40,13 @@


def gen_data(L, N):
omega_0 = np.zeros([2**L], dtype="complex_")
omega_0 = np.zeros([2**L], dtype=complex)
omega_0[0] = 1 + 0j

omega_1 = np.zeros([2**L], dtype="complex_")
omega_1 = np.zeros([2**L], dtype=complex)
omega_1[-1] = 1 + 0j

states = np.zeros([N, 2**L], dtype="complex_")
states = np.zeros([N, 2**L], dtype=complex)

thetas = 2 * np.pi * np.random.rand(N)
phis = 2 * np.pi * np.random.rand(N)
Expand Down
2 changes: 1 addition & 1 deletion examples/save_load_example/save_load.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ def save_load2():

torch.save(model, "model_whole.pt")

model2 = torch.load("model_whole.pt")
model2 = torch.load("model_whole.pt", weights_only=False)
y2 = model2(x)
print(y2)
assert torch.equal(y, y2)
Expand Down
24 changes: 24 additions & 0 deletions requirement_update.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@

dill
matplotlib
nbsphinx
numpy

opt_einsum
pathos
pylatexenc
pyscf
qiskit
recommonmark
qiskit_ibm_runtime
qiskit-aer

scipy
setuptools
tensorflow
torch
torchdiffeq
torchpack
torchquantum
torchvision
tqdm
8 changes: 4 additions & 4 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ opt_einsum
pathos>=0.2.7
pylatexenc>=2.10
pyscf>=2.0.1
qiskit>=0.39.0,<1.0.0
qiskit==1.4.3
recommonmark
qiskit_ibm_runtime==0.20.0
qiskit-aer==0.13.3
qiskit_ibm_runtime
qiskit-aer

scipy>=1.5.2
setuptools>=52.0.0
Expand All @@ -21,4 +21,4 @@ torchdiffeq>=0.2.3
torchpack>=0.3.0
torchquantum>=0.1
torchvision>=0.9.0.dev20210130
tqdm>=4.56.0
tqdm>=4.56.0
30,302 changes: 30,302 additions & 0 deletions sec1_basic.ipynb

Large diffs are not rendered by default.

Loading
Loading