Running the System
Network
There are two networks. One for the client and one for communication between Alice and Bob.
In standard operation, the admin is on the client network and uses scripts on his local computer to communicate with the devices. These scripts are TCP-clients that connect to servers on the machines and send/receive messages and data.
In standard operation, the client uses the ETSI14 standard to get the key via http(s).
For development and debugging you can connect through ssh and operate directly on the machines.
Standard operation
Clone repo git@github.com:Veriqloud/kiwi_hw_control.git
Power on the system
- power on the White Rabbit Switches, wait about 20sec for lights to flash
- power on the VQ box, this will power on the FPGA board
- power on the computer by pressing the button on the back of the box (or wakeonlan over the netowk)
Point the scripts to the appropriate network.json
export QLINE_CONFIG_DIR=path_to/kiwi_hw_control/config/qline1
Go to kiwi_hw_control/qline_clean/local. This is the folder from which you can initialize and calibrate the system. There are three programs:
hw_alice.py/hw_bob.pyto change and get the current hardware parameters (check their help messages)hws.pyto calibrate the system, i.e. Alice and Bob at the same time.mon.pyto get the status and plot counts or gates
Run
mon.py --status
to get basic info on the system
If you are lucky,
hws.py --full_init
is all you need. This might take up to two minutes. If you get a fail message, try again.
ssh setup (required for development, deployment and debugging)
Put something like this into your ~/.ssh/config:
Host Alice
HostName ql001.home
User vq-user
IdentityFile ~/.ssh/your_ssh_key
ControlPath ~/.ssh/controlmasters/%r@%h:%p
ControlMaster auto
ControlPersist 1h
Host Bob
HostName ql002.home
User vq-user
IdentityFile ~/.ssh/your_ssh_key
ControlPath ~/.ssh/controlmasters/%r@%h:%p
ControlMaster auto
ControlPersist 1h
Host vq
HostName veriqloud.pro.dns-orange.fr
User vq-user
IdentityFile ~/.ssh/your_ssh_key
ControlPath ~/.ssh/controlmasters/%r@%h:%p
ControlMaster auto
ControlPersist 1h
Host RemoteAlice
ProxyCommand ssh vq nc ql001 22
User vq-user
IdentityFile ~/.ssh/your_ssh_key
ControlPath ~/.ssh/controlmasters/%r@%h:%p
ControlMaster auto
ControlPersist 1h
Host RemoteBob
ProxyCommand ssh vq nc ql002 22
User vq-user
IdentityFile ~/.ssh/your_ssh_key
ControlPath ~/.ssh/controlmasters/%r@%h:%p
ControlMaster auto
ControlPersist 1h
The last three entries are for connecting from the internet through port forwarding on the VQ server.
Make sure your public key is on the machines, e.g. ssh-copy-id vq-user@ql001.home
Manually optimizing the qber
ssh on the systems
You can check with qber that the system is running fine:
On Bob
cd servers
qber
On Alice
qber 6400
This will print the correlation matrix of the relative count rates for all the 4x4 possible angle choices.
On your local machine run hw_alice.py and hw_bob.py to change parameters.
Misc
hw_alice.py set --fake_rng_seq [off, random]
hw_bob.py set --fake_rng_seq [off, random]
hw_alice.py set --insert_zeros on
hw_alice.py set --zero_pos 14