Skip to main contentIBM Quantum Documentation
This page is from an old version of Qiskit SDK and does not exist in the latest version. We recommend you migrate to the latest version. See the release notes for more information.
Important

IBM Quantum Platform is moving and this version will be sunset on July 1. To get started on the new platform, read the migration guide.

Zero

class Zero(num_qubits)

GitHub

The zero (null/vacuum) state.

This is suitable for those situations in which the all-zeros state is the desired state. This is the case for a vacuum state in physics or chemistry

Parameters

num_qubits (int) – Number of qubits, has a minimum value of 1.


Attributes

bitstr


Methods

construct_circuit

Zero.construct_circuit(mode='circuit', register=None)

Construct the statevector of desired initial state.

Parameters

  • mode – vector or circuit. The vector mode produces the vector. While the circuit constructs the quantum circuit corresponding that vector.
  • register – qubits for circuit construction.

Returns

statevector.

Return type

QuantumCircuit or numpy.ndarray

Raises

AquaError – when mode is not ‘vector’ or ‘circuit’.

Was this page helpful?
Report a bug or request content on GitHub.