add use_basis_gates flag to evolve method
@@ -1238,7 +1238,7 @@ class Operator(object):
return side + middle + side
def evolve(self, state_in, evo_time, evo_mode, num_time_slices, quantum_registers=None,
- paulis_grouping='random', expansion_mode='trotter', expansion_order=1):
+ paulis_grouping='random', expansion_mode='trotter', expansion_order=1, use_basis_gates=True):
"""
Carry out the dynamics evolution for the operator under supplied specifications.
@@ -1319,7 +1319,7 @@ class Operator(object):
expansion_order
)
return self.construct_evolution_circuit(
- slice_pauli_list, evo_time, num_time_slices, quantum_registers
+ slice_pauli_list, evo_time, num_time_slices, quantum_registers, use_basis_gates=use_basis_gates
)
else:
raise ValueError('Evolution mode should be either "matrix" or "circuit".')
