# Example for Digital Quantum Simulation of k-local Hamiltonian

I am currently going through Nielsen's Quantum Comp. and Quantum Information.

I don't understand how this computes the time step for our three cubits. Why is there any action at all, the gate is just applied to the ancilla qubit. The variable Z means the Pauli-Z Matrix.

• The CNOT gates produce entanglement between the ancilla and the data qubits, so what's done on the ancilla can affect the behavior of the data. – probably_someone May 27 '18 at 14:37
• I see it now, having made my fingers dirty and using matrix rep. of the gates for the simple $H = Z$ Hamiltonian and comparing to the analytic solution. – 0xkev May 28 '18 at 7:46
• You might try asking this at SE.QuantumComputing. – Nat May 31 '18 at 13:21