Local Channel Actions API

Local Channel Actions

graphcalc.quantum.local_channels.apply_channel_to_subsystem(state: QuantumState, channel: QuantumChannel, subsystem: int) QuantumState[source]

Apply a square quantum channel to one subsystem of a multipartite state.

Parameters:
  • state (QuantumState) – Input multipartite quantum state.

  • channel (QuantumChannel) – Local channel to apply.

  • subsystem (int) – Index of the subsystem on which the channel acts.

Notes

This function currently supports only square local channels, meaning channel.input_dim = channel.output_dim. The target subsystem dimension must equal this common value.

The action is implemented by lifting each Kraus operator to the full tensor product space and applying the resulting channel to the global density operator.

graphcalc.quantum.local_channels.apply_channels_to_subsystems(state: QuantumState, channels: Sequence[QuantumChannel], subsystems: Sequence[int]) QuantumState[source]

Apply local channels to distinct subsystems of a multipartite state.

Parameters:
  • state (QuantumState) – Input multipartite quantum state.

  • channels (sequence of QuantumChannel) – Local channels to apply.

  • subsystems (sequence of int) – Target subsystem indices.

Notes

Each channel is applied to the corresponding subsystem. The subsystem indices must be distinct.

For the current implementation, each channel must be square and dimension- preserving on its target subsystem.