Photonic

ORCA Computing

ORCA Computing’s PT Series implement the boson sampling model of quantum computation, in which multiple single photons are interfered with each other within a network of beam splitters, and photon detectors measure where the photons leave this network. This process is implemented within a time-bin interferometer (TBI) architecture where photons are created in different time-bins and interfered within a network of delay lines. This can be represented by a circuit diagram, like the one below, where this illustration example corresponds to 4 photons in 8 modes sent into alternating time-bins in a circuit composed of two delay lines in series.

../../../_images/orca_tbi.png

Setting Credentials

Programmers of CUDA-Q may access the ORCA API from either C++ or Python. There is an environment variable ORCA_ACCESS_URL that can be set so that the ORCA target can look for it during configuration.

|:spellcheck-disable:|export ORCA_ACCESS_URL="https://<ORCA API Server>"|:spellcheck-enable:|

Sometimes the requests to the PT-1 require an authentication token. This token can be set as an environment variable named ORCA_AUTH_TOKEN. For example, if the token is AbCdEf123456, you can set the environment variable as follows:

|:spellcheck-disable:|export ORCA_AUTH_TOKEN="AbCdEf123456"|:spellcheck-enable:|

Submitting

To set which ORCA URL to be used, set the url parameter.

import os
import cudaq
# ...
orca_url = os.getenv("ORCA_ACCESS_URL", "http://localhost/sample")

cudaq.set_target("orca", url=orca_url)

You can then execute a time-bin boson sampling experiment against the platform using an ORCA device.

bs_angles = [np.pi / 3, np.pi / 6]
input_state = [1, 1, 1]
loop_lengths = [1]
counts = cudaq.orca.sample(input_state, loop_lengths, bs_angles)

To see a complete example for using ORCA’s backends, take a look at our Python examples.

To execute a boson sampling experiment on the ORCA platform, provide the flag --target orca to the nvq++ compiler. You should then pass the --orca-url flag set with the previously set environment variable $ORCA_ACCESS_URL or an url.

nvq++ --target orca --orca-url $ORCA_ACCESS_URL src.cpp -o executable

or

nvq++ --target orca --orca-url <url> src.cpp -o executable

To run the output, invoke the executable

./executable

To see a complete example for using ORCA server backends, take a look at our C++ examples.