Skip to content

circuit.angles() seems incorrect #97

Open
@wangzbo

Description

@wangzbo

It is easy to recreate. Here is the circuit description using openQASM:

OPENQASM 2.0;
include "qelib1.inc";
qreg q[2];
creg c[2];
h q[0];
h q[1];
s q[0];
t q[1];
cx q[0], q[1];
sx q[0];

I call circuit.angles() and it returns "theta: 0.785398163399, phi: 0, thetaDeg: 45, phiDeg: 0, radius: 0.7071068" for q[0]. The partial trace of q[0] is diag((2+√2)/4, (2-√2)/4), so the correct angle of q[0] should be "theta: 0, phi: 0, thetaDeg: 0, phiDeg: 0, radius: 0.7071068"?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions