jet

The Jet Python API includes bindings for the core Jet C++ library along with an interpreter for Xanadu IR (XIR) scripts and a set of classes to model quantum gates, states, and circuits.

Functions

Qubit([data])

Constructs a qubit state using an optional state vector.

QubitRegister(size[, data])

Constructs a qubit register state with the given size and optional state vector.

TaskBasedContractor(*args, **kwargs)

Constructs a task-based contractor (TBC) with the specified data type.

Tensor(*args, **kwargs)

Constructs a tensor with the specified data type.

TensorNetwork(*args, **kwargs)

Constructs a tensor network with the specified data type.

TensorNetworkFile(*args, **kwargs)

Constructs a tensor network file with the specified data type.

TensorNetworkSerializer(*args, **kwargs)

Constructs a tensor network serializer with the specified data type.

add_tensors(*args, **kwargs)

Overloaded function.

conj(*args, **kwargs)

Overloaded function.

contract_tensors(*args, **kwargs)

Overloaded function.

get_xir_manifest()

Returns an XIR program that is populated with declarations for the gates and outputs supported by Jet.

reshape(*args, **kwargs)

Overloaded function.

run_xir_program(program)

Executes an XIR program.

slice_index(*args, **kwargs)

Overloaded function.

Classes

Adjoint(gate)

Adjoint is a decorator which computes the conjugate transpose of an existing Gate.

Beamsplitter(theta, phi, cutoff)

Beamsplitter represents a beamsplitter gate.

CPhaseShift(phi)

CPhaseShift represents a controlled phase shift gate.

CRX(theta)

CRX represents a controlled-RX gate.

CRY(theta)

CRY represents a controlled-RY gate.

CRZ(theta)

CRZ represents a controlled-RZ gate.

CRot(phi, theta, omega)

CRot represents a controlled-rotation gate.

CSWAP()

CSWAP represents a CSWAP gate.

CX()

CX represents a controlled-X gate.

CY()

CY represents a controlled-Y gate.

CZ()

CZ represents a controlled-Z gate.

Circuit(num_wires, dim)

Circuit represents a quantum circuit composed of wires, each of which is intitialized with a qudit of the specified dimension in the vacuum state.

Displacement(r, phi, cutoff)

Displacement represents a displacement gate.

FockGate(name, num_wires, cutoff, params)

FockGate represents a (continuous variable) Fock gate.

Gate(name, num_wires, dim, params)

Gate represents a quantum gate.

GateFactory()

GateFactory is an implementation of the factory design pattern for the Gate class.

Hadamard()

Hadamard represents a Hadamard gate.

ISWAP()

ISWAP represents a ISWAP gate.

Operation(part, jet.state.State], wire_ids)

Operation represents the application of a gate or state to a Circuit.

PathInfo

PathInfo represents a contraction path in a tensor network.

PauliX()

PauliX represents a Pauli-X gate.

PauliY()

PauliY represents a Pauli-Y gate.

PauliZ()

PauliZ represents a Pauli-Z gate.

PhaseShift(phi)

PhaseShift represents a single-qubit local phase shift gate.

QubitGate(name, num_wires, params)

QubitGate represents a qubit gate.

Qudit(dim, data)

Qudit represents a qudit state.

QuditRegister(dim, size, data)

QuditRegister represents a qudit register state.

RX(theta)

RX represents a single-qubit X rotation gate.

RY(theta)

RY represents a single-qubit Y rotation gate.

RZ(theta)

RZ represents a single-qubit Z rotation gate.

Rot(phi, theta, omega)

Rot represents an arbitrary single-qubit rotation gate with three Euler angles.

S()

S represents a single-qubit phase gate.

SWAP()

SWAP represents a SWAP gate.

SX()

SX represents a single-qubit Square-Root X gate.

Scale(gate, scalar)

Scale is a decorator which linearly scales an existing Gate.

Squeezing(r, theta, cutoff)

Squeezing represents a squeezing gate.

State(name, num_wires)

State represents a quantum state.

T()

T represents a single-qubit T gate.

Toffoli()

Toffoli represents a Toffoli gate.

TwoModeSqueezing(r, theta, cutoff)

TwoModeSqueezing represents a two-mode squeezing gate.

U1(phi)

U1 represents a U1 gate.

U2(phi, lam)

U2 represents a U2 gate.

U3(theta, phi, lam)

U3 represents a U3 gate.

Wire(id_, depth, closed)

Wire represents a collection of tensor indices that are directly or transitively associated with a qudit of a quantum circuit.

Class Inheritance Diagram

Inheritance diagram of jet.gate.Adjoint, jet.gate.Beamsplitter, jet.gate.CPhaseShift, jet.gate.CRX, jet.gate.CRY, jet.gate.CRZ, jet.gate.CRot, jet.gate.CSWAP, jet.gate.CX, jet.gate.CY, jet.gate.CZ, jet.circuit.Circuit, jet.gate.Displacement, jet.gate.FockGate, jet.gate.Gate, jet.gate.GateFactory, jet.gate.Hadamard, jet.gate.ISWAP, jet.circuit.Operation, jet.bindings.PathInfo, jet.gate.PauliX, jet.gate.PauliY, jet.gate.PauliZ, jet.gate.PhaseShift, jet.gate.QubitGate, jet.state.Qudit, jet.state.QuditRegister, jet.gate.RX, jet.gate.RY, jet.gate.RZ, jet.gate.Rot, jet.gate.S, jet.gate.SWAP, jet.gate.SX, jet.gate.Scale, jet.gate.Squeezing, jet.state.State, jet.gate.T, jet.gate.Toffoli, jet.gate.TwoModeSqueezing, jet.gate.U1, jet.gate.U2, jet.gate.U3, jet.circuit.Wire