# braket.default_simulator.gate_operations module¶

class braket.default_simulator.gate_operations.Identity(targets)[source]

Identity gate

matrix

The matrix representation of the operation.

Type: np.ndarray
targets

The indices of the qubits the operation applies to.

Note: For an index to be a target of an observable, the observable must have a nontrivial (i.e. non-identity) action on that index. For example, a tensor product observable with a Z factor on qubit j acts trivially on j, so j would not be a target. This does not apply to gate operations.

Type: Tuple[int, ..]
class braket.default_simulator.gate_operations.Hadamard(targets)[source]

matrix

The matrix representation of the operation.

Type: np.ndarray
targets

The indices of the qubits the operation applies to.

Note: For an index to be a target of an observable, the observable must have a nontrivial (i.e. non-identity) action on that index. For example, a tensor product observable with a Z factor on qubit j acts trivially on j, so j would not be a target. This does not apply to gate operations.

Type: Tuple[int, ..]
class braket.default_simulator.gate_operations.PauliX(targets)[source]

Pauli-X gate

matrix

The matrix representation of the operation.

Type: np.ndarray
targets

The indices of the qubits the operation applies to.

Note: For an index to be a target of an observable, the observable must have a nontrivial (i.e. non-identity) action on that index. For example, a tensor product observable with a Z factor on qubit j acts trivially on j, so j would not be a target. This does not apply to gate operations.

Type: Tuple[int, ..]
class braket.default_simulator.gate_operations.PauliY(targets)[source]

Pauli-Y gate

matrix

The matrix representation of the operation.

Type: np.ndarray
targets

The indices of the qubits the operation applies to.

Note: For an index to be a target of an observable, the observable must have a nontrivial (i.e. non-identity) action on that index. For example, a tensor product observable with a Z factor on qubit j acts trivially on j, so j would not be a target. This does not apply to gate operations.

Type: Tuple[int, ..]
class braket.default_simulator.gate_operations.PauliZ(targets)[source]

Pauli-Z gate

matrix

The matrix representation of the operation.

Type: np.ndarray
targets

The indices of the qubits the operation applies to.

Note: For an index to be a target of an observable, the observable must have a nontrivial (i.e. non-identity) action on that index. For example, a tensor product observable with a Z factor on qubit j acts trivially on j, so j would not be a target. This does not apply to gate operations.

Type: Tuple[int, ..]
class braket.default_simulator.gate_operations.CX(targets)[source]

Controlled Pauli-X gate

matrix

The matrix representation of the operation.

Type: np.ndarray
targets

The indices of the qubits the operation applies to.

Note: For an index to be a target of an observable, the observable must have a nontrivial (i.e. non-identity) action on that index. For example, a tensor product observable with a Z factor on qubit j acts trivially on j, so j would not be a target. This does not apply to gate operations.

Type: Tuple[int, ..]
class braket.default_simulator.gate_operations.CY(targets)[source]

Controlled Pauli-Y gate

matrix

The matrix representation of the operation.

Type: np.ndarray
targets

The indices of the qubits the operation applies to.

Note: For an index to be a target of an observable, the observable must have a nontrivial (i.e. non-identity) action on that index. For example, a tensor product observable with a Z factor on qubit j acts trivially on j, so j would not be a target. This does not apply to gate operations.

Type: Tuple[int, ..]
class braket.default_simulator.gate_operations.CZ(targets)[source]

Controlled Pauli-Z gate

matrix

The matrix representation of the operation.

Type: np.ndarray
targets

The indices of the qubits the operation applies to.

Note: For an index to be a target of an observable, the observable must have a nontrivial (i.e. non-identity) action on that index. For example, a tensor product observable with a Z factor on qubit j acts trivially on j, so j would not be a target. This does not apply to gate operations.

Type: Tuple[int, ..]
class braket.default_simulator.gate_operations.S(targets)[source]

S gate

matrix

The matrix representation of the operation.

Type: np.ndarray
targets

The indices of the qubits the operation applies to.

Note: For an index to be a target of an observable, the observable must have a nontrivial (i.e. non-identity) action on that index. For example, a tensor product observable with a Z factor on qubit j acts trivially on j, so j would not be a target. This does not apply to gate operations.

Type: Tuple[int, ..]
class braket.default_simulator.gate_operations.Si(targets)[source]

The adjoint $$S^{\dagger}$$ of the S gate

matrix

The matrix representation of the operation.

Type: np.ndarray
targets

The indices of the qubits the operation applies to.

Note: For an index to be a target of an observable, the observable must have a nontrivial (i.e. non-identity) action on that index. For example, a tensor product observable with a Z factor on qubit j acts trivially on j, so j would not be a target. This does not apply to gate operations.

Type: Tuple[int, ..]
class braket.default_simulator.gate_operations.T(targets)[source]

T gate

matrix

The matrix representation of the operation.

Type: np.ndarray
targets

The indices of the qubits the operation applies to.

Note: For an index to be a target of an observable, the observable must have a nontrivial (i.e. non-identity) action on that index. For example, a tensor product observable with a Z factor on qubit j acts trivially on j, so j would not be a target. This does not apply to gate operations.

Type: Tuple[int, ..]
class braket.default_simulator.gate_operations.Ti(targets)[source]

The adjoint $$T^{\dagger}$$ of the T gate

matrix

The matrix representation of the operation.

Type: np.ndarray
targets

The indices of the qubits the operation applies to.

Note: For an index to be a target of an observable, the observable must have a nontrivial (i.e. non-identity) action on that index. For example, a tensor product observable with a Z factor on qubit j acts trivially on j, so j would not be a target. This does not apply to gate operations.

Type: Tuple[int, ..]
class braket.default_simulator.gate_operations.V(targets)[source]

Square root of the X (not) gate

matrix

The matrix representation of the operation.

Type: np.ndarray
targets

The indices of the qubits the operation applies to.

Note: For an index to be a target of an observable, the observable must have a nontrivial (i.e. non-identity) action on that index. For example, a tensor product observable with a Z factor on qubit j acts trivially on j, so j would not be a target. This does not apply to gate operations.

Type: Tuple[int, ..]
class braket.default_simulator.gate_operations.Vi(targets)[source]

The adjoint $$V^{\dagger}$$ of the square root of the X (not) gate

matrix

The matrix representation of the operation.

Type: np.ndarray
targets

The indices of the qubits the operation applies to.

Note: For an index to be a target of an observable, the observable must have a nontrivial (i.e. non-identity) action on that index. For example, a tensor product observable with a Z factor on qubit j acts trivially on j, so j would not be a target. This does not apply to gate operations.

Type: Tuple[int, ..]
class braket.default_simulator.gate_operations.PhaseShift(targets, angle)[source]

Phase shift gate

matrix

The matrix representation of the operation.

Type: np.ndarray
targets

The indices of the qubits the operation applies to.

Note: For an index to be a target of an observable, the observable must have a nontrivial (i.e. non-identity) action on that index. For example, a tensor product observable with a Z factor on qubit j acts trivially on j, so j would not be a target. This does not apply to gate operations.

Type: Tuple[int, ..]
class braket.default_simulator.gate_operations.CPhaseShift(targets, angle)[source]

Controlled phase shift gate

matrix

The matrix representation of the operation.

Type: np.ndarray
targets

The indices of the qubits the operation applies to.

Note: For an index to be a target of an observable, the observable must have a nontrivial (i.e. non-identity) action on that index. For example, a tensor product observable with a Z factor on qubit j acts trivially on j, so j would not be a target. This does not apply to gate operations.

Type: Tuple[int, ..]
class braket.default_simulator.gate_operations.CPhaseShift00(targets, angle)[source]

Controlled phase shift gate phasing the $$\ket{00}$$ state

matrix

The matrix representation of the operation.

Type: np.ndarray
targets

The indices of the qubits the operation applies to.

Note: For an index to be a target of an observable, the observable must have a nontrivial (i.e. non-identity) action on that index. For example, a tensor product observable with a Z factor on qubit j acts trivially on j, so j would not be a target. This does not apply to gate operations.

Type: Tuple[int, ..]
class braket.default_simulator.gate_operations.CPhaseShift01(targets, angle)[source]

Controlled phase shift gate phasing the $$\ket{01}$$ state

matrix

The matrix representation of the operation.

Type: np.ndarray
targets

The indices of the qubits the operation applies to.

Note: For an index to be a target of an observable, the observable must have a nontrivial (i.e. non-identity) action on that index. For example, a tensor product observable with a Z factor on qubit j acts trivially on j, so j would not be a target. This does not apply to gate operations.

Type: Tuple[int, ..]
class braket.default_simulator.gate_operations.CPhaseShift10(targets, angle)[source]

Controlled phase shift gate phasing the $$\ket{10}$$ state

matrix

The matrix representation of the operation.

Type: np.ndarray
targets

The indices of the qubits the operation applies to.

Note: For an index to be a target of an observable, the observable must have a nontrivial (i.e. non-identity) action on that index. For example, a tensor product observable with a Z factor on qubit j acts trivially on j, so j would not be a target. This does not apply to gate operations.

Type: Tuple[int, ..]
class braket.default_simulator.gate_operations.RotX(targets, angle)[source]

X-axis rotation gate

matrix

The matrix representation of the operation.

Type: np.ndarray
targets

The indices of the qubits the operation applies to.

Note: For an index to be a target of an observable, the observable must have a nontrivial (i.e. non-identity) action on that index. For example, a tensor product observable with a Z factor on qubit j acts trivially on j, so j would not be a target. This does not apply to gate operations.

Type: Tuple[int, ..]
class braket.default_simulator.gate_operations.RotY(targets, angle)[source]

Y-axis rotation gate

matrix

The matrix representation of the operation.

Type: np.ndarray
targets

The indices of the qubits the operation applies to.

Note: For an index to be a target of an observable, the observable must have a nontrivial (i.e. non-identity) action on that index. For example, a tensor product observable with a Z factor on qubit j acts trivially on j, so j would not be a target. This does not apply to gate operations.

Type: Tuple[int, ..]
class braket.default_simulator.gate_operations.RotZ(targets, angle)[source]

Z-axis rotation gate

matrix

The matrix representation of the operation.

Type: np.ndarray
targets

The indices of the qubits the operation applies to.

Note: For an index to be a target of an observable, the observable must have a nontrivial (i.e. non-identity) action on that index. For example, a tensor product observable with a Z factor on qubit j acts trivially on j, so j would not be a target. This does not apply to gate operations.

Type: Tuple[int, ..]
class braket.default_simulator.gate_operations.Swap(targets)[source]

Swap gate

matrix

The matrix representation of the operation.

Type: np.ndarray
targets

The indices of the qubits the operation applies to.

Note: For an index to be a target of an observable, the observable must have a nontrivial (i.e. non-identity) action on that index. For example, a tensor product observable with a Z factor on qubit j acts trivially on j, so j would not be a target. This does not apply to gate operations.

Type: Tuple[int, ..]
class braket.default_simulator.gate_operations.ISwap(targets)[source]

iSwap gate

matrix

The matrix representation of the operation.

Type: np.ndarray
targets

The indices of the qubits the operation applies to.

Note: For an index to be a target of an observable, the observable must have a nontrivial (i.e. non-identity) action on that index. For example, a tensor product observable with a Z factor on qubit j acts trivially on j, so j would not be a target. This does not apply to gate operations.

Type: Tuple[int, ..]
class braket.default_simulator.gate_operations.PSwap(targets, angle)[source]

Parametrized Swap gate

matrix

The matrix representation of the operation.

Type: np.ndarray
targets

The indices of the qubits the operation applies to.

Note: For an index to be a target of an observable, the observable must have a nontrivial (i.e. non-identity) action on that index. For example, a tensor product observable with a Z factor on qubit j acts trivially on j, so j would not be a target. This does not apply to gate operations.

Type: Tuple[int, ..]
class braket.default_simulator.gate_operations.XY(targets, angle)[source]

XY gate

Reference: https://arxiv.org/abs/1912.04424v1

matrix

The matrix representation of the operation.

Type: np.ndarray
targets

The indices of the qubits the operation applies to.

Note: For an index to be a target of an observable, the observable must have a nontrivial (i.e. non-identity) action on that index. For example, a tensor product observable with a Z factor on qubit j acts trivially on j, so j would not be a target. This does not apply to gate operations.

Type: Tuple[int, ..]
class braket.default_simulator.gate_operations.XX(targets, angle)[source]

Ising XX gate

Reference: https://arxiv.org/abs/1707.06356

matrix

The matrix representation of the operation.

Type: np.ndarray
targets

The indices of the qubits the operation applies to.

Note: For an index to be a target of an observable, the observable must have a nontrivial (i.e. non-identity) action on that index. For example, a tensor product observable with a Z factor on qubit j acts trivially on j, so j would not be a target. This does not apply to gate operations.

Type: Tuple[int, ..]
class braket.default_simulator.gate_operations.YY(targets, angle)[source]

Ising YY gate

Reference: https://arxiv.org/abs/1707.06356

matrix

The matrix representation of the operation.

Type: np.ndarray
targets

The indices of the qubits the operation applies to.

Note: For an index to be a target of an observable, the observable must have a nontrivial (i.e. non-identity) action on that index. For example, a tensor product observable with a Z factor on qubit j acts trivially on j, so j would not be a target. This does not apply to gate operations.

Type: Tuple[int, ..]
class braket.default_simulator.gate_operations.ZZ(targets, angle)[source]

Ising ZZ gate

Reference: https://arxiv.org/abs/1707.06356

matrix

The matrix representation of the operation.

Type: np.ndarray
targets

The indices of the qubits the operation applies to.

Note: For an index to be a target of an observable, the observable must have a nontrivial (i.e. non-identity) action on that index. For example, a tensor product observable with a Z factor on qubit j acts trivially on j, so j would not be a target. This does not apply to gate operations.

Type: Tuple[int, ..]
class braket.default_simulator.gate_operations.CCNot(targets)[source]

Controlled CNot or Toffoli gate

matrix

The matrix representation of the operation.

Type: np.ndarray
targets

The indices of the qubits the operation applies to.

Note: For an index to be a target of an observable, the observable must have a nontrivial (i.e. non-identity) action on that index. For example, a tensor product observable with a Z factor on qubit j acts trivially on j, so j would not be a target. This does not apply to gate operations.

Type: Tuple[int, ..]
class braket.default_simulator.gate_operations.CSwap(targets)[source]

Controlled Swap gate

matrix

The matrix representation of the operation.

Type: np.ndarray
targets

The indices of the qubits the operation applies to.

Note: For an index to be a target of an observable, the observable must have a nontrivial (i.e. non-identity) action on that index. For example, a tensor product observable with a Z factor on qubit j acts trivially on j, so j would not be a target. This does not apply to gate operations.

Type: Tuple[int, ..]
class braket.default_simulator.gate_operations.Unitary(targets, matrix)[source]

Arbitrary unitary gate

matrix

The matrix representation of the operation.

Type: np.ndarray
targets

The indices of the qubits the operation applies to.

Note: For an index to be a target of an observable, the observable must have a nontrivial (i.e. non-identity) action on that index. For example, a tensor product observable with a Z factor on qubit j acts trivially on j, so j would not be a target. This does not apply to gate operations.

Type: Tuple[int, ..]