Skip to content

Commit

Permalink
Update README [no ci]
Browse files Browse the repository at this point in the history
  • Loading branch information
pedromxavier committed Jan 11, 2023
1 parent 3a4d64f commit 3fcc740
Showing 1 changed file with 61 additions and 1 deletion.
62 changes: 61 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,62 @@
# QiskitOpt.jl
JuMP wrapper for IBMQ Optimization Algorithms (ft Anneal.jl)
IBM Qiskit Optimization Wrapper for JuMP (ft. [Anneal.jl](https://github.com/psrenergy/Anneal.jl))

## Installation
```julia
julia> import Pkg

julia> Pkg.add(url="https://github.com/psrenergy/QiskitOpt.jl")
```

## Basic Usage
```julia
using JuMP
using QistkitOpt

# Using QAOA
model = Model(QiskitOpt.QAOA.Optimizer)

# Using VQE
model = Model(QiskitOpt.VQE.Optimizer)

Q = [
-1 2 2
2 -1 2
2 2 -1
]

@variable(model, x[1:3], Bin)
@objective(model, Min, x' * Q * x)

optimize!(model)

for i = 1:result_count(model)
xi = value.(x; result=i)
yi = objective_value(model; result=i)

println("f($xi) = $yi")
end
```

## API Token
To access IBM's Quantum Computers, it is necessary to create an account at [IBM Q](https://quantum-computing.ibm.com/) to obtain an API Token and run the following python code:

```python
from qiskit import IBMQ

IBMQ.save_account("YOUR_TOKEN_HERE")
```

Another option is to set the `IBMQ_API_TOKEN` environment variable before loading `QAOA.jl`:
```shell
$ export IBQM_API_TOKEN=YOUR_TOKEN_HERE

$ julia

julia> using QAOA
```

**Disclaimer:** _The IBM Qiskit Optimization Wrapper for Julia is not officially supported by IBM. If you are a commercial customer interested in official support for Julia from IBM, let them know!_

**Note**: _If you are using [QAOA.jl](https://github.com/psrenergy/QiskitOpt.jl) in your project, we recommend you to include the `.CondaPkg` entry in your `.gitignore` file. The PythonCall module will place a lot of files in this folder when building its Python environment._

2 comments on commit 3fcc740

@pedromxavier
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JuliaRegistrator
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Registration pull request created: JuliaRegistries/General/75490

After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.

This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via:

git tag -a v0.1.0 -m "<description of version>" 3fcc74099f784c979d465f8d3bf301a124d71054
git push origin v0.1.0

Please sign in to comment.