Skip to content

Error when using U gate #191

@GibbsJR

Description

@GibbsJR

Hi Tyson,

Some code that was previously working fine now has a new error and I am not sure why.
The error I am getting is when applying a U gate, and it is saying that the matrix is not unitary.
image

It did not before complain my matrix is not unitary, which I know it is by construction as it is defined as $e^{-i \theta M}$ for some diagonal matrix M. As a sanity check I used the function 'UnitaryMatrixQ' to check, which also did not think it was unitary, but when I added a tolerance of 10^-12 it agreed it was ($M^{\dagger}M - I$ is a diagonal matrix with elements on the order of 10^-13).

Thanks,
Joe

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions