
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
react-openqasm-editor
Advanced tools
A powerful, customizable code editor for OpenQASM (Open Quantum Assembly Language) based on Monaco Editor.
A powerful, customizable code editor for OpenQASM (Open Quantum Assembly Language) based on Monaco Editor.
npm install openqasm-editor
# or
yarn add openqasm-editor
import { OpenQASMEditor } from 'openqasm-editor';
function App() {
const handleEditorChange = (value, event) => {
console.log('Editor content:', value);
};
const handleEditorMount = (editor) => {
// You can access the editor instance here
console.log('Editor mounted:', editor);
};
return (
<OpenQASMEditor
width="800px"
height="500px"
theme="vs-dark" // or "vs-light"
defaultvalue={`OPENQASM 2.0;
include "qelib1.inc";
// Quantum program
qreg q[2];
creg c[2];
h q[0];
cx q[0], q[1];
measure q -> c;`}
onChange={handleEditorChange}
onMount={handleEditorMount}
options={{
// Monaco editor options
fontSize: 14,
lineNumbers: 'on',
minimap: { enabled: false },
// Add any other Monaco editor options here
}}
/>
);
}
| Prop | Type | Default | Description |
|---|---|---|---|
width | string | 800px | Width of the editor |
height | string | 500px | Height of the editor |
theme | string | vs-dark | Editor theme (vs-dark or vs-light) |
defaultvalue | string | Basic quantum program | Initial code in the editor |
value | string | undefined | Controlled value for the editor |
options | object | {} | Monaco editor options |
onChange | function | noop | Called when editor content changes |
onMount | function | noop | Called when editor is mounted |
git clone https://github.com/xy2002/openqasm-editor
npm install
npm run generate-antlr
npm run build
pnpm dev - Start development serverpnpm build - Build the librarypnpm lint - Run ESLintpnpm storybook - Run Storybook for component developmentpnpm generate-antlr - Generate ANTLR parser for OpenQASM grammarThis editor supports the OpenQASM 2.0 specification, which is an intermediate representation for quantum circuits. The language includes:
For more information on OpenQASM, see the OpenQASM specification.
FAQs
A powerful, customizable code editor for OpenQASM (Open Quantum Assembly Language) based on Monaco Editor.
The npm package react-openqasm-editor receives a total of 1 weekly downloads. As such, react-openqasm-editor popularity was classified as not popular.
We found that react-openqasm-editor demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.