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.9, 3.10 and 3.11 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
- Full tensor network contraction
CuTensorNetBackend
CuTensorNetBackend.circuit_status()
CuTensorNetBackend.default_compilation_pass()
CuTensorNetBackend.get_circuit_overlap()
CuTensorNetBackend.get_operator_expectation_value()
CuTensorNetBackend.process_circuits()
CuTensorNetBackend.rebase_pass()
CuTensorNetBackend.backend_info
CuTensorNetBackend.required_predicates
ExpectationValueTensorNetwork
PauliOperatorTensorNetwork
TensorNetwork
measure_qubits_state()
tk_to_tensor_network()
- Matrix Product State (MPS)
- Simulation
- Classes
MPS
MPS.tensors
MPS.canonical_form
MPS.qubit_position
MPS.fidelity
MPS.__init__()
MPS.apply_gate()
MPS.vdot()
MPS.canonicalise()
MPS.sample()
MPS.measure()
MPS.postselect()
MPS.expectation_value()
MPS.get_statevector()
MPS.get_amplitude()
MPS.get_qubits()
MPS.get_virtual_dimensions()
MPS.get_physical_dimension()
MPS.get_device_id()
MPS.is_valid()
MPS.update_libhandle()
MPS.copy()
MPS.__len__()
MPSxGate
MPSxMPO
- Miscellaneous
- Full tensor network contraction
- Changelog
More documentation:
Links: