`_Pauli{X,Y,Z}` maybe shouldn't be private
See original GitHub issueUnlike every other gate, with cirq.X
, cirq.Y
, and cirq.Z
, it’s very easy to end up with an instance of a class that is not importable from top-level-cirq
x1 = cirq.X
x2 = cirq.X**0.99
type(x1)
Out[6]: cirq.ops.pauli_gates._PauliX
type(x2)
Out[7]: cirq.ops.common_gates.XPowGate
consider renaming to PauliX
and exposing as cirq.PauliX
Issue Analytics
- State:
- Created 4 years ago
- Comments:11 (1 by maintainers)
Top Results From Across the Web
Pauli spin matrices are traceless. What does that mean? - Quora
Pauli matrices are the dimensionless versions of spin in the x, y, z directions. ... Technically no, but probably you are thinking of...
Read more >Pauli matrices - Wikipedia
In mathematical physics and mathematics, the Pauli matrices are a set of three 2 × 2 complex matrices which are Hermitian, involutory and...
Read more >Pauli - Qiskit
An n -qubit Pauli may be represented by a string consisting of n characters from ['I', 'X', 'Y', 'Z'] , and optionally phase...
Read more >Gates, States, and Circuits - Gavin E. Crooks
3.1 Pauli gates. The simplest 1-qubit gates are the 4 gates represented by the Pauli operators, I, X, Y, and Z. These operators...
Read more >Mel Schwartz: The Possibility Principle - Sounds True
That possibility would be maybe I don't have to have fear. ... I want to make sure that I'm loved, and so confronting...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I’d generally push back against any further consolidation into them being gate-like. I’m still not fully convinced that there shouldn’t be two separate things: X-the-gate and X-the-operator. It’s pretty rare to have a case where you want to take one thing and use it both as an operator (Hermitian) and a gate (unitary). In fact, most of the time when you have an X-the-operator, you convert to an associated gate by exp[i t X-the-operator].
The only commonality is the matrix representation, so you’d want to call
cirq.unitary(X-the-gate)
orcirq.unitary(X-the-operator)
and get the same answer; but this also gets confusing in the latter case because you’re not requesting a unitary matrix. You really need a Hermitian matrix.I think it’s fine that they’re private