qchas-1.1.0.1: A library for implementing Quantum Algorithms

Safe HaskellNone
LanguageHaskell2010

Quantum.MeasurementPerformer

Description

  • Module : MeasurementPerformer
  • Description : Definition of qubit measure function
  • Copyright : (c) Mihai Sebastian Ardelean, 2018
  • License : BSD3
  • Maintainer : ardeleanasm@gmail.com
  • Portability : POSIX
Synopsis

Documentation

class MeasurementPerformer a where Source #

Class MeasurementPerformer used to define measure operation that can be made with Qubit

Minimal complete definition

measure

Methods

measure :: a -> a Source #

  • measure function is used to perform qubit measurement
>>> measure circuit
Qubit {qubitState = (4><1)
  [ 0.0 :+ 0.0
  , 1.0 :+ 0.0
  , 0.0 :+ 0.0
  , 0.0 :+ 0.0 ]}
Instances
MeasurementPerformer Qubit Source #

MeasurementPerformer instance for Qubit

Instance details

Defined in Quantum.MeasurementPerformer

Methods

measure :: Qubit -> Qubit Source #