Skip to content

Latest commit

 

History

History
54 lines (40 loc) · 1.08 KB

README.md

File metadata and controls

54 lines (40 loc) · 1.08 KB

qvirus

The goal of qvirus is to provide resources, tutorials, and code snippets dedicated to exploring the intersection of quantum computing and artificial intelligence (AI) in the context of HIV drug design.

Installation

You can install the development version of qvirus from GitHub with:

# install.packages("devtools")
devtools::install_github("juanv66x/qvirus")

Example

This is a basic example which shows you how to solve a common problem in quantum computing.

library(qvirus)
## basic example code

Creating a Hadamard gate: H(1).

#> An object of class "sqgate"
#> Slot "bit":
#> [1] 1
#> 
#> Slot "M":
#>              [,1]          [,2]
#> [1,] 0.7071068+0i  0.7071068+0i
#> [2,] 0.7071068+0i -0.7071068+0i
#> 
#> Slot "type":
#> [1] "H"

Applying a gate to a quantum state.

library(qsimulatR)
H(1)*six_state(1)[[1]]
#>    ( 0.7071068 ) * |0> 
#>  + ( 0.7071068 ) * |1>