Git Product home page Git Product logo

grok-bloch's People

Contributors

ismaelfaro avatar javafxpert avatar tachsin avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

grok-bloch's Issues

Phase Calculation On Unitary Matrices

Initialize a qubit to |0> and apply HZH gate should be equivalent to applying the X gate directly. The resulting state is |1> with phase=0. The current implementation carries a phase of 1.16 $\pi$. While the global phase technically doesn't matter, this is a bit confusing.

Built same circuit in Grok Bloch and IBM QE Circuit Composer, got different statevector and phases

This is my one qubit circuit:
image

When I build this in grok bloch, I get this state vector, with only one value for phase:
image
image

But circuit composer gives me a phase value for each state, and the statevector is different:
image

The state vectors are in different formats, so let's convert to confirm they're different:

sqrt(0.5) * e^(i * 3pi/2) = 0-0.707i

the grok bloch statevector
[ |0⟩, |1⟩ ] = [ 0.707+0i, 0-0.707i  ] 

the circuit composer statevector
[ |0⟩, |1⟩ ] = [ 0-0.707i, -0.707+0i ]

And let's compare the phases

grok bloch phases
[ arg(0.707+0i),  arg(0-0.707i) ] = [ 0, -π/2 ] = [ 0, 3π/2 ]

circuit composer phases
[ arg(0-0.707i),  arg(-0.707+0i) ] = [ -π/2, π ]

Which is the correct way to grok the bloch?
How many phases does a qubit have?

Thanks

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.