open-index/open-npm huggingface dataset:
npm package: @qiskit/qasm
Description: Quantum Information Science Kit OpenQASM library
Author: IBM RESEARCH
Latest version: 0.9.0
Deprecated: Archived project

# Qiskit.js OpenQASM

:atom_symbol: Quantum Information Science Kit [OpenQASM](https://github.com/IBM/qiskit-openqasm) library.

Please visit the [main repository](https://github.com/Qiskit/qiskit-js) of the project to know about the rest of the tools.

## Install

:coffee: Install lastest [Node.js](https://nodejs.org/download) stable version (or LTS) and then:

```sh
npm i @qiskit/qasm
```

## Use

:pencil: You can visit the complete example [in this test](./test/functional/).

```js
const qasm = require('@qiskit/qasm');
const fs = require('fs');
const util = require('util');

console.log('Version');
console.log(qasm.version);

const parser = new qasm.Parser();

const circuit = fs.readFileSync('./example.qasm', 'utf8');

console.log(util.inspect(parser.parse(circuit), { depth: null }));
```

## API

:eyes: Full specification.

### `version`

The actual version of the library.

* `version` (string) - Version number.

### `Parser(opts) -> parser`

The constructor accepts next option:

* `core` (boolean) - To include core libraries. (default: true)

### `parser.parse(circuit) -> circuitJson`

**NOTE: Method still partially implemented**
Get the intermediate representation of the circuit using the OpenQASM parser.

* `circuit` (string) - QASM circuit representation.
* `circuitJson` (object): The same information in JSON format.

### `QasmError(msg, opts) -> error`

Custom QASM error class.

* `msg` (string) - Error message.
* `opts` (object) - Optional parameter, including next fields:
  * `line` (number) - Line number where the error happened.
  * `column` (number) - Column number where the error happened.
  * `text` (string) - Text extracted from where the error happened.
  * `token` (string) - Identifier found where the error happened.
  * `expected` (string) - Regular expresion for supported values.
* `error` (Error) - A common JS error including also next fields:
  * `name` (string) - Error name ("QasmError").
  * `message` (string) - Error message.
  * `stack` (string) - Error stack.
  * From here the same fields that for `opts` are included.
npm package: @qiskit/utils
Description: Quantum Information Science Kit utils library
Author: IBM RESEARCH
Latest version: 0.9.0
Deprecated: Archived project

# Qiskit.js utils

:atom_symbol: Quantum Information Science Kit utils library, shared among the rest of the qiskit-\* packages.

Please visit the [main repository](https://github.com/Qiskit/qiskit-js) of the project to know about the rest of the tools.

## Install

:coffee: Install lastest [Node.js](https://nodejs.org/download) stable version (or LTS) and then:

```sh
npm i @qiskit/utils
```

## Use

:pencil: You can visit the complete example [in this test](./test/functional.js).

```js
const utils = require('@qiskit/utils');

console.log('Version');
console.log(utils.version);
```

## API

:eyes: Full specification.

### `version`

The actual version of the library.

* `version` (string) - Version number.

### `debug`

Our debugger. A wrapper for [debug](https://github.com/visionmedia/debug).

* `debug` (object) - The same object provided in the original library.

### `pathToTag(fullPath) -> tag`

To get a consistent tag among all the project debugging. So we use with the `debug` method.

* `fullPath` (string) - The full path of the file we're debugging.
* `tag` (string) - The name of the file.

### `ayb`

A wrapper for [ayb](https://github.com/nerddiffer/all-your-base).

* `ayb` (object) - The same object provided in the original library.