Circuit Intermediate Representation (bqskit.ir
)
The BQSKit Circuit structure is a 2-d array of operations. A circuit is indexed first by cycles and second by qudits. The cycle index determines when operations are executed, and the qudit index determines which qudits an operation operates on.
Every component of the IR is also a function from a vector of real numbers to a unitary matrix. This is to facilitate circuit instantiation, a core primitive in quantum synthesis.
Core Classes
|
A Circuit is a quantum program composed of operation objects. |
|
Gate Base Class. |
|
An Operation groups together a gate, its parameters and location. |
Circuit Indexing and Helpers
|
The CycleInterval class. |
|
A CircuitIterator iterates through a circuit in a simulation order. |
|
The CircuitLocation class. |
|
A cycle and qudit index pair used to index a circuit. |
|
The CircuitRegion class. |
|
Stores compressed positions of gates in a circuit as a hashable type. |
Type Aliases
alias of |
|
alias of |
|
alias of |
|
alias of |
Gate Library
BQSKit Gates (bqskit.ir.gates
)
Constant Gates
The 2 qubit B gate. |
|
The toffoli gate, equal to an X gate with two controls. |
|
alias of |
|
The controlled-Hadamard gate. |
|
The one-qudit clock (Z) gate. |
|
The two-qutrit CPI gate. |
|
The Controlled-S gate. |
|
The two-qudit Conditional-SUM gate. |
|
The Controlled-T gate. |
|
The Controlled-Not or Controlled-X gate. |
|
alias of |
|
The Controlled-Y gate. |
|
The Controlled-Z gate. |
|
The one-qudit Hadamard gate. |
|
An Identity (No-OP) Gate. |
|
The two qubit swap and phase iSWAP gate. |
|
The IToffoliGate gate, equal to an iX gate with two controls. |
|
The one-qudit P[i] gate. |
|
A Permutation Gate. |
|
alias of |
|
The relative phase c3x gate. |
|
The relative phase ccx gate. |
|
The single-qubit S gate. |
|
The single-qubit S Dagger gate. |
|
The one-qudit shift (X) gate. |
|
The Square root Controlled-X gate. |
|
The square root two qubit swap and phase iSWAP gate. |
|
The two-qudit subspace SWAP gate. |
|
The two-qudit swap gate. |
|
The Sqrt(X) gate. |
|
alias of |
|
The SycamoreGate gate. |
|
The single-qubit T gate. |
|
The single-qubit T Dagger gate. |
|
An arbitrary constant unitary operator. |
|
The Pauli X gate. |
|
The Ising XX coupling gate. |
|
The Pauli Y gate. |
|
The Ising YY coupling gate. |
|
The Pauli Z gate. |
|
The Ising ZZ coupling gate. |
Parameterized Gates
A gate representing a controlled controlled phase rotation. |
|
The Cabibbo-Kobayashi-Maskawa single qutrit gate. |
|
The Cabibbo-Kobayashi-Maskawa dagger single qutrit gate. |
|
A gate representing a controlled phase rotation. |
|
A gate representing an arbitrary qudit controlled phase rotation. |
|
A gate representing a controlled X rotation. |
|
A gate representing a controlled Y rotation. |
|
A gate representing a controlled Z rotation. |
|
A gate representing an arbitrary controlled rotation. |
|
Google's FSIM Gate. |
|
A gate representing an arbitrary rotation. |
|
A gate representing an Google's PhasedXZGate. |
|
Rotation by SU3 generator for a single qutrit gate. |
|
A gate representing an arbitrary rotation around the X axis. |
|
A gate representing an arbitrary rotation around the XX axis. |
|
A gate representing an arbitrary rotation around the Y axis. |
|
A gate representing an arbitrary rotation around the YY axis. |
|
A gate representing an arbitrary rotation around the Z axis. |
|
A gate representing an arbitrary rotation around the ZZ axis. |
|
The U1 single qubit gate. |
|
The Quantinuum U1q single qubit gate. |
|
A composed gate which fixes some parameters of another gate. |
|
A composed gate which fixes some parameters of another gate. |
|
The U2 single qubit gate. |
|
The U3 single qubit gate. |
|
The U8 single qutrit gate. |
|
A Variable n-qudit unitary operator. |
Composed Gates
An arbitrary controlled gate. |
|
An arbitrary inverted gate. |
|
An embedding of a gate into a higher-dimensional qudit gate. |
|
A composed gate which fixes some parameters of another gate. |
|
The TaggedGate Class. |
|
Gate that can multiplex multiple placements of another gate. |
Special Gates
The CircuitGate class. |
|
Pseudogate to hold measurement information. |
|
Pseudogate to force break partitioning algorithms. |
Gate Base Classes
A gate composed of other gates. |
|
A gate that only acts on qubits. |
|
A gate that only acts on qutrits. |
|
A gate that acts on qudits, all with the same level. |
|
A gate that does not change during circuit instantiation. |
|
An abstract base class for gates that parameterize any unitary. |