quairkit.application.locc.locc¶
The source file of the LOCCNet class.
- class quairkit.application.locc.locc.OneWayLOCCNet(party_info)¶
Network for general one-way LOCC (Local Operations and Classical Communication) protocol. Party that is measured will be traced out, and the party that performs the action will be the only one left.
- Parameters:¶
- party_info : Dict[str, int | Dict[str, int]]¶
a dictionary containing the information of the parties involved in the LOCC protocol.
Note
Information of each party in party_info should be one of the following format: - {‘Alice’: 2} (Alice has 2 qubits) - {‘Alice’: {‘num_systems’: 2, ‘system_dim’: 3}} (Alice has 2 qutrits) - {‘Alice’: {‘num_systems’: 2, ‘system_dim’: [2, 3]}} (Alice has a qubit and a qutrit)
- keys()¶
Get the names of the parties in the LOCC protocol.
- values()¶
Get the circuits in the LOCC protocol.
- property party_info : dict[str, int | dict[str, int]]¶
Get the information of the parties in the LOCC protocol.
-
set_init_state(system_idx, state=
None
)¶ Set the initial (Bell) state of the LOCC protocol.
- Parameters:¶
- system_idx : List[Tuple[str, int]] | Tuple[str, int]¶
a list of logical indices of where this state is an input
- state : StateSimulator | None¶
the initial state of the LOCC protocol. Defaults to the (generalized) Bell state pair
-
locc(local_unitary, system_idx, label=
'M'
, latex_name='O'
)¶ Set a (non-parameterized) one-way LOCC protocol to the network.
- Parameters:¶
- local_unitary : Tensor¶
The local unitary operation.
- system_idx : List[List[Tuple[str, int]] | Tuple[str, int]]¶
Systems on which the protocol is applied. The first element indicates the measure system.
- label : str¶
Label for measurement. Defaults to ‘M’.
- latex_name : str¶
LaTeX name for the applied operator. Defaults to ‘O’.
-
param_locc(generator, num_acted_param, system_idx, param=
None
, label='M'
, latex_name='U'
, support_batch=True
)¶ Add a one-way LOCC protocol comprised of unitary operations, where the applied unitary is parameterized.
- Parameters:¶
- generator : Callable[[Tensor], Tensor]¶
Function to generate the oracle.
- num_acted_param : int¶
Number of parameters required for a single application.
- system_idx : List[List[Tuple[str, int]] | Tuple[str, int]]¶
Systems on which the protocol is applied. The first element indicates the measure system.
- param : Tensor | float¶
Input parameters for the gate. Defaults to None.
- label : str¶
Label for measurement. Defaults to ‘M’.
- latex_name : str¶
LaTeX name for the applied operator. Defaults to ‘U’.
- support_batch : bool¶
Whether generator supports batched input.
Note
If the generator does not support batched input, you need to set support_batch to False.