Skip to content

backend.calculate_overlap should not use np.abs #1706

@andrea-pasquale

Description

@andrea-pasquale

I've looked at the implementation of backend.calculate_overlap

def calculate_overlap(self, state1, state2):
return self.np.abs(
self.np.sum(self.np.conj(self.cast(state1)) * self.cast(state2))
)

it is not clear to me why we need also np.abs the inner product for a Hilbert space doesn't require to take the norm usually. Unless I am missing something I think that we should remove np.abs for better clarity.

Metadata

Metadata

Assignees

Labels

questionFurther information is requested

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions