Skip to content

Commit 4e097de

Browse files
committed
Merge branch 'publicrelease_25.11.1' into 'main'
sync with internal repo1 (commit 4bd6388bd) See merge request cuda-hpc-libraries/cuquantum-sdk/cuquantum-public!43
2 parents 643fd05 + abbe5cb commit 4e097de

7 files changed

Lines changed: 30 additions & 10 deletions

File tree

python/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ Runtime dependencies of the cuQuantum Python package include:
5353
* Driver: Linux (525.60.13+ for CUDA 12, 580.65.06+ for CUDA 13)
5454
* CUDA Toolkit 12.x or 13.x
5555
* cuStateVec 1.11.0+
56-
* cuTensorNet 2.10.0+
56+
* cuTensorNet 2.10.1+
5757
* cuDensityMat >=0.3.2, <0.4.0
5858
* cuPauliProp >=0.1.0, <0.2.0
5959
* cuStabilizer >=0.1.0, <0.2.0

python/cuquantum/_version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@
55
# Note: cuQuantum Python follows the cuQuantum SDK version, which is now
66
# switched to YY.MM and is different from individual libraries' (semantic)
77
# versioning scheme.
8-
__version__ = '25.11.0'
8+
__version__ = '25.11.1'

python/setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
'nvmath-python==0.6.0', # strict version before nvmath.internal module is stable
3838
# 'torch', # <-- PyTorch is optional; also, the PyPI version does not support GPU...
3939
f'custatevec-cu{utils.cuda_major_ver}~=1.11', # ">=1.11.0,<2"
40-
f'cutensornet-cu{utils.cuda_major_ver}~=2.10', # ">=2.10.0,<3"
40+
f'cutensornet-cu{utils.cuda_major_ver}>=2.10.1, <3', # ">=2.10.0,<3"
4141
f'cudensitymat-cu{utils.cuda_major_ver}>=0.3.2, <0.4', # ">=0.3.2,<0.4.0"
4242
f'cupauliprop-cu{utils.cuda_major_ver}>=0.1.0, <0.2', # ">=0.1.0,<0.2.0"
4343
f'custabilizer-cu{utils.cuda_major_ver}>=0.1.0, <0.2', # ">=0.1.0,<0.2.0"

python/tests/cuquantum_tests/tensornet/experimental/_internal/mps_utils.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -213,6 +213,7 @@ def _swap(self, i, direction, exact=False):
213213
else:
214214
svd_options = self.svd_options.copy()
215215
svd_options['max_extent'] = min(self.max_extents[a], mid_extent)
216+
216217
self[a], s, self[b] = tensor_decompose(decompose_expr, tmp, method='svd', **svd_options)
217218
if s is not None:
218219
self.gauges[b] = self.backend.asarray(s)
@@ -395,19 +396,18 @@ def _apply_gate_2q(self, i, j, operand):
395396
else:
396397
# insert swap gates recursively
397398
swaps = []
398-
exact = self.is_exact_svd
399399
while (j != i+1):
400-
self._swap(i, 'right', exact)
400+
self._swap(i, 'right', False)
401401
swaps.append([i, 'right'])
402402
i += 1
403403
if (j == i+1):
404404
break
405-
self._swap(j, 'left', exact)
405+
self._swap(j, 'left', False)
406406
swaps.append([j, 'left'])
407407
j -= 1
408408
self._apply_gate_2q(i, j, operand)
409409
for x, direction in swaps[::-1]:
410-
self._swap(x, direction=direction, exact=exact)
410+
self._swap(x, direction=direction)
411411

412412
def apply_gate(self, qudits, operand):
413413
gauge_option = self.gauge_option
@@ -570,7 +570,6 @@ def from_factory(cls, factory, **kwargs):
570570
mps_tensors = None
571571
qudit_dims = factory.state_dims
572572
mps = cls(qudits, factory.backend, qudit_dims=qudit_dims, mps_tensors=mps_tensors, dtype=factory.dtype, **kwargs)
573-
574573
for op, modes, gate_info in factory.sequence:
575574
if gate_info is None:
576575
if isinstance(op, (list, tuple)):

python/tests/cuquantum_tests/tensornet/experimental/_internal/state_matrix.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ def create_state_factory(*args, **kwargs):
155155

156156
generic_states_L1 = [
157157
create_state_factory(5, "float32", "SDDS", next(rng_iterator)),
158-
create_state_factory((2, 3, 4, 3, 2), "complex64", "SDDDS", next(rng_iterator), adjacent_double_layer=False),
158+
create_state_factory((2, 3, 4, 3, 2), "complex64", "SDDS", next(rng_iterator)),
159159
create_state_factory(5, "complex64", "SDMS", next(rng_iterator), adjacent_double_layer=False, mpo_bond_dim=3),
160160
create_state_factory(4, "float64", "SDMDS", next(rng_iterator), mpo_bond_dim=2, mpo_num_sites=3, mpo_geometry="random-ordered"),
161161
create_state_factory((2, 5, 3, 2), "complex128", "SDMDS", next(rng_iterator), mpo_bond_dim=2, mpo_geometry="random"),

python/tests/cuquantum_tests/tensornet/experimental/test_network_state.py

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -341,6 +341,27 @@ def test_negative_complex_circuit(self, circuit, backend, dtype):
341341
with NetworkState.from_circuit(circuit, backend=backend, dtype=dtype) as state:
342342
pass
343343
assert "imaginary part" in str(e.value)
344+
345+
def test_mps_with_fixed_bond_truncation(self):
346+
num_qubits = 6
347+
num_double_layers = 2
348+
349+
config = MPSConfig(max_extent=3)
350+
state = NetworkState((2, ) * num_qubits, dtype='float64', config=config)
351+
352+
for i in range(num_qubits):
353+
state.apply_tensor_operator((i,), np.random.random([2, 2]))
354+
355+
for _ in range(num_double_layers):
356+
for i in range(2):
357+
for j in range(i, num_qubits-1, 2):
358+
state.apply_tensor_operator((j, j+1), np.random.random([2, 2, 2, 2]))
359+
360+
state.apply_tensor_operator((1, 3), np.random.random([2, 2, 2, 2]))
361+
362+
with state:
363+
mps = state.compute_output_state()
364+
assert mps is not None
344365

345366

346367
@pytest.fixture(params=CircuitStateMatrix.L1(), scope="class")

samples/custabilizer/custabilizer_demo.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
* Copyright (c) 2025, NVIDIA CORPORATION & AFFILIATES.
33
*
44
* SPDX-License-Identifier: BSD-3-Clause
5-
*/
5+
*/
66

77
#include <iostream>
88
#include <vector>

0 commit comments

Comments
 (0)