pytket-cutensornet¶
pytket-cutensornet
is an extension to pytket
that allows pytket
circuits and
expectation values to be simulated using cuTensorNet.
cuTensorNet is a high-performance library for tensor network computations, developed by NVIDIA. It is part of the cuQuantum SDK – a high-performance library aimed at quantum circuit simulations on the NVIDIA GPU chips.
We provide two core functionalities:
Full tensor network contraction: use
tk_to_tensor_network
to translate apytket
circuit to aTensorNetwork
and obtain expectation values and amplitudes via full tensor network contraction usingcuQuantum
’s optimised contraction path.Matrix Product State (MPS): use
simulate
to simulate apytket
circuit, returning anMPS
representation of the output state, of which you can thenget_amplitude
or calculate inner products with other MPS viavdot
.
Currently, only single-GPU calculations are supported, but a multi-GPU execution will be
implemented in the due course using mpi4py
library.
pytket-cutensornet
is available for Python 3.10, 3.11 and 3.12 on Linux.
In order to use it, you need access to a Linux machine with an NVIDIA GPU of Compute Capability +7.0 (check it here) and first install cuQuantum Python
following their installation
instructions.
This will include the necessary dependencies such as CUDA toolkit. Then, to install
pytket-cutensornet
, run:
pip install pytket-cutensornet
- API documentation
- General state (exact) simulation
- Structured state evolution
- Library handle
- Simulation
- Classes
StructuredState
StructuredState.is_valid()
StructuredState.apply_gate()
StructuredState.apply_unitary()
StructuredState.apply_scalar()
StructuredState.apply_qubit_relabelling()
StructuredState.vdot()
StructuredState.sample()
StructuredState.measure()
StructuredState.postselect()
StructuredState.expectation_value()
StructuredState.get_fidelity()
StructuredState.get_statevector()
StructuredState.get_amplitude()
StructuredState.get_bits()
StructuredState.get_qubits()
StructuredState.get_byte_size()
StructuredState.get_device_id()
StructuredState.update_libhandle()
StructuredState.copy()
TTNxGate
MPSxGate
MPSxMPO
- Miscellaneous
- Changelog
- 0.10.0 (October 2024)
- 0.9.0 (October 2024)
- 0.8.0 (September 2024)
- 0.7.1 (July 2024)
- 0.7.0 (July 2024)
- 0.6.1 (April 2024)
- 0.6.0 (April 2024)
- 0.5.4 (January 2024)
- 0.5.3 (January 2024)
- 0.5.2 (December 2023)
- 0.4.0 (October 2023)
- 0.3.0 (September 2023)
- 0.2.1 (August 2023)
- 0.2.0 (July 2023)
- 0.1.0 (June 2023)