Skip to content

Commit

Permalink
add example Qobj instance to parser.py, linting
Browse files Browse the repository at this point in the history
  • Loading branch information
EBB2675 committed Feb 14, 2025
1 parent 021be15 commit 61b30e1
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion src/nomad_parser_qutip/parsers/parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@

from nomad.config import config
from nomad.parsing.parser import MatchingParser
from nomad.datamodel.metainfo.workflow import Workflow
from nomad_simulations.schema_packages.general import Program, Simulation

configuration = config.get_plugin_entry_point(
Expand All @@ -31,5 +30,16 @@ def parse(
simulation = Simulation()
# here we are populating the archive with the program name
simulation.program = Program(name='QuTiP')

# an example Qobj instance:
# qobj_instance = Qobj(
# dims=[[2], [1]],
# shape=[2, 1],
# type='ket',
# dtype='Dense',
# isherm=True,
# data=np.array([[1.0], [0.0]]),
# )

# put the simulation section into archive data
archive.data = simulation

0 comments on commit 61b30e1

Please sign in to comment.