CPList

import

import { CPList } from "@masabando/quantum-gates"

description

CPList is a predefined collection of composite pulse (CP) sequences. Each entry describes how a target rotation (θ, φ) is decomposed into a sequence of robust pulses.

Structure

Each entry in CPList is an object with the following structure.

type CP = {
  name: string
  robustType?: "ple" | "ore" | "both"
  rep?: "ple" | "ore" | false
  pulse: Pulse[]
}
/* Each pulse element */
type Pulse = {
  theta: (_theta: number, _phi: number) => number
  phi: (_theta: number, _phi: number) => number
  canReduce?: boolean
}

Available composite pulses

The following composite pulses are available by default. Some entries (e.g. CORPSE/BB1) are generated programmatically by createCCCP.

  • plain
  • BB1
  • SK1
  • CORPSE
  • shortCORPSE
  • CORPSE/SK1
  • SK1/CORPSE
  • CORPSE/BB1
  • BB1/CORPSE
  • reduced CORPSE/SK1
  • reduced CORPSE/BB1

Usage

CPList is typically passed to higher-level utilities such as gate construction or visualization tools. Users normally select a composite pulse by its key.

import { CPList } from "@masabando/quantum-gates"
const cp = CPList["BB1"]
console.log(cp.name)
console.log(cp.pulse.length)

createCCCP

createCCCP creates a new composite pulse by concatenating two existing composite pulses in CPList.

import { createCCCP } from "@masabando/quantum-gates"
const cp = createCCCP("CORPSE", "BB1")
console.log(cp.name)
console.log(cp.robustType)
console.log(cp.rep)
console.log(cp.pulse.length)

When reduced is set to true, elements in the second pulse marked with canReduce are kept as-is instead of being expanded.

Notes

  • The functions theta and phi are evaluated dynamically for a given target rotation.
  • Reduced forms are controlled by canReduce. When reduced=true, elements in the second pulse marked with canReduce are not expanded during concatenation.
  • Users usually do not need to modify CPList directly.