ket.gateset¶
Native gate set decompositions for Ket.
Summary¶
Classes
Gate set using MS and GPi for CNOT decomposition. |
|
Gate set using iSWAP for CNOT decomposition. |
|
Gate set using CZ for CNOT decomposition. |
|
Gate set using ECR for CNOT decomposition. |
|
Gate set using Rzz for CNOT decomposition. |
Classes¶
- class RzGPiGPi2MS[source]¶
Bases:
NativeGateSetGate set using MS and GPi for CNOT decomposition.
- translate(matrix: list[list[complex]], target: int) list[source]¶
Translate a single-qubit gate into native gate instructions.
The gate is described by its 2x2 unitary matrix as a list of two rows of complex amplitudes:
[[u00, u01], [u10, u11]]
- Parameters:
matrix – The 2x2 unitary matrix as complex values.
target – Index of the target qubit.
- Returns:
A list of native gate objects (serialisable to JSON) that implement the given unitary on
target.
- class RzRxISWAP[source]¶
Bases:
NativeGateSetGate set using iSWAP for CNOT decomposition.
- translate(matrix: list[list[complex]], target: int) list[source]¶
Translate a single-qubit gate into native gate instructions.
The gate is described by its 2x2 unitary matrix as a list of two rows of complex amplitudes:
[[u00, u01], [u10, u11]]
- Parameters:
matrix – The 2x2 unitary matrix as complex values.
target – Index of the target qubit.
- Returns:
A list of native gate objects (serialisable to JSON) that implement the given unitary on
target.
- class RzSXCZ[source]¶
Bases:
NativeGateSetGate set using CZ for CNOT decomposition.
- translate(matrix: list[list[complex]], target: int) list[source]¶
Translate a single-qubit gate into native gate instructions.
The gate is described by its 2x2 unitary matrix as a list of two rows of complex amplitudes:
[[u00, u01], [u10, u11]]
- Parameters:
matrix – The 2x2 unitary matrix as complex values.
target – Index of the target qubit.
- Returns:
A list of native gate objects (serialisable to JSON) that implement the given unitary on
target.
- class RzSXECR[source]¶
Bases:
NativeGateSetGate set using ECR for CNOT decomposition.
- translate(matrix: list[list[complex]], target: int) list[source]¶
Translate a single-qubit gate into native gate instructions.
The gate is described by its 2x2 unitary matrix as a list of two rows of complex amplitudes:
[[u00, u01], [u10, u11]]
- Parameters:
matrix – The 2x2 unitary matrix as complex values.
target – Index of the target qubit.
- Returns:
A list of native gate objects (serialisable to JSON) that implement the given unitary on
target.
- class RzSXXRzz[source]¶
Bases:
NativeGateSetGate set using Rzz for CNOT decomposition.
- translate(matrix: list[list[complex]], target: int) list[source]¶
Translate a single-qubit gate into native gate instructions.
The gate is described by its 2x2 unitary matrix as a list of two rows of complex amplitudes:
[[u00, u01], [u10, u11]]
- Parameters:
matrix – The 2x2 unitary matrix as complex values.
target – Index of the target qubit.
- Returns:
A list of native gate objects (serialisable to JSON) that implement the given unitary on
target.