# Crate qcgpu [−] [src]

An Open Source, High Performance & Hardware Accelerated, Quantum Computer Simulator in Rust

This crate is a library with the aim to provide fast and effecient simulation of algorithms for quantum computers, while also being easy to use and abstracting away the management of the OpenCL Devices

The best place to start with this library is with the user guide, along with the docs (you're looking at them) and the source code

## Features

- Simulation of arbitrary quantum algorithms
- Optional simulation of decoherence
- Optimized for maximally entangled states
- Accelerated with GPUs, FPGAs and other OpenCL devices
- Example implementations of Grover, Deutsch-Jozsa, Bernstein-Vazirani and Shors algorithm
- Implements Hadamard, Pauli and phase gates, with support for arbitrary gates
- Support for arbitrary controlled gates

## Re-exports

`pub use gates::Gate;`

## Modules

gates | Gates and Gate Generation

## Structs

State | Representation of a quantum register

## Functions

gcd | Calculate the greatest common divisor (Euclid's algorithm)
get_width | Get the number of qubits needed to represent a number.

# Help

## Keyboard Shortcuts

`?`
  Show this help dialog
`S`
  Focus the search field
`↑`
  Move up in search results
`↓`
  Move down in search results
`↹`
  Switch tab
`⏎`
  Go to active search result
`+`
  Expand all sections
`-`
  Collapse all sections

## Search Tricks

Prefix searches with a type followed by a colon (e.g. `fn:`) to restrict the search to a given type.

Accepted types are: `fn`, `mod`, `struct`, `enum`, `trait`, `type`, `macro`, and `const`.

Search functions by type signature (e.g. `vec -> usize` or `* -> vec`)