- Write programs that do one thing and do it well.
- Write programs to work together.
- Write programs to handle text streams, because that is a universal interface.
- Parse the file
- Simulate circuit
- Optimise expression (find ordering, slice, etc)
- Actually simulate
Simulator program: tensim
-
Simply simulate a circuit:
cat circuit | tensim > result
-
Simulate a circuit in a wierd format
cat circuit | tensim parse -f wierd | tensim > result
-
Q: Why not
tensim --input-fmt wierd
?A: Because we might have other actions working with this format
cat circuit | tensim parse -f wierd | visualise-circ > circ.png
-
Q: Why not
tensim --input circuit
, butcat circuit | tensim
?A: Because we can a) process many circuits line-by-line and b) connect with other tools
connect_to_db --table circuits | tensim > results
-
-
Simulate N generated circuits in one command
generate_circ -n 1 >> circuits generate_circ -n 2 >> circuits .... cat circuits | tensim > results
-
Simulate circuit based on Hamiltonian composed of tensor network, not gates
gen_tensor_net | tensim optimize | tensim simulate > result