hamil_clever_sim.hamil_runner.build_operator_circuit§
- build_operator_circuit(t, *u_states, N=4, qubits=None)[source]§
This method implements trotterisation a hamiltonian while also not needing to create a copy of the circuit N times. Instead, the first step of the simulation is taken, and then converted into a unitary operator of form \(UU^\dagger=I\). This operator is then taken to the power of N, turning the problem into an optimised linalg computation. This operator can then be fed directly into a prepared
Statevector, using theStatevector.evolve()method.- Parameters:
N (
int) – Trotterisation terms / simulation accuracy. Higher values are better, but will balloon the gate count.t – How many time steps to simulate for. This term does not introduce more gates, just what the rotation value will be.
qubits (
Optional[int]) – The largest qubit value, in case not all pauli terms are of equal dimensions.
- Return type:
Operator- Returns:
An operator that can implement \(\ket{\phi_t}\) for a statevector.