class documentation

class CVOperators: (source)

View In Hierarchy

Build operator matrices for continuously variable bosonic gates.

Method bs Two-mode beam splitter operator
Method c_multiboson_sampling SNAP gate creation for multiboson sampling purposes.
Method cbs Controlled phase two-mode beam splitter operator
Method cd Controlled displacement operator
Method cr Controlled phase space rotation operator
Method crx Controlled phase space rotation operator around sigma^x
Method cry Controlled phase space rotation operator around sigma^x
Method cschwinger General form of a controlled Schwinger gate
Method csnap SNAP (Selective Number-dependent Arbitrary Phase) operator, with explicit sigma_z in exponential. Can be used to generate fock-number selective qubit rotations.
Method csq Single-mode squeezing operator
Method d Displacement operator
Method ecd Echoed controlled displacement operator
Method eswap Exponential SWAP operator
Method gate_from_matrix Converts matrix into gate. Called using ParameterizedUnitaryGate.
Method get_a Annihilation operator
Method get_a1 Undocumented
Method get_a12 Undocumented
Method get_a12_dag Undocumented
Method get_a12dag Undocumented
Method get_a1_dag Undocumented
Method get_a1dag2 Undocumented
Method get_a2 Undocumented
Method get_a2_dag Undocumented
Method get_a_dag Creation operator
Method get_eye Identity matrix
Method get_N Number operator
Method multicsnap SNAP (Selective Number-dependent Arbitrary Phase) operator for multiple Fock states. Generates an arbitrary number of fock-number selective qubit rotations, with the qubit that accrues the geometric phase explicit.
Method multisnap SNAP (Selective Number-dependent Arbitrary Phase) operator for multiple Fock states. Generates an arbitrary number of fock-number selective qubit rotations.
Method pnr Support gate for photon number readout (see Curtis et al., PRA (2021) and Wang et al., PRX (2020))
Method r Phase space rotation operator
Method s Single-mode squeezing operator
Method s2 Two-mode squeezing operator
Method snap SNAP (Selective Number-dependent Arbitrary Phase) operator
Method testqubitorderf Undocumented
Instance Variable mat Undocumented
Instance Variable sparse_mat Undocumented
def bs(self, theta, cutoff_a, cutoff_b): (source)

Two-mode beam splitter operator

Parameters
thetaphase
cutoff_aUndocumented
cutoff_bUndocumented
Returns
csc_matrixoperator matrix
def c_multiboson_sampling(self, max, cutoff): (source)

SNAP gate creation for multiboson sampling purposes.

Parameters
max:intthe period of the mapping
cutoffUndocumented
Returns
dia_matrixoperator matrix
def cbs(self, theta, cutoff_a, cutoff_b): (source)

Controlled phase two-mode beam splitter operator

Parameters
theta:realreal phase
cutoff_aUndocumented
cutoff_bUndocumented
Returns
csc_matrixoperator matrix
def cd(self, theta, beta, cutoff): (source)

Controlled displacement operator

Parameters
theta:realdisplacement for qubit state 0
beta:realdisplacement for qubit state 1. If None, use -alpha.
cutoffUndocumented
Returns
bsr_matrixoperator matrix
def cr(self, theta, cutoff): (source)

Controlled phase space rotation operator

Parameters
theta:realphase
cutoffUndocumented
Returns
csc_matrixoperator matrix
def crx(self, theta, cutoff): (source)

Controlled phase space rotation operator around sigma^x

Parameters
theta:realphase
cutoffUndocumented
Returns
csc_matrixoperator matrix
def cry(self, theta, cutoff): (source)

Controlled phase space rotation operator around sigma^x

Parameters
theta:realphase
cutoffUndocumented
Returns
csc_matrixoperator matrix
def cschwinger(self, beta, theta_1, phi_1, theta_2, phi_2, cutoff_a, cutoff_b): (source)

General form of a controlled Schwinger gate

Parameters
betaUndocumented
theta_1Undocumented
phi_1Undocumented
theta_2Undocumented
phi_2Undocumented
cutoff_aUndocumented
cutoff_bUndocumented
params:real[beta, theta_1, phi_1, theta_2, phi_2]
Returns
csc_matrixoperator matrix
def csnap(self, theta, n, cutoff): (source)

SNAP (Selective Number-dependent Arbitrary Phase) operator, with explicit sigma_z in exponential. Can be used to generate fock-number selective qubit rotations.

Parameters
theta:realphase
n:integerFock state in which the mode should acquire the phase
cutoffUndocumented
Returns
csc_matrixoperator matrix
def csq(self, theta, cutoff): (source)

Single-mode squeezing operator

Parameters
theta:realsqueeze
cutoffUndocumented
Returns
csc_matrixoperator matrix
def d(self, alpha, cutoff): (source)

Displacement operator

Parameters
alpha:realdisplacement
cutoffUndocumented
Returns
csc_matrixoperator matrix
def ecd(self, theta, cutoff): (source)

Echoed controlled displacement operator

Parameters
theta:realdisplacement
cutoffUndocumented
Returns
csr_matrixoperator matrix
def eswap(self, theta, cutoff_a, cutoff_b): (source)

Exponential SWAP operator

Parameters
theta:realrotation
cutoff_aUndocumented
cutoff_bUndocumented
Returns
csc_matrixoperator matrix
def gate_from_matrix(self, matrix): (source)

Converts matrix into gate. Called using ParameterizedUnitaryGate.

Parameters
matrix:listthe (unitary) matrix that you wish to convert into a gate
Returns
csc_matrixoperator matrix
def get_a(self, cutoff: int): (source)

Annihilation operator

def get_a1(self, cutoff_a: int, cutoff_b: int): (source)

Undocumented

def get_a12(self, cutoff_a: int, cutoff_b: int): (source)

Undocumented

def get_a12_dag(self, cutoff_a: int, cutoff_b: int): (source)

Undocumented

def get_a12dag(self, cutoff_a: int, cutoff_b: int): (source)

Undocumented

def get_a1_dag(self, cutoff_a: int, cutoff_b: int): (source)

Undocumented

def get_a1dag2(self, cutoff_a: int, cutoff_b: int): (source)

Undocumented

def get_a2(self, cutoff_a: int, cutoff_b: int): (source)

Undocumented

def get_a2_dag(self, cutoff_a: int, cutoff_b: int): (source)

Undocumented

def get_a_dag(self, cutoff: int): (source)

Creation operator

def get_eye(self, cutoff: int): (source)

Identity matrix

def get_N(self, cutoff: int): (source)

Number operator

def multicsnap(self, *args): (source)

SNAP (Selective Number-dependent Arbitrary Phase) operator for multiple Fock states. Generates an arbitrary number of fock-number selective qubit rotations, with the qubit that accrues the geometric phase explicit.

Parameters
*args:List[reals, integers][List of phases, List of Fock states in which the mode should acquire the associated phase]
Returns
csr_matrixoperator matrix
def multisnap(self, *args): (source)

SNAP (Selective Number-dependent Arbitrary Phase) operator for multiple Fock states. Generates an arbitrary number of fock-number selective qubit rotations.

Parameters
*args:List[reals, integers][List of phases, List of Fock states in which the mode should acquire the associated phase]
Returns
csr_matrixoperator matrix
def pnr(self, max, cutoff): (source)

Support gate for photon number readout (see Curtis et al., PRA (2021) and Wang et al., PRX (2020))

Parameters
max:intthe period of the mapping
cutoffUndocumented
Returns
csc_matrixoperator matrix
def r(self, theta, cutoff): (source)

Phase space rotation operator

Parameters
theta:realrotation
cutoffUndocumented
Returns
csc_matrixoperator matrix
def s(self, theta, cutoff): (source)

Single-mode squeezing operator

Parameters
theta:realsqueeze
cutoffUndocumented
Returns
csc_matrixoperator matrix
def s2(self, theta, cutoff_a, cutoff_b): (source)

Two-mode squeezing operator

Parameters
thetaUndocumented
cutoff_aUndocumented
cutoff_bUndocumented
g:realmultiplied by 1j to yield imaginary phase
Returns
csc_matrixoperator matrix
def snap(self, theta, n, cutoff): (source)

SNAP (Selective Number-dependent Arbitrary Phase) operator

Parameters
theta:realphase
n:integerFock state in which the mode should acquire the phase
cutoffUndocumented
Returns
csc_matrixoperator matrix
def testqubitorderf(self, phi): (source)

Undocumented

Undocumented

sparse_mat = (source)

Undocumented