Pulled from main branch. In double_bracket.py, within function eval_dbr_unitary, the operator for when the mode is DoubleBracketGeneratorType.group_commutator_3 and DoubleBracketGeneratorType.group_commutator_3_reduced has errors:
- step not using
sqrt_step
- signs are wrong
Before modification, plotting the off-diagonal norm w.r.t DBR duration s gives

The suggested changes are
elif mode is DoubleBracketGeneratorType.group_commutator_3:
if d is None:
d = self.diagonal_h_matrix
sqrt_step = np.sqrt(step)
operator = (
self.h.exp(sqrt_step * (np.sqrt(5) - 1) / 2)
@ self.backend.calculate_matrix_exp(-sqrt_step * (np.sqrt(5) - 1) / 2, d)
@ self.h.exp(-sqrt_step)
@ self.backend.calculate_matrix_exp(sqrt_step * (np.sqrt(5) + 1) / 2, d)
@ self.h.exp(sqrt_step * (3 - np.sqrt(5)) / 2)
@ self.backend.calculate_matrix_exp(-sqrt_step, d)
)
elif mode is DoubleBracketGeneratorType.group_commutator_3_reduced:
if d is None:
d = self.diagonal_h_matrix
sqrt_step = np.sqrt(step)
operator = (
self.backend.calculate_matrix_exp(-sqrt_step * (np.sqrt(5) - 1) / 2, d)
@ self.h.exp(-sqrt_step)
@ self.backend.calculate_matrix_exp(sqrt_step * (np.sqrt(5) + 1) / 2, d)
@ self.h.exp(sqrt_step * (3 - np.sqrt(5)) / 2)
@ self.backend.calculate_matrix_exp(-sqrt_step, d)
)
return operator
After correcting:

Pulled from main branch. In
double_bracket.py, within functioneval_dbr_unitary, theoperatorfor when the mode isDoubleBracketGeneratorType.group_commutator_3andDoubleBracketGeneratorType.group_commutator_3_reducedhas errors:sqrt_stepBefore modification, plotting the off-diagonal norm w.r.t DBR duration

sgivesThe suggested changes are
After correcting:
