haquil-0.2.1.14: A Haskell implementation of the Quil instruction set for quantum computing.

Data.Qubit.Gate

Description

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/>.

Synopsis

# One-Cubit Gates

Arguments

 :: QIndex The index of the qubit in the wavefunction. -> Operator The operator.

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/>.

Arguments

 :: QIndex The index of the qubit in the wavefunction. -> Operator The operator.

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/>.

Arguments

 :: QIndex The index of the qubit in the wavefunction. -> Operator The operator.

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/>.

Arguments

 :: QIndex The index of the qubit in the wavefunction. -> Operator The operator.

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/>.

Arguments

 :: QIndex The index of the qubit in the wavefunction. -> Operator The operator.

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/>.

Arguments

 :: QIndex The index of the qubit in the wavefunction. -> Operator The operator.

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/>.

Arguments

 :: QIndex The index of the qubit in the wavefunction. -> Operator The operator.

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

Arguments

 :: 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/>.

Arguments

 :: 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/>.

Arguments

 :: 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/>.

Arguments

 :: 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

Arguments

 :: 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/>.

Arguments

 :: 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/>.

Arguments

 :: 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

Arguments

 :: 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/>.

Arguments

 :: 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/>.

Arguments

 :: 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/>.

Arguments

 :: 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/>.

Arguments

 :: 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/>.

Arguments

 :: 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

Arguments

 :: 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/>.

Arguments

 :: 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/>.