newsynth-0.4.1.0: Exact and approximate synthesis of quantum circuits

Safe HaskellSafe
LanguageHaskell2010

Quantum.Synthesis.Clifford

Contents

Description

This module provides an efficient symbolic representation of the Clifford group on one qubit. This group is generated by S, H, and the scalar ω = eiπ/4. It has 192 elements.

Synopsis

The Clifford group

data Clifford Source #

A type representing single-qubit Clifford operators.

Constructors

clifford_X :: Clifford Source #

The Pauli X-gate as a Clifford operator.

clifford_Y :: Clifford Source #

The Pauli Y-gate as a Clifford operator.

clifford_Z :: Clifford Source #

The Pauli Z-gate as a Clifford operator.

clifford_H :: Clifford Source #

The Hadamard gate as a Clifford operator.

clifford_S :: Clifford Source #

The Clifford operator S.

clifford_SH :: Clifford Source #

The Clifford operator SH.

clifford_E :: Clifford Source #

The Clifford operator E = HS3ω3. This operator is uniquely determined by the properties E³ = I, EXE⁻¹ = Y, EYE⁻¹ = Z, and EZE⁻¹ = X.

clifford_W :: Clifford Source #

The Clifford operator ω = eiπ/4.

class ToClifford a where Source #

A type class for things that can be exactly converted to a Clifford operator. One particular instance of this is String, so that Clifford operators can be denoted, e.g.,

to_clifford "-iX"

The valid characters for such string conversions are "XYZHSEIWi-".

Methods

to_clifford :: a -> Clifford Source #

Convert any suitable thing to a Clifford operator.

Instances
ToClifford Char Source # 
Instance details

Defined in Quantum.Synthesis.Clifford

ToClifford Axis Source # 
Instance details

Defined in Quantum.Synthesis.Clifford

ToClifford Clifford Source # 
Instance details

Defined in Quantum.Synthesis.Clifford

ToClifford a => ToClifford [a] Source # 
Instance details

Defined in Quantum.Synthesis.Clifford

Methods

to_clifford :: [a] -> Clifford Source #

(Ring a, Eq a, Adjoint a) => ToClifford (SO3 a) Source # 
Instance details

Defined in Quantum.Synthesis.CliffordT

Deconstructors

clifford_decompose :: ToClifford a => a -> (Int, Int, Int, Int) Source #

Given a Clifford operator U, return (a, b, c, d) such that

  • U = EaXbScωd,
  • a ∈ {0, 1, 2}, b ∈ {0, 1}, c ∈ {0, …, 3}, and d ∈ {0, …, 7}.

Here, E = HS3ω3. Note that E, X, S, and ω have order 3, 2, 4, and 8, respectively. Moreover, each Clifford operator can be uniquely represented as above.

data Axis Source #

A axis is either I, H, or SH.

Constructors

Axis_I 
Axis_H 
Axis_SH 
Instances
Eq Axis Source # 
Instance details

Defined in Quantum.Synthesis.Clifford

Methods

(==) :: Axis -> Axis -> Bool #

(/=) :: Axis -> Axis -> Bool #

Show Axis Source # 
Instance details

Defined in Quantum.Synthesis.Clifford

Methods

showsPrec :: Int -> Axis -> ShowS #

show :: Axis -> String #

showList :: [Axis] -> ShowS #

ToClifford Axis Source # 
Instance details

Defined in Quantum.Synthesis.Clifford

ToGates Axis Source # 
Instance details

Defined in Quantum.Synthesis.CliffordT

Methods

to_gates :: Axis -> [Gate] Source #

clifford_decompose_coset :: ToClifford a => a -> (Axis, Int, Int, Int) Source #

Given a Clifford operator U, return (K, b, c, d) such that

  • U = KXbScωd,
  • K ∈ {I, H, SH}, b ∈ {0, 1}, c ∈ {0, …, 3}, and d ∈ {0, …, 7}.

Group operations

clifford_id :: Clifford Source #

The identity Clifford operator.

clifford_mult :: Clifford -> Clifford -> Clifford Source #

Clifford multiplication.

clifford_inv :: ToClifford a => a -> Clifford Source #

Clifford inverse.

Conjugation by T

clifford_tconj :: Clifford -> (Axis, Clifford) Source #

Given a Clifford gate C, return an axis K ∈ {I, H, SH} and a Clifford gate C' such that

  • CT = KTC'.