qat.mps

qat.mps includes all the necessary tools for simulating quantum states using matrix-product representations. We provide QPUs for both matrix product states (MPS) simulations for noiseless systems, as well as matrix product operator (MPO) simulations for noisy systems. We also provide lower level tools for computing and using your own MPS and MPO.

Computing tensor networks

qat.mps.compute_mpo()

Compute an MPO for a given quantum circuit

qat.mps.compute_mps()

Compute an MPS for a given quantum circuit

Tensor network methods for MPO

qat.mps.mpo.StateMPO.contract()

Contract a quantum state in MPO representation back to its density matrix representation

qat.mps.mpo.StateMPO.expectation_value()

Compute the expectation value of an observable on the MPO

qat.mps.mpo.StateMPO.get_memory_used()

Check memory usage of the MPO

qat.mps.mpo.StateMPO.load()

Load an MPO from a file

qat.mps.mpo.StateMPO.sample()

Sample an MPO probability for a given bitstring

qat.mps.mpo.StateMPO.save()

Save an MPO as a file

qat.mps.mpo.StateMPO.trace()

Compute the trace of the MPO

Tensor network methods for MPS

qat.mps.mps.StateMPS.contract()

Contract a quantum state in MPS representation back to its statevector representation

qat.mps.mps.StateMPS.expectation_value()

Compute the expectation value of an observable on the MPS

qat.mps.mps.StateMPS.get_memory_used()

Check memory usage of the MPS

qat.mps.mps.StateMPS.load()

Load an MPS from a file

qat.mps.mps.StateMPS.norm()

Compute the norm of the MPS

qat.mps.mps.StateMPS.sample()

Sample an MPS probability for a given bitstring

qat.mps.mps.StateMPS.save()

Save an MPS as a file

Tools for random circuit studies

qat.mps.random_circuits.cheng_random_circuit()

Generate random circuit Program used by Cheng et al. (2021)

qat.mps.random_circuits.random_circuit_generator()

Generate a random circuit with 2 qubits Haar-random generated gates

qat.mps.random_circuits.random_gate_generator()

Generate Haar-random quantum gate of given arity

qat.mps.random_circuits.random_observable()

Generate a random observable