Skip to content
Open
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 pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ dev = [
"pre-commit>=3.0.0",
"maturin>=1.10.2",
"patchelf>=0.17.2.4",
"torch>=2.2,<=2.9.0",
"torch==2.11.0",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

torch moved from a version range (>=2.2,<=2.9.0 / >=2.2,<=2.12.0 in qdp-python) to an exact pin torch==2.11.0. Stricter than the rest of the file's range-based convention and not explained in the PR. Consider a range instead, or state the reason for pinning.

"numpy>=1.24,<2.0",
"setuptools>=80.9.0",
"tensorflow>=2.20",
Expand Down
8 changes: 4 additions & 4 deletions qdp/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion qdp/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ prost = "0.12"
prost-build = "0.12"
bytes = "1.11"
# PyTorch tensor loading (optional)
tch = "0.22"
tch = "0.24"
# Optional: vendored protoc to avoid build failures when protoc is missing
protoc-bin-vendored = "3"
# Remote I/O (S3, GCS, Azure) via object_store
Expand Down
4 changes: 2 additions & 2 deletions qdp/qdp-python/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -31,15 +31,15 @@ dynamic = ["version"]
[dependency-groups]
dev = [
"pytest",
"torch>=2.2,<=2.12.0",
"torch==2.11.0",
"triton>=3.0",
]
benchmark = [
"numpy>=1.24,<2.0",
"pandas>=2.0",
"pyarrow>=14.0",
"tensorflow>=2.20",
"torch>=2.2,<=2.12.0",
"torch==2.11.0",
"triton>=3.0",
"qiskit>=1.0",
"qiskit-aer>=0.17.2",
Expand Down
1,551 changes: 826 additions & 725 deletions qdp/qdp-python/uv.lock

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions qumat/amazon_braket_backend.py
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ def execute_circuit(
else:
task = backend.run(circuit, shots=shots)
result = task.result()
return result.measurement_counts # ty: ignore[possibly-missing-attribute]
return result.measurement_counts # ty: ignore[unresolved-attribute]


# placeholder method for use in the testing suite
Expand All @@ -155,7 +155,7 @@ def get_final_state_vector(
result = backend.run(circuit, shots=0, inputs=inputs).result()
else:
result = backend.run(circuit, shots=0).result()
state_vector = result.values[0] # ty: ignore[possibly-missing-attribute]
state_vector = result.values[0] # ty: ignore[unresolved-attribute]

return state_vector

Expand Down
2 changes: 1 addition & 1 deletion qumat/qiskit_backend.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ def initialize_backend(backend_config: Mapping[str, Any]) -> AerSimulator:
else:
backend = AerSimulator(method=simulator_type)

backend.shots = shots # type: ignore[assignment, misc] # runtime-settable
backend.shots = shots # ty: ignore[unresolved-attribute] # runtime-settable
return backend


Expand Down
18 changes: 9 additions & 9 deletions testing/utils/amazon_braket_helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,27 +49,27 @@ def get_native_example_final_state_vector(
# Initialize to desired state
for i, bit in enumerate(initial_state_ket_str):
if bit == "1":
circuit.x(i) # type: ignore[unresolved-attribute]
circuit.x(i) # ty: ignore[unresolved-attribute]

# Create entanglement between qubits 1 and 2
circuit.h(1) # type: ignore[unresolved-attribute]
circuit.cnot(1, 2) # type: ignore[unresolved-attribute]
circuit.h(1) # ty: ignore[unresolved-attribute]
circuit.cnot(1, 2) # ty: ignore[unresolved-attribute]

# Prepare the state to be teleported on qubit 0
circuit.h(0) # type: ignore[unresolved-attribute]
circuit.z(0) # type: ignore[unresolved-attribute]
circuit.h(0) # ty: ignore[unresolved-attribute]
circuit.z(0) # ty: ignore[unresolved-attribute]

# Perform Bell measurement on qubits 0 and 1
circuit.cnot(0, 1) # type: ignore[unresolved-attribute]
circuit.h(0) # type: ignore[unresolved-attribute]
circuit.cnot(0, 1) # ty: ignore[unresolved-attribute]
circuit.h(0) # ty: ignore[unresolved-attribute]

# Add state_vector result type to get the final state
circuit.state_vector() # type: ignore[unresolved-attribute]
circuit.state_vector() # ty: ignore[unresolved-attribute]

# Run the circuit
result = device.run(circuit, shots=0).result()

# Get the state vector (values is a complex numpy array)
state_vector = result.values[0] # type: ignore[possibly-missing-attribute]
state_vector = result.values[0] # ty: ignore[unresolved-attribute]

return state_vector
2 changes: 1 addition & 1 deletion testing/utils/qiskit_helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ def get_native_example_final_state_vector(
qc.h(0) # Apply Hadamard gate on qubit 0

# Add save_statevector instruction
qc.save_statevector() # type: ignore[unresolved-attribute] # qiskit-aer extension
qc.save_statevector() # ty: ignore[unresolved-attribute] # qiskit-aer extension

# Simulate the circuit
transpiled_qc = transpile(qc, simulator)
Expand Down
Loading
Loading