PauliZExpansion

class PauliZExpansion(feature_dimension, depth=2, entangler_map=None, entanglement='full', z_order=2, data_map_func=<function self_product>)[source]

DEPRECATED. The Pauli Z Expansion feature map.

This is a sub-class of the general PauliExpansion but where the pauli string is fixed to only contain Z and where paulis is now created for the superclass as per the given z_order. So with default of 2 this creates [‘Z’, ‘ZZ’] which also happens to be the default of the superclass. A z_order of 3 would be [‘Z’, ‘ZZ’, ‘ZZZ’] and so on.

Parameters
  • feature_dimension (int) – The number of features

  • depth (int) – The number of repeated circuits. Defaults to 2, has a minimum value of 1.

  • entangler_map (Optional[List[List[int]]]) – Describes the connectivity of qubits, each list in the overall list describes [source, target]. Defaults to None where the map is created as per entanglement parameter. Note that the order in the list is the order of applying the two-qubit gate.

  • entanglement (str) – (‘full’ | ‘linear’), generate the qubit connectivity by a predefined topology. Defaults to full which connects every qubit to each other. Linear connects each qubit to the next.

  • z_order (int) – z order, has a min. value of 1. Creates paulis for superclass based on the z order value, e.g. 3 would result in [‘Z’, ‘ZZ’, ‘ZZZ’] where the paulis contains strings of Z up to length of z_order

  • data_map_func (Callable[[ndarray], float]) – A mapping function for data x which can be supplied to override the default mapping from self_product().

Attributes

PauliZExpansion.feature_dimension

returns feature dimension

PauliZExpansion.num_qubits

returns number of qubits

PauliZExpansion.support_parameterized_circuit

returns whether or not the sub-class support parameterized circuit

Methods

PauliZExpansion.construct_circuit(x[, qr, …])

Construct the second order expansion based on given data.

PauliZExpansion.get_entangler_map(map_type, …)

get entangle map

PauliZExpansion.validate_entangler_map(…)

validate entangler map