1
$\begingroup$

I am trying to understand the code below but can not find any references other than the code itself.

https://github.com/quantumlib/Cirq/blob/v0.11.1/cirq-core/cirq/ops/eigen_gate.py

I am not clear about the physics pictures behind the eigengate. Any suggestions are appreciated!

$\endgroup$
1
  • 1
    $\begingroup$ Hi and welcome to the Quantum Computing SE. Could you please be more specific? Please post the code itself and describe what you do not understand in the code. Thanks. $\endgroup$ Aug 11, 2021 at 12:38

1 Answer 1

5
$\begingroup$

The cirq.EigenGate class is not one specific gate; it's more like a framework for describing gates in a way that makes it easy to do things like compute the square root of the gate. For example, cirq.X, cirq.H, cirq.Z, and cirq.S are all implemented using classes that derive from eigengate. As a result, you can compute roots like cirq.Z**0.5 == cirq.S.

The underlying machinery of the class is based on working with the eigendecomposition of the unitary matrix defining the gate. This is of course a very common way of working with matrices, taught in every linear algebra course. The class deriving from eigengate will provide the eigenvalues and eigenvectors of the decomposition, and the eigengate class will handle combining them into a matrix and operating on the eigenvalues when a function of the gate is requested.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.