Safe Haskell | None |
---|---|
Language | Haskell2010 |
Gates for qubit wavefunctions, mostly as in Quil <https://arxiv.org/abs/1608.03355/> and using the conventions of <https://arxiv.org/abs/1711.02086/>.
- i :: QIndex -> Operator
- x :: QIndex -> Operator
- y :: QIndex -> Operator
- z :: QIndex -> Operator
- h :: QIndex -> Operator
- s :: QIndex -> Operator
- t :: QIndex -> Operator
- phase :: Double -> QIndex -> Operator
- rx :: Double -> QIndex -> Operator
- ry :: Double -> QIndex -> Operator
- rz :: Double -> QIndex -> Operator
- cnot :: QIndex -> QIndex -> Operator
- swap :: QIndex -> QIndex -> Operator
- iswap :: QIndex -> QIndex -> Operator
- cphase00 :: Double -> QIndex -> QIndex -> Operator
- cphase01 :: Double -> QIndex -> QIndex -> Operator
- cphase10 :: Double -> QIndex -> QIndex -> Operator
- cphase :: Double -> QIndex -> QIndex -> Operator
- pswap :: Double -> QIndex -> QIndex -> Operator
- cz :: QIndex -> QIndex -> Operator
- ccnot :: QIndex -> QIndex -> QIndex -> Operator
- cswap :: QIndex -> QIndex -> QIndex -> Operator
One-Cubit Gates
The identity gate. This corresponds to I in Quil <https://arxiv.org/abs/1608.03355/>, with the indexing convention of <https://arxiv.org/pdf/1711.02086/>.
The Pauli-x gate. This corresponds to X in Quil <https://arxiv.org/abs/1608.03355/>, with the indexing convention of <https://arxiv.org/pdf/1711.02086/>.
The Pauli-y gate. This corresponds to Y in Quil <https://arxiv.org/abs/1608.03355/>, with the indexing convention of <https://arxiv.org/pdf/1711.02086/>.
The Pauli-z gate. This corresponds to Z in Quil <https://arxiv.org/abs/1608.03355/>, with the indexing convention of <https://arxiv.org/pdf/1711.02086/>.
The Hadamard gate. This corresponds to H in Quil <https://arxiv.org/abs/1608.03355/>, with the indexing convention of <https://arxiv.org/pdf/1711.02086/>.
The one-qubit 90-degree phase-shift gate. This corresponds to S in Quil <https://arxiv.org/abs/1608.03355/>, with the indexing convention of <https://arxiv.org/pdf/1711.02086/>.
The one-qubit 45-degree phase-shift gate. This corresponds to T in Quil <https://arxiv.org/abs/1608.03355/>, with the indexing convention of <https://arxiv.org/pdf/1711.02086/>.
Parameterized One-Cubit Gates
:: Double | The phase angle [radians]. |
-> QIndex | The index of the qubit in the wavefunction. |
-> Operator | The operator. |
The phase-shift gate. This corresponds to PHASE in Quil <https://arxiv.org/abs/1608.03355/>, with the indexing convention of <https://arxiv.org/pdf/1711.02086/>.
:: Double | The phase angle [radians]. |
-> QIndex | The index of the qubit in the wavefunction. |
-> Operator | The operator. |
The x-rotation gate. This corresponds to RX in Quil <https://arxiv.org/abs/1608.03355/>, with the indexing convention of <https://arxiv.org/pdf/1711.02086/>.
:: Double | The phase angle [radians]. |
-> QIndex | The index of the qubit in the wavefunction. |
-> Operator | The operator. |
The y-rotation gate. This corresponds to RY in Quil <https://arxiv.org/abs/1608.03355/>, with the indexing convention of <https://arxiv.org/pdf/1711.02086/>.
:: Double | The phase angle [radians]. |
-> QIndex | The index of the qubit in the wavefunction. |
-> Operator | The operator. |
The z-rotation gate. This corresponds to RZ in Quil <https://arxiv.org/abs/1608.03355/>, with the indexing convention of <https://arxiv.org/pdf/1711.02086/>.
Two-Cubit Gates
:: QIndex | The index of the higher qubit in the wavefunction. |
-> QIndex | The index of the lower qubit in the wavefunction. |
-> Operator | The operator. |
The controlled-not gate for two qubits. This corresponds to CNOT in Quil <https://arxiv.org/abs/1608.03355/>, with the indexing convention of <https://arxiv.org/pdf/1711.02086/>.
:: QIndex | The index of the higher qubit in the wavefunction. |
-> QIndex | The index of the lower qubit in the wavefunction. |
-> Operator | The operator. |
The swap gate with 0-degree phase. This corresponds to SWAP in Quil <https://arxiv.org/abs/1608.03355/>, with the indexing convention of <https://arxiv.org/pdf/1711.02086/>.
:: QIndex | The index of the higher qubit in the wavefunction. |
-> QIndex | The index of the lower qubit in the wavefunction. |
-> Operator | The operator. |
The swap gate with 90-degree phase. This corresponds to ISWAP in Quil <https://arxiv.org/abs/1608.03355/>, with the indexing convention of <https://arxiv.org/pdf/1711.02086/>.
Parameterized Two-Cubit Gates
:: Double | The phase angle [radians]. |
-> QIndex | The index of the higher qubit in the wavefunction. |
-> QIndex | The index of the lower qubit in the wavefunction. |
-> Operator | The operator. |
A controlled phase gate on |00>. This corresponds to CPHASE00 in Quil <https://arxiv.org/abs/1608.03355/>, with the indexing convention of <https://arxiv.org/pdf/1711.02086/>.
:: Double | The phase angle [radians]. |
-> QIndex | The index of the higher qubit in the wavefunction. |
-> QIndex | The index of the lower qubit in the wavefunction. |
-> Operator | The operator. |
A controlled phase gate on |01>. This corresponds to CPHASE01 in Quil <https://arxiv.org/abs/1608.03355/>, with the indexing convention of <https://arxiv.org/pdf/1711.02086/>.
:: Double | The phase angle [radians]. |
-> QIndex | The index of the higher qubit in the wavefunction. |
-> QIndex | The index of the lower qubit in the wavefunction. |
-> Operator | The operator. |
A conrolled pahse gate on |10>. This corresponds to CPHASE10 in Quil <https://arxiv.org/abs/1608.03355/>, with the indexing convention of <https://arxiv.org/pdf/1711.02086/>.
:: Double | The phase angle [radians]. |
-> QIndex | The index of the higher qubit in the wavefunction. |
-> QIndex | The index of the lower qubit in the wavefunction. |
-> Operator | The operator. |
A controlled phase gate on |11>. This corresponds to CPHASE in Quil <https://arxiv.org/abs/1608.03355/>, with the indexing convention of <https://arxiv.org/pdf/1711.02086/>.
:: Double | The phase angle [radians]. |
-> QIndex | The index of the higher qubit in the wavefunction. |
-> QIndex | The index of the lower qubit in the wavefunction. |
-> Operator | The operator. |
The phase-swap gate. This corresponds to PSWAP in Quil <https://arxiv.org/abs/1608.03355/>, with the indexing convention of <https://arxiv.org/pdf/1711.02086/>.
:: QIndex | The index of the higher qubit in the wavefunction. |
-> QIndex | The index of the lower qubit in the wavefunction. |
-> Operator | The operator. |
The controlled-z gate, with the indexing convention of <https://arxiv.org/pdf/1711.02086/>.
Three-Cubit Gates
:: QIndex | The index of the higher qubit in the wavefunction. |
-> QIndex | The index of the middle qubit in the wavefunction. |
-> QIndex | The index of the lower qubit in the wavefunction. |
-> Operator | The operator. |
The controlled-not gate by three qubits. This corresponds to CCNOT in Quil <https://arxiv.org/abs/1608.03355/>, with the indexing convention of <https://arxiv.org/pdf/1711.02086/>.
:: QIndex | The index of the higher qubit in the wavefunction. |
-> QIndex | The index of the middle qubit in the wavefunction. |
-> QIndex | The index of the lower qubit in the wavefunction. |
-> Operator | The operator. |
The three-qubit controlled-swap gate. This corresponds to CSWAP in Quil <https://arxiv.org/abs/1608.03355/>, with the indexing convention of <https://arxiv.org/pdf/1711.02086/>.