This library forms the basis of the work in arXiv:2411.12482 and includes the following simulators
- A standard Matrix Product State (MPS) simulator
- A stabilizer tableau simulator
- A Stailizer Tensor Network (STN) simulator (based off Phys. Rev. Lett (133) 230601)
- A Magic Injected Stabilizer Tensor Network (MAST) simulator (as introduced in arXiv:2411.12482)
Before you get started, you will need the following instaled on your machine
You can then clone the repository and from that directory you can run pip install . to install the Python front-end.
You can interact with all of the MPS, STN and MAST simulators in largely the same way.
Here's a basic example
import mast
N = 50 # Number of qubits
t = 30 # Number of T gates
max_bond = 0 # Maximum bond dimension -- if 0 then no maximum is set
circ = mast.MagicInjectedStn(N, t, max_bond)
circ.h(0)
circ.cx(0,30)
circ.t(30)
# ... and so on ... #
# Before you can measure observables from MAST you must project the magic register
circ.project_magic()
# Now you can project the data register or get expectation values
circ.project(0)