Nov 5, 2019 · 2 min read

# First

Who want to start quantum computing may start with simulator first and use the actual machine after.

Now we check the way to use a high performance simulator based on NVIDIA CUDA and python based library/SDK.

The basic logic gate is a universal one, so you can use the algorithm over the world.

# Installing

Qgate is a CUDA based simulator and Blueqat is a python based library/SDK. We will use it together now.

Install is quite easy. You just look at this ipython file and just click to use these tools.

# Just Click

Just click the arrow on the left of this line. Install starts soon and you can get the tools for free on you goolgle account. It is safe because all of the operation done on the cloud.

!wget https://github.com/shinmorino/qgate/raw/gh-pages/packages/0.2/qgate-0.2.1-cp36-cp36m-manylinux1_x86_64.whl
!pip install qgate-0.2.1-cp36-cp36m-manylinux1_x86_64.whl blueqat

Wait a moment and you get tools.

# Examples

Let’s check the examples. First we will check the CPU mode using 25 qubits simulation.

from blueqat import Circuit
Circuit(25).h[:].m[:].run(backend='qgate',shots=100)

Now we have a lot of samples.

Counter({'0000000011111110110011100': 1,
'0000000110110011011000001': 1,
'0000010011111110101101011': 1,
'0000010100001111101111110': 1,
'0000010110100100100111111': 1,
'0000101010011011000100111': 1,
'0000110000101100100010000': 1,
'0000110001010110101111000': 1,
'0000110011010001001101010': 1,
'0000110111111001000110010': 1,
'0000111100110100101010000': 1,
'0001000010110000110011011': 1,
'0001000110010001110101101': 1,
'0001001110100101000100001': 1,
'0001011010101100010101101': 1,
...

# GPU mode

If you select GPU mode on from the configuration of notebook, we can use the GPU mode on the Qgate simulator.

After changing the configuration, you may have to install all the components again. After finishing these process we can now use the power of GPU for simulation.

Circuit(25).h[:].m[:].run(backend='qgate', runtime='cuda', shots=100)

The simulation finished faster than the CPU mode. Now we try on 30qubits.

Circuit(30).h[:].m[:].run(backend='qgate', runtime='cuda', shots=100)

We also have a lot of samples from the sampling of 100 trilas.

Counter({'000000100111001100010001100001': 1,
'000000110000001111011100000111': 1,
'000000110001000001100110000010': 1,
'000001001001101000111100000001': 1,
'000001100001010000000000001000': 1,
'000010010000010110101011101011': 1,
'000010101100000110110001100111': 1,
...

# It’s free

It is completely free and easy to use. If you want to get to the more practical quantum computer, you may use IBM one or bigger simulation on HPC environment after this trial.

Written by

## MDR Inc.

#### quantum computing company in Tokyo

Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch
Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore
Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just \$5/month. Upgrade