Versions in this module Expand all Collapse all v0 v0.0.6 Aug 4, 2024 Changes in this version + var ErrDuplicateWire = errors.New("duplicate wire") v0.0.5 Aug 4, 2024 Changes in this version + var ErrInvalidArgument = errors.New("invalid argument") + type CCXGate struct + func (g CCXGate) Example() string + func (g CCXGate) FullName() string + func (g CCXGate) WiresNeeded() int + type CCZGate struct + func (g CCZGate) Example() string + func (g CCZGate) FullName() string + func (g CCZGate) WiresNeeded() int type CNOTGate + func (g CNOTGate) Example() string + func (g CNOTGate) FullName() string + type CRxGate struct + func (g CRxGate) Example() string + func (g CRxGate) FullName() string + func (g CRxGate) Name() string + func (g CRxGate) WiresNeeded() int + type CRyGate struct + func (g CRyGate) Example() string + func (g CRyGate) FullName() string + func (g CRyGate) Name() string + func (g CRyGate) WiresNeeded() int + type CRzGate struct + func (g CRzGate) Example() string + func (g CRzGate) FullName() string + func (g CRzGate) Name() string + func (g CRzGate) WiresNeeded() int type CZGate + func (g CZGate) Example() string + func (g CZGate) FullName() string type GateInterface + func CCX() GateInterface + func CCZ() GateInterface + func CRx(theta float64) GateInterface + func CRy(theta float64) GateInterface + func CRz(theta float64) GateInterface + func Rx(theta float64) GateInterface + func Ry(theta float64) GateInterface + func Rz(theta float64) GateInterface + Example func() string + FullName func() string type HadamardGate + func (g HadamardGate) Example() string + func (g HadamardGate) FullName() string type IdentityGate + func (g IdentityGate) Example() string + func (g IdentityGate) FullName() string type PauliXGate + func (g PauliXGate) Example() string + func (g PauliXGate) FullName() string type PauliYGate + func (g PauliYGate) Example() string + func (g PauliYGate) FullName() string type PauliZGate + func (g PauliZGate) Example() string + func (g PauliZGate) FullName() string type PhaseGate + func (g PhaseGate) Example() string + func (g PhaseGate) FullName() string + type RxGate struct + func (g RxGate) Example() string + func (g RxGate) FullName() string + func (g RxGate) Name() string + func (g RxGate) WiresNeeded() int + type RyGate struct + func (g RyGate) Example() string + func (g RyGate) FullName() string + func (g RyGate) Name() string + func (g RyGate) WiresNeeded() int + type RzGate struct + func (g RzGate) Example() string + func (g RzGate) FullName() string + func (g RzGate) Name() string + func (g RzGate) WiresNeeded() int type SGate + func (g SGate) Example() string + func (g SGate) FullName() string type SWAPGate + func (g SWAPGate) Example() string + func (g SWAPGate) FullName() string type TGate + func (g TGate) Example() string + func (g TGate) FullName() string type ToffoliGate + func (g ToffoliGate) Example() string + func (g ToffoliGate) FullName() string v0.0.4 Jun 19, 2024 v0.0.3 Jun 19, 2024 v0.0.2 Jun 19, 2024 Changes in this version + var ErrGateMatrixNotSquare = errors.New("gate matrix is not square") + var ErrInvalidBarrier = errors.New("invalid barrier") + var ErrInvalidWireCount = errors.New("invalid wire count") + var ErrInvalidWireFormat = errors.New("invalid wire format") + var ErrTooManyGates = errors.New(fmt.Sprintf("too many gates, max: %d", maxGates)) + var ErrTooManyWires = errors.New(fmt.Sprintf("too many wires, max: %d", maxWires)) + var ErrUnknownGate = errors.New("unknown gate") + func Probabilities(stateVector map[string]complex128) map[string]float64 + func Symbofy(s complex128) string + func SymbofyMap(s map[string]complex128) map[string]string + type CNOTGate struct + func (g CNOTGate) WiresNeeded() int + type CZGate struct + func (g CZGate) WiresNeeded() int + type Circuit struct + Gates []CircuitGate + func NewCircuit(gates []string) (Circuit, error) + func (c *Circuit) Draw() error + func (c *Circuit) Execute() (Result, error) + func (c *Circuit) ExecuteToBarrier(atBarrier int) (Result, error) + type CircuitGate struct + Gate GateInterface + Wires []int + type Gate struct + Matrix Matrix + func (g Gate) Data() Matrix + func (g Gate) Name() string + type GateInterface interface + Data func() Matrix + Name func() string + WiresNeeded func() int + func CNOT() GateInterface + func CZ() GateInterface + func Hadamard() GateInterface + func Identity(dim int) GateInterface + func PauliX() GateInterface + func PauliY() GateInterface + func PauliZ() GateInterface + func Phase() GateInterface + func S() GateInterface + func SWAP() GateInterface + func T() GateInterface + func Toffoli() GateInterface + type HadamardGate struct + func (g HadamardGate) WiresNeeded() int + type IdentityGate struct + func (g IdentityGate) WiresNeeded() int + type Matrix struct + Cols int + Data [][]complex128 + Rows int + func NewMatrix(rows, cols int) Matrix + func (m *Matrix) CanMultiply(n *Matrix) bool + func (m *Matrix) MustMultiply(n *Matrix) Matrix + type PauliXGate struct + func (g PauliXGate) WiresNeeded() int + type PauliYGate struct + func (g PauliYGate) WiresNeeded() int + type PauliZGate struct + func (g PauliZGate) WiresNeeded() int + type PhaseGate struct + func (g PhaseGate) WiresNeeded() int + type Result struct + Probabilities map[string]float64 + StateVector map[string]complex128 + StateVectorSymbolic map[string]string + type SGate struct + func (g SGate) WiresNeeded() int + type SWAPGate struct + func (g SWAPGate) WiresNeeded() int + type TGate struct + func (g TGate) WiresNeeded() int + type ToffoliGate struct + func (g ToffoliGate) WiresNeeded() int v0.0.1 Jun 19, 2024