Class FockSimulator

Inheritance Relationships

Base Type

Class Documentation

class FockSimulator : public blackbird::Program

Device FockSimulator: corresponds to any able Fock simulator; i.e. a simulator able to apply and manipulate every CV state/operation/measurement defined in Blackbird.

Public Functions

FockSimulator()

Constructor to initialise the device

FockSimulator(Program dev)

Constructor to initialise the device

FockSimulator(int num_subsystems, int cutoff_dim, int s = 0, double hbar = 2)

Constructor to initialise the device with a specific set of parameters.

Parameters
  • num_subsystems: number of modes to initialise the simulator with
  • cutoff_dim: Fock basis truncation
  • s: number of shots to perform
  • hbar: value of hbar in the canonical commutation relation

void print_device_info()

prints out device information

Public Members

int ns

number of subsystems

int cutoff

Fock space cutoff/truncation.

int shots = 1

Number of shots to perform on the device (default 1)

double hb = 2.0

Value of \(\hbar\) to use in the commutation relation \([\hat{x},\hat{p}]=i\hbar\)