A wrapper around ITensorNetworks for simulating quantum circuits with tensor networks (TNs) of near-arbitrary geometry.
The main workhorses of the simulation are belief propagation (BP) and the Singular Value Decomposition for applying gates, and BP or boundary MPS for estimating expectation values and sampling. This package is an experimental compilation of state-of-the-art features before some of them get integrated into ITensorNetworks over time, with a focus on simulating quantum circuits / quantum dynamics.
The starting point of most calculations is that you will define a NamedGraph
object g
that encodes the geometry of your problem and how you want your tensor network structured. Most simply, the vertices of this graph will correspond to the qubits in your setup and the edges the pairs of qubits that directly interact in your system (e.g. those that will have two-site gates applied to them). Then you define the circuit which you will apply to your tensor network. A circuit, or layer of a circuit, simply takes the form Vector{<:Tuple}
or Vector{<:ITensor}
of a list of one or two-site gates to be applied in sequential order. These gates can either be specified as a Tuple (Gate_string::String, vertices_gate_acts_on::Vector, optional_gate_parameter::Number)
using the pre-defined gates available or as specific ITensors for more custom gate options (see below).
You can then initialise an ITensorNetwork ψ
as your chosen starting state, with user-friendly constructors for various different product states, and apply the desired gates to the TN with the apply
function. Keyword arguments, i.e. the apply_kwargs
should be passed to indicate the desired level of truncation to use when applying the circuits. At any point during the simulation, expectation values, samples or other information (e.g. overlaps) can be extracted from the ITensorNetwork
with different options for the algorithm to use and the various hyperparameters that control their complexity. The relevant literature describes these in more detail. We encourage users to read the literature listed below and look through the examples in the folder here to learn how the code works in more detail so they can effectively deploy their own simulations.
- Applying gates to distant nodes of the TN via SWAP gates.
Gates can take the form of ITensors or Tuples of length two or three, i.e.
(gate_string::String, qubits_to_act_on::Union{Vector, NamedEdge})
or (gate_string::String, qubits_to_act_on::Union{Vector, NamedEdge}, optional_parameter::Number)
depending on whether the gate type supports an optional parameter. The qubits_to_act on can be a vector of one or two vertices of the network where the gate acts. In the case of a two-qubit gate an edge of the network can also be passed.
Pre-Defined One qubit gates (brackets indicates the optional rotation parameter which must be specified). These are consistent with the qiskit definitions.
- "X", "Y", "Z', "Rx" (θ), "Ry" (θ), "Rz" (θ), "CRx" (θ), "CRy" (θ), "CRz" (θ), "P", "H"
Pre-Defined Two qubit gates (brackets indicates the optional rotation angle parameter which must be specified). These are consistent with the qiskit definitions.
- "CNOT", "CX", "CY", "SWAP", "iSWAP", "√SWAP", "√iSWAP", "Rxx" (θ), "Ryy" (θ), "Rzz" (θ), "Rxxyy" (θ), "Rxxyyzz" (θ), "CPHASE" (θ)
If the user wants to instead define a custom gate, they can do so by creating the corresponding ITensor
which acts on the physical indices for the qubit or pair of qubits they wish it to apply to.
- Simulating and sampling quantum circuits with 2D tensor networks
- Gauging tensor networks with belief propagation
- Efficient Tensor Network Simulation of IBM’s Eagle Kicked Ising Experiment
- Loop Series Expansions for Tensor Networks
- Dynamics of disordered quantum systems with two- and three-dimensional tensor networks
The package was developed by Joseph Tindall (JoeyT1994), an Associate Research Scientist at the Center for Computational Quantum Physics, Flatiron Institute NYC and Manuel S. Rudolph (MSRudolph), a PhD Candidate at EPFL, Switzerland, during a research stay at the Center for Computational Quantum Physics, Flatiron Institute NYC.